Преглед на файлове

* FCVT.W.D returns only a 32 bit int

florian преди 1 година
родител
ревизия
8dcf4e62b7
променени са 1 файла, в които са добавени 10 реда и са изтрити 2 реда
  1. 10 2
      compiler/riscv/nrvinl.pas

+ 10 - 2
compiler/riscv/nrvinl.pas

@@ -117,7 +117,11 @@ implementation
 
      function trvinlinenode.first_round_real: tnode;
        begin
-         if (current_settings.fputype >= fpu_fd) then
+         if
+{$ifdef RISCV32}
+           is_32bitint(resultdef) and
+{$endif RISCV32}
+           (current_settings.fputype >= fpu_fd) then
            begin
              expectloc:=LOC_FPUREGISTER;
              first_round_real := nil;
@@ -131,7 +135,11 @@ implementation
 
      function trvinlinenode.first_trunc_real: tnode;
        begin
-         if (current_settings.fputype >= fpu_fd) then
+         if
+{$ifdef RISCV32}
+           is_32bitint(resultdef) and
+{$endif RISCV32}
+           (current_settings.fputype >= fpu_fd) then
            begin
              expectloc:=LOC_FPUREGISTER;
              first_trunc_real := nil;