PowerPC FP handling weakness.
Jay Kulpinski
jskulpin at eng01.gdds.com
Thu Sep 28 19:03:45 UTC 2000
Sergei Organov wrote:
>
> 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.
There's nothing wrong that I can see. You'll get slightly
slower context switches, but it's probably worth it for the
safety.
More information about the users
mailing list