PowerPC FP handling weakness.

Sergei Organov osv at javad.ru
Thu Sep 28 16:08:51 UTC 2000


Jay Kulpinski <jskulpin at eng01.gdds.com> writes:

[...]

> 
> That does not remove the need for PPC_MSR_FP as floating point
> instructions are needed in the context switch code to save and/or
> load the floating point registers.  Without this, a floating point
> unavailable exception is generated when attempting to switch to a 
> floating point tast from a non-FP task.  
>

Yes, it does. It's possible to set MSR FP bit before saving/restoring FP
registers and then restore it back to previous value. I know what I'm talking
about. I did it myself for RTEMS 3.6.0.

[...]

> > Did I convince you there is no reason to enable FP bit in MSR for non-FP
> > tasks?
> > 
> 
> No.

Why? It's definitely much safer for applications to get "FP unavailable
exception" if FP is by mistake used in non-FP task than get unpredicted
behavior when product is already shipped to most significant customer, I
believe. What's wrong about it?

BR,
Sergei Organov.





More information about the users mailing list