Commit 52b6bd95 authored by Dave Hawkes's avatar Dave Hawkes Committed by Alexandre Julliard

Exception handling for SIGFPE must always clear the FPU interrupt

status.
parent 4f356e86
......@@ -443,6 +443,8 @@ static void inline save_fpu( CONTEXT *context, const SIGCONTEXT *sigcontext )
*/
static void inline restore_fpu( CONTEXT *context, const SIGCONTEXT *sigcontext )
{
/* reset the current interrupt status */
context->FloatSave.StatusWord &= context->FloatSave.ControlWord | 0xffffff80;
#ifdef FPU_sig
if (FPU_sig(sigcontext))
{
......@@ -452,7 +454,6 @@ static void inline restore_fpu( CONTEXT *context, const SIGCONTEXT *sigcontext )
#endif /* FPU_sig */
#ifdef __GNUC__
/* avoid nested exceptions */
context->FloatSave.StatusWord &= context->FloatSave.ControlWord | 0xffffff80;
__asm__ __volatile__( "frstor %0; fwait" : : "m" (context->FloatSave) );
#endif /* __GNUC__ */
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment