Browse Source

* MIPS: don't generate FPU code for int to real conversion when FPU emulation is enabled

Nikolay Nikolov 10 months ago
parent
commit
b077d17cdd
1 changed files with 5 additions and 0 deletions
  1. 5 0
      compiler/mips/ncpucnv.pas

+ 5 - 0
compiler/mips/ncpucnv.pas

@@ -74,6 +74,11 @@ function tmipseltypeconvnode.first_int_to_real: tnode;
 var
   fname: string[19];
 begin
+  if cs_fp_emulation in current_settings.moduleswitches then
+    begin
+      result:=inherited;
+      exit;
+    end;
   { converting a 64bit integer to a float requires a helper }
   if is_64bitint(left.resultdef) or
      is_currency(left.resultdef) then