I have two questions regarding floating point operations regarding ARM Cortex M4, Cortex M33 and Cortex M0 core with floating point co-processor.
Though optional, almost all major ARM Cortex M4 and Cortex M33 implementation generally have a FPU built-in the core.
While Cortex M0 may have an FPU or Math co-processor as an peripheral.
My questions
To use FPU for floating point operation do I have to use functions like
__aeabi_fadd
given in the link or simple mathematical operators like+, -, /, *
will suffice.
I believe Cortex M0 that may have an FPU or Math co-processor as an peripheral we will require such functions as in the case of RP2040 (Raspberry Pi Pico).Why do we have separate
__aeabi_fsub
and__aeabi_frsub
, should reversing the parameters suffice or am I missing something.__aeabi_fsub 2 float float Return x minus y __aeabi_frsub 2 float float Return y minus x
Cortex M4