Przeglądaj źródła

* estimate complexity of ordconst node better on RiscV

florian 11 miesięcy temu
rodzic
commit
dd26c1502c
1 zmienionych plików z 4 dodań i 0 usunięć
  1. 4 0
      compiler/nutils.pas

+ 4 - 0
compiler/nutils.pas

@@ -927,6 +927,10 @@ implementation
                   if not(is_shifter_const(aint(tordconstnode(p).value.svalue),dummy)) then
                   if not(is_shifter_const(aint(tordconstnode(p).value.svalue),dummy)) then
                     result:=2;
                     result:=2;
 {$endif ARM}
 {$endif ARM}
+{$ifdef RISCV}
+                  if not(is_imm12(aint(tordconstnode(p).value.svalue))) then
+                    result:=2;
+{$endif RISCV}
                   exit;
                   exit;
                 end;
                 end;
               exitn:
               exitn: