瀏覽代碼

Reset FPU state in SignalToRunError for SIGFPE, fixes tw12214 failure

git-svn-id: trunk@29552 -
pierre 10 年之前
父節點
當前提交
817555cd6e
共有 1 個文件被更改,包括 9 次插入1 次删除
  1. 9 1
      rtl/solaris/i386/sighnd.inc

+ 9 - 1
rtl/solaris/i386/sighnd.inc

@@ -61,7 +61,15 @@ begin
               res:=207;
               res:=207;
          end;
          end;
          with sigcontext^.uc_mcontext.fpregs.fpchip_state do
          with sigcontext^.uc_mcontext.fpregs.fpchip_state do
-           status:=status and not FPU_ExceptionMask;
+           begin
+             status:=status and not FPU_ExceptionMask;
+             { Control word is index 0 }
+             state[0]:=Default8087CW;
+             { Status word is also index 1 }
+             state[1]:=status;
+             { Tag word is index 2 }
+             state[2]:=$ffff;
+          end;
        end;
        end;
    SIGILL:
    SIGILL:
        if sse_check then
        if sse_check then