[ros-dev] Re: [ros-diffs] [CVS reactos] - Saved the state ofthe
fpu at a win32 call and restored the state
blight at blight.eu.org
Sun Nov 28 04:06:01 CET 2004
I think you are right, this line looks wrong.
Above this line is a block which copies the FPU state from the "real"
InitialStack into the changed one if NPX_STATE_VALID is set in NpxState
and CurrentThread != KPCR->NpxThread (should be the same as NpxState &
NPX_STATE_DIRTY == 0) - this means the FPU state is only copied if the
thread has not yet used the FPU because it might use it in the callback
and then we need the state there to restore it (thus only in this case
we need TS set in cr0, but it should already be set if everything is ok
since the thread has not yet used the FPU)
Summary: Removing the line is ok, please commit the change - I am pretty
sure it is a bug.
Thank you :-)
Hartmut Birr wrote:
>it seems that my problem is in w32call.c line #143. We should not set the TS
>if Thread->Tcb.NpxState is NPX_STATE_DIRTY. On a thread switch the fpu state
>is saved because NpxState is NPX_STATE_DIRTY. This triggers the fpu
>exception. If I remove this line it works again.
More information about the Ros-dev