I think it is not needed to enable it as EFPU/LSP is always enabled. With predecessors having EFPU/SPE unit it was needed to set MSR[SPE] bit, but it is not the case.
Dear David,thank you for your answer to me. Now that EFPU/LSP is always enabled,the question is, why are floating-point operations performed so slowly, unlike using an internal floating-point unit? hope to get your reply again,thank you!
Could you disassemble a piece of the code where do you have floating point operation to see whether EFPU/LSP instructions are used? Don't you have it disabled in some compiler setting?
Hello, I am not sure that EFPU/LSP instruction are used because compiler (S32 Design Studio for Architecture) can not configure or observed the relevant register about Floating point unit. I simply made a rough estimate of the execution time of the code and find that MPC5744P do not use the EFPU.
Hi, try to check following option:
Dear David,
For hardware Floating point Unit, is there a corresponding math library files? Just like sin\cos\log\arctan and so long.
Library math.h should work for you
#include <math.h>
int main(void) {
float a=3.14159265358979/2; // Pi/2
float b=10000;
float c,d;
c = sinf (a);
d = sqrtf (b);
}
Dear David,
Recently, I tested the floating-point operation again and found that the code executes at the same time whether or not a 'Use hardware Floating-point ' is checked.
The problem is solved,thank you very much!