Browse Source

* MIPS code gen: don't use FPU registers for function parameters in case SoftFPU
is enabled

Nikolay Nikolov 10 months ago
parent
commit
180c23b395
1 changed files with 2 additions and 2 deletions
  1. 2 2
      compiler/mips/cpupara.pas

+ 2 - 2
compiler/mips/cpupara.pas

@@ -550,7 +550,7 @@ implementation
       begin
       begin
         intparareg:=0;
         intparareg:=0;
         intparasize:=0;
         intparasize:=0;
-        can_use_float := true;
+        can_use_float := not ((p.proccalloption in [pocall_softfloat]) or (cs_fp_emulation in current_settings.moduleswitches));
         { Create Function result paraloc }
         { Create Function result paraloc }
         create_funcretloc_info(p,callerside);
         create_funcretloc_info(p,callerside);
         { calculate the registers for the normal parameters }
         { calculate the registers for the normal parameters }
@@ -578,7 +578,7 @@ implementation
       begin
       begin
         intparareg:=0;
         intparareg:=0;
         intparasize:=0;
         intparasize:=0;
-        can_use_float := true;
+        can_use_float := not ((p.proccalloption in [pocall_softfloat]) or (cs_fp_emulation in current_settings.moduleswitches));
         { Create Function result paraloc }
         { Create Function result paraloc }
         create_funcretloc_info(p,side);
         create_funcretloc_info(p,side);
         create_paraloc_info_intern(p,side,p.paras);
         create_paraloc_info_intern(p,side,p.paras);