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

* RiscV: more reliable use_fma

florian преди 10 месеца
родител
ревизия
4888442fb4
променени са 1 файла, в които са добавени 4 реда и са изтрити 1 реда
  1. 4 1
      compiler/riscv/nrvadd.pas

+ 4 - 1
compiler/riscv/nrvadd.pas

@@ -339,7 +339,10 @@ implementation
 
     function trvaddnode.use_fma: boolean;
       begin
-        Result:=current_settings.fputype in [fpu_fd];
+        Result:=(is_single(left.resultdef) and is_single(right.resultdef) and
+          (CPURV_HAS_F in cpu_capabilities[current_settings.cputype])) or
+          (is_double(left.resultdef) and is_double(right.resultdef) and
+          (CPURV_HAS_D in cpu_capabilities[current_settings.cputype]));
       end;