Difference between revisions of "GCC floating-point options"
m |
m |
||
Line 11: | Line 11: | ||
| soft || Full software floating-point. <br /> The compiler will not generate any FPU instructions and the ''-mfpu='' option is ignored. <br /> Function calls are generated by passing floating-point arguments in integer registers. |
| soft || Full software floating-point. <br /> The compiler will not generate any FPU instructions and the ''-mfpu='' option is ignored. <br /> Function calls are generated by passing floating-point arguments in integer registers. |
||
|- |
|- |
||
− | | softfp || Hardware floating-point using the soft floating-point ABI. <br /> The compiler will generate FPU instructions according to the ''-mfpu='' option. <br /> Function calls are generated by passing floating-point arguments in integer registers. <br /> This means ''soft'' and ''softfp'' |
+ | | softfp || Hardware floating-point using the soft floating-point ABI. <br /> The compiler will generate FPU instructions according to the ''-mfpu='' option. <br /> Function calls are generated by passing floating-point arguments in integer registers. <br /> This means ''soft'' and ''softfp'' can be intermixed. |
|- |
|- |
||
| hard || Full hardware floating point. <br /> The compiler will generate FPU instructions according to the ''-mfpu='' option. <br /> Function calls are generated by passing floating-point arguments in FPU registers. |
| hard || Full hardware floating point. <br /> The compiler will generate FPU instructions according to the ''-mfpu='' option. <br /> Function calls are generated by passing floating-point arguments in FPU registers. |
||
Line 55: | Line 55: | ||
| colspan="2" | ''etc.'' |
| colspan="2" | ''etc.'' |
||
|} |
|} |
||
− | + | The ''-mfpu='' is ignored when ''-mfloat-abi=soft'' is specified or when compiling for AArch64 targets <br /> ''-mfp='' and ''-mfpe='' are synonyms for ''-mfpu=''. |
|
|} |
|} |
||
Revision as of 16:36, 30 March 2020
The GNU C Compiler produces binaries with several options in regards to floating-point operations:
Compiler flag | Description | ||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
-mfloat-abi=<value> (-mhard-float) (-msoft-float) |
Specifies which floating-point ABI to use. Permissible values are:
The hard-float and soft-float ABIs are not link-compatible. You must compile your entire program with the same ABI and link with a compatible set of libraries. | ||||||||||||||||||||||||||||||||||
-mfpu=<value> (-mfp=<value>) (-mfpe=<value>) |
Specifies the available floating-point hardware on the target. Permissible values include:
The -mfpu= is ignored when -mfloat-abi=soft is specified or when compiling for AArch64 targets |
embOS for GCC typically is shipped with distinct sets of libraries for each floating-point ABI. While there is no immediate effect on embOS itself, this allows for compalibity with all applications and third-party libraries customers may utilize.