[ros-dev] Re: [ros-diffs] [CVS reactos] - Saved the state of the
fpu at a win32 call and restored the state
blight at blight.eu.org
Sat Nov 27 22:57:25 CET 2004
You have changed the w32 callback to save the FPU state, this is wrong I
I was wondering too wether it should be saved so GvG suggested to check
myself and I modified our winhello app...
It prints out the FPU control word, calls CreateWindow and printf the
FPU control word again.
In the callback for the WM_CREATE message (produced by CreateWindow) it
also prints the control word, then modifies it (and prints the modified one)
This is the output on windows2000:
Original FPU control word: 0x8001f
WM_CREATE: Original FPU control word: 0x8001f
WM_CREATE: Modified FPU control word: 0xa001f
FPU control word after CreateWindow: 0xa001f
Of course I have attached the program.
I am not sure but I think in the KiClearFloatingPointState which you
have added you have to set KPCR->NpxThread to NULL if it's CurrentThread
before you do the fn/xsave because it could raise a delayed FPU
exception (which will be ignored when KPCR->CurrentThread is NULL and be
delivered when the saved FPU state is restored for the thread)
I think I have made the same mistake in tskswitch.S - I am pretty sure
it has to be fixed there because we don't want a FPU exception to be
raised while we are in a cli/sti block and switching to another task.
-------------- next part --------------
A non-text attachment was scrubbed...
Size: 15232 bytes
Desc: not available
Url : http://reactos.com:8080/pipermail/ros-dev/attachments/20041127/d49e94ac/test.obj
More information about the Ros-dev