You copied the Doc URL to your clipboard.

Preventing the use of floating-point instructions and registers

You can instruct the compiler to prevent the use of floating-point instructions and floating-point registers.

The method depends on whether you are compiling for AArch32 state or AArch64 state:

  • When compiling for AArch64 state (the default), use the -mgeneral-regs-only option:

    armclang -mgeneral-regs-only test.c
  • When compiling for AArch32 state, use the -mfpu=none option:

    armclang --target=armv8a-arm-none-eabi -mfpu=none test.c

    If you specify -mfpu=none, you must specify -mfloat-abi=soft. This is the default if you omit the -mfloat-abi option. Use of -mfloat-abi=hard,softfp generates an error.

Was this page helpful? Yes No