Browse Source

+ set pi_do_call on xtensa as well if we check for fpu exceptions
* cosmetics

florian 1 year ago
parent
commit
57f6ed804e
3 changed files with 8 additions and 2 deletions
  1. 3 0
      compiler/xtensa/ncpuadd.pas
  2. 5 0
      compiler/xtensa/ncpuinl.pas
  3. 0 2
      rtl/xtensa/mathu.inc

+ 3 - 0
compiler/xtensa/ncpuadd.pas

@@ -357,6 +357,9 @@ interface
               expectloc:=LOC_FLAGS
               expectloc:=LOC_FLAGS
             else
             else
               expectloc:=LOC_FPUREGISTER;
               expectloc:=LOC_FPUREGISTER;
+
+            if needs_check_for_fpu_exceptions then
+              Include(current_procinfo.flags,pi_do_call);
           end
           end
         else
         else
           result:=first_addfloat_soft;
           result:=first_addfloat_soft;

+ 5 - 0
compiler/xtensa/ncpuinl.pas

@@ -52,6 +52,7 @@ unit ncpuinl;
       defutil,
       defutil,
       hlcgobj,
       hlcgobj,
       pass_2,
       pass_2,
+      procinfo,
       cgbase, cgobj, cgutils,
       cgbase, cgobj, cgutils,
       ncal,nutils,
       ncal,nutils,
       cpubase;
       cpubase;
@@ -96,6 +97,8 @@ unit ncpuinl;
           begin
           begin
             expectloc:=LOC_FPUREGISTER;
             expectloc:=LOC_FPUREGISTER;
             Result:=nil;
             Result:=nil;
+            if needs_check_for_fpu_exceptions then
+              Include(current_procinfo.flags,pi_do_call);
           end
           end
         else
         else
           Result:=inherited first_fma;
           Result:=inherited first_fma;
@@ -177,6 +180,8 @@ unit ncpuinl;
           begin
           begin
             expectloc:=LOC_REGISTER;
             expectloc:=LOC_REGISTER;
             Result:=nil;
             Result:=nil;
+            if needs_check_for_fpu_exceptions then
+              Include(current_procinfo.flags,pi_do_call);
           end
           end
         else
         else
           Result:=inherited first_minmax;
           Result:=inherited first_minmax;

+ 0 - 2
rtl/xtensa/mathu.inc

@@ -54,5 +54,3 @@ procedure ClearExceptions(RaisePending: Boolean = true);
   begin
   begin
     softfloat_exception_flags:=[];
     softfloat_exception_flags:=[];
   end;
   end;
-
-