Browse Source

* updated fpu exception causes

git-svn-id: trunk@4179 -
Jonas Maebe 19 years ago
parent
commit
85cdb1315d
2 changed files with 16 additions and 13 deletions
  1. 7 6
      rtl/darwin/i386/sighnd.inc
  2. 9 7
      rtl/darwin/signal.inc

+ 7 - 6
rtl/darwin/i386/sighnd.inc

@@ -24,13 +24,14 @@ begin
     SIGFPE :
       begin
         Case Info.si_code Of
-          FPE_INTDIV : Res:=200;  {integer divide fault. Div0?}
-          FPE_FLTOVF : Res:=205;  {Overflow trap}
-          FPE_FLTUND : Res:=206;  {Stack over/underflow}
-          FPE_FLTRES : Res:=208;  {Device not available}
-          FPE_FLTINV : Res:=207;  {Invalid floating point operation}
+          FPE_INTDIV,             { integer divide by zero -NOTIMP on Mac OS X 10.4.7 }
+          FPE_FLTDIV : Res:=200;  { floating point divide by zero }
+          FPE_FLTOVF : Res:=205;  { floating point overflow }
+          FPE_FLTUND : Res:=206;  { floating point underflow }
+          FPE_FLTRES : Res:=208;  { floating point inexact result }
+          FPE_FLTINV : Res:=207;  { invalid floating point operation }
           Else
-            Res:=207; {coprocessor error}
+            Res:=207; { coprocessor error }
         end;
         { the following is true on ppc, hopefully not on x86 as well }
         { FPU exceptions are completely disabled by the kernel if one occurred, it  }

+ 9 - 7
rtl/darwin/signal.inc

@@ -258,13 +258,15 @@ const
      SV_INTERRUPT = SA_RESTART;
 
 { Codes for SIGFPE }
-     FPE_NOOP      =  0;       { if only I knew... }
-     FPE_FLTDIV    =  1;       { floating point divide by zero }
-     FPE_INTDIV    =  FPE_FLTDIV;
-     FPE_FLTOVF    =  2;       { floating point overflow }
-     FPE_FLTUND    =  3;       { floating point underflow }
-     FPE_FLTRES    =  4;       { floating point inexact result }
-     FPE_FLTINV    =  5;       { invalid floating point operation }
+     FPE_NOOP      =  0;  { if only I knew... }
+     FPE_FLTDIV    =  1;  { floating point divide by zero }
+     FPE_FLTOVF    =  2;  { floating point overflow }
+     FPE_FLTUND    =  3;  { floating point underflow }
+     FPE_FLTRES    =  4;  { floating point inexact result }
+     FPE_FLTINV    =  5;  { invalid floating point operation }
+     FPE_FLTSUB    =  6;  { subscript out of range -NOTIMP on Mac OS X 10.4.7 }
+     FPE_INTDIV    =  7;  { integer divide by zero -NOTIMP on Mac OS X 10.4.7 }
+     FPE_INTOVF    =  8;  { integer overflow -NOTIMP on Mac OS X 10.4.7 }