[arm-gnu] Regarding Double Data Type Support on Cortex M4

42Bastian list-bastian.schick at sciopta.com
Tue Jun 5 15:54:49 UTC 2012


Hi

> CodeSourcery supports generating code for this chip, but it does not
> support the FPU... With linaro you can use:

Sure CS support float/double:
I tried some sample code with these options:

-mthumb -mcpu=cortex-m4 -mfpu=fpv4-sp-d16 -mfloat-abi=hard

And it generates fine FPU code for float and uses libraries for double.

/* double mult */
   ldrd    r0, [sp, #24]
   ldrd    r2, [sp, #16]
   bl      __aeabi_dmul
   strd    r0, [sp, #32]

/* float mult */
   flds    s14, [sp, #8]
   flds    s15, [sp, #4]
   fmuls   s15, s14, s15
   fsts    s15, [sp, #12]

-- 
42Bastian
+
| http://www.sciopta.com
| Fastest direct message passing kernel.
| IEC61508 certified.
+



More information about the arm-gnu mailing list