Henri Verbeet : ntdll: Don't throw masked FPU exceptions.

Alexandre Julliard julliard at winehq.org
Mon Jan 5 10:24:20 CST 2009


Module: wine
Branch: master
Commit: 03468a4f052315c22a426d030dc5edc8c88cde5b
URL:    http://source.winehq.org/git/wine.git/?a=commit;h=03468a4f052315c22a426d030dc5edc8c88cde5b

Author: Henri Verbeet <hverbeet at gmail.com>
Date:   Sun Jan  4 20:38:58 2009 +0100

ntdll: Don't throw masked FPU exceptions.

When an FPU exception is masked the appropriate flag in the status
word will still be set, so get_fpu_code() should mask the exception
flags in the status word with the exception flags in the control word.

---

 dlls/ntdll/signal_i386.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/dlls/ntdll/signal_i386.c b/dlls/ntdll/signal_i386.c
index 08013fb..47788e6 100644
--- a/dlls/ntdll/signal_i386.c
+++ b/dlls/ntdll/signal_i386.c
@@ -1179,7 +1179,7 @@ static inline CONTEXT *get_exception_context( EXCEPTION_RECORD *rec )
  */
 static inline DWORD get_fpu_code( const CONTEXT *context )
 {
-    DWORD status = context->FloatSave.StatusWord;
+    DWORD status = context->FloatSave.StatusWord & ~(context->FloatSave.ControlWord & 0x3f);
 
     if (status & 0x01)  /* IE */
     {




More information about the wine-cvs mailing list