I'm debugging Freescale K60(Cortex-M4F). Before main() FPU(Floating-point uint) is enabled, while the hardware function of "FPU registers auto-stacking on exception entry" is disabled. The source code is: CPACR |= (0x0F << 20u); FPCCR = 0u;
However, the compiler dosen't know FPU auto-stacking has been disabled. If an exception involves any floating computations, the compiler will not give software instructions to preserve and restore FPU registers, that will destory FPU computateions on threads.