Hi @GuYuXiang
It is possible to write a software wrapper to handle full IEEE floating point operation and the FPU in the MPC500 parts works exactly as they are supposed to work. It is not an easy task to write the wrapper however. For vast majority of applications that the MPC500 parts were designed for, the non-IEEE mode is sufficient. Copied from RCPU reference manual:
“3.4.4 Working Without the Software Envelope
Even when the processor is operating in non-IEEE mode, the software envelope may be invoked when denormalized numbers are used as the input to the calculation or when an enabled IEEE exception is detected. To ensure that the software envelope is never invoked, the user needs to do the following:
It’s responsibility of user to clear all the flags in the wrapper.
We do not have SW example for the wrapper.
Regards,
Lukas
Hi, @lukaszadrapa
Thank you for your response. The Non-IEEE mode does meet our requirements, but the MPC555 still crashes when dealing with denormalized numbers. Therefore, I'd like to attempt writing a floating-point assist function to clear the exception flags. Currently, I'm using the following code for testing, but there's no printed information. Could you please check if there's an issue with my code and suggest how to fix it?
Thank you
In the `eppc_exception.asm` file:
.org 0xE00
IntPrologue
li r3,0x0E00
lis r4,FP_Assist_handler@h
ori r4,r4,FP_Assist_handler@l
mtlr r4
blrl
epilogue
In other C language files:
void FP_Assist_handler(long a) {
printf("enter FP Assist\r\n");
}