Inline assembler Vector Floating-Point (VFP) coprocessor restrictions in C and C++ code

The inline assembler does not provide direct support for VFP instructions. However, they can be specified using the generic coprocessor instructions. For example:

int foo()
{
  int x;

    __asm
    {
        MRC p10,0x7,x,c1,c0,0; // equates to VMRS r0,FPSCR
    }

    return x;
}

Note

Do not use inline assembly code to change VFP vector mode. Inline assembly code must not be used for this purpose, and VFP vector mode is deprecated.

Inline assembly code can contain floating-point expression operands that can be evaluated using compiler-generated VFP code. Therefore, it is important that only the compiler modifies the state of the VFP.

Show/hideSee also

Copyright © 2010-2011 ARM. All rights reserved.ARM DUI 0472C
Non-ConfidentialID080411