Просмотр исходного кода

Use RTE 207 for FPU_Invalid and FPU_Denormal exceptions on i386/x86_64 beos/haiku/*bsd as for Linux

git-svn-id: trunk@47227 -
pierre 4 лет назад
Родитель
Сommit
8a543dbc8a

+ 1 - 1
rtl/beos/i386/sighnd.inc

@@ -43,7 +43,7 @@ begin
             else if (FpuState and FPU_Underflow)<>0 then
               res:=206
             else if (FpuState and FPU_Denormal)<>0 then
-              res:=216
+              res:=207
             else
               res:=207;  {'Coprocessor Error'}
           end;

+ 2 - 2
rtl/freebsd/i386/sighnd.inc

@@ -28,9 +28,9 @@ begin
                 FPE_FLTOVF : Res:=205;  {Overflow trap}
                 FPE_FLTUND : Res:=206;  {Stack over/underflow}
                 FPE_FLTRES : Res:=216;  {Device not available}
-                FPE_FLTINV : Res:=216;  {Invalid floating point operation}
+                FPE_FLTINV : Res:=207;  {Invalid floating point operation}
                Else
-                Res:=208; {coprocessor error}
+                Res:=207; {coprocessor error}
                 End;
              sysResetFPU;
           End;

+ 2 - 2
rtl/freebsd/x86_64/sighnd.inc

@@ -28,9 +28,9 @@ begin
                 FPE_FLTOVF : Res:=205;  {Overflow trap}
                 FPE_FLTUND : Res:=206;  {Stack over/underflow}
                 FPE_FLTRES : Res:=216;  {Device not available}
-                FPE_FLTINV : Res:=216;  {Invalid floating point operation}
+                FPE_FLTINV : Res:=207;  {Invalid floating point operation}
                Else
-                Res:=208; {coprocessor error}
+                Res:=207; {coprocessor error}
                 End;
              sysResetFPU;
           End;

+ 1 - 1
rtl/haiku/i386/sighnd.inc

@@ -43,7 +43,7 @@ begin
             else if (FpuState and FPU_Underflow)<>0 then
               res:=206
             else if (FpuState and FPU_Denormal)<>0 then
-              res:=216
+              res:=207
             else
               res:=207;  {'Coprocessor Error'}
           end;

+ 1 - 1
rtl/haiku/x86_64/sighnd.inc

@@ -43,7 +43,7 @@ begin
             else if (FpuState and FPU_Underflow)<>0 then
               res:=206
             else if (FpuState and FPU_Denormal)<>0 then
-              res:=216
+              res:=207
             else
               res:=207;  {'Coprocessor Error'}
           end;

+ 3 - 3
rtl/netbsd/i386/sighnd.inc

@@ -76,12 +76,12 @@ begin
                 res:=205
               else if FpuState = FPE_FltUnd then
                 res:=206
-              { else if FpuState and FPU_Denormal)<>0 then
-                res:=216 }
+              else if FpuState and FPU_Denormal)<>0 then
+                res:=207
               else if FpuState = FPE_FltSub then
                 res:=207
              else if FpuState = FPE_FltInv then
-                res:=216
+                res:=207
               else
                 res:=207;  {'Coprocessor Error'}
             end;

+ 2 - 2
rtl/netbsd/x86_64/sighnd.inc

@@ -79,11 +79,11 @@ begin
               else if (FpuState and FPU_Underflow)<>0 then
                 res:=206
               else if (FpuState and FPU_Denormal)<>0 then
-                res:=216
+                res:=207
               else if (FpuState and (FPU_StackOverflow or FPU_StackUnderflow))<>0 then
                 res:=207
               else if (FpuState and FPU_Invalid)<>0 then
-                res:=216
+                res:=207
               else
                 res:=207;  {'Coprocessor Error'}
             end;

+ 2 - 2
rtl/openbsd/i386/sighnd.inc

@@ -74,11 +74,11 @@ begin
               else if (FpuState and FPU_Underflow)<>0 then
                 res:=206
               else if (FpuState and FPU_Denormal)<>0 then
-                res:=216
+                res:=207
               else if (FpuState and (FPU_StackOverflow or FPU_StackUnderflow))<>0 then
                 res:=207
               else if (FpuState and FPU_Invalid)<>0 then
-                res:=216
+                res:=207
               else
                 res:=207;  {'Coprocessor Error'}
             end;

+ 7 - 7
rtl/openbsd/x86_64/sighnd.inc

@@ -15,7 +15,7 @@
 
 CONST FPU_ALL=$7F;
 
-{$ifdef cpui386}
+{$ifdef cpux86_64}
 function getfpustate(sininfo:psiginfo):longint; {inline;}
 begin
   if ptruint(sininfo)> high(word) then
@@ -27,7 +27,7 @@ end;
 function getaltfpustate(sigcontext:psigcontextrec):longint; {inline;}
 begin
   if assigned(sigcontext) then
-    getaltfpustate:=sigcontext^.sc_fpustate^.en_sw 
+    getaltfpustate:=sigcontext^.sc_fpstate^.fx_fsw 
   else
     getaltfpustate:=0;
 end;
@@ -40,12 +40,12 @@ var
 begin
   res:=0;
 {$ifdef BSD}
-{$ifdef cpui386}
+{$ifdef cpux86_64}
   fpustate:=0;
   asm
     fnstsw fpustate
   end;
-{$endif cpui386}
+{$endif cpux86_64}
 {$endif BSD}
   case sig of
     SIGFPE :
@@ -53,7 +53,7 @@ begin
     { this is not allways necessary but I don't know yet
       how to tell if it is or not PM }
           res:=200;
-{$ifdef cpui386}
+{$ifdef cpux86_64}
           fpustate:=GetaltFPUState(sigcontext);
 {$else}
           fpustate:=0;
@@ -68,11 +68,11 @@ begin
               else if (FpuState and FPU_Underflow)<>0 then
                 res:=206
               else if (FpuState and FPU_Denormal)<>0 then
-                res:=216
+                res:=207
               else if (FpuState and (FPU_StackOverflow or FPU_StackUnderflow))<>0 then
                 res:=207
               else if (FpuState and FPU_Invalid)<>0 then
-                res:=216
+                res:=207
               else
                 res:=207;  {'Coprocessor Error'}
             end;