Update: There is a bug in the Freescale libraries, and a defect has been added. A temporary workaround has been offered
It’s a codegen bug, turn off inlining for the function that makes the call :
#pragma dont_inline on
int main(void) {
volatile int i = 0;
testf = atanf(1.0f) * 4.0 / PI;
sqrtAnswer = sqrtf(4600.0f);
/* Loop forever */
for (;;) {
i++;
}
}
#pragma dont_inline reset
If the user adds the f suffix to all constants (4.0f and PI) then faster SPE codegen will happen but inlining need to be kept off.