Code: Select all
USE_OPT += -mthumb -march=armv7e-m -mfloat-abi=hard -mfpu=fpv4-sp-d16
I get completely wrong results. Example,
Code: Select all
mlaFL = (float)sqrt((float)10.0f);
mlaFL = (float)sqrt(mlaFL);
mlaFL = (float)sqrt(mlaFL);
mlaFL = (float)sqrt(mlaFL);
mlaFL = (float)sqrt(mlaFL);
mlaFL = (float)sqrt(mlaFL);Returns 3.16227 when using softfp the results are correct.
I'm using the gnu-arm toolchain https://launchpad.net/gcc-arm-embedded which is supposed to have support for hardware-fp.
The compiler issues a library call to sqrt, not the assembler instruction. How does one make it to issue the assembler instruction?
I'v spent days on this. Tried the summon toolchain, x86_64 version of the gcc-arm toolchain, and finally the i386-version distributed by
launchpad. Any help is really appreciated.