浏览代码

* estimate complexity of ordconst node better on RiscV

florian 11 月之前
父节点
当前提交
dd26c1502c
共有 1 个文件被更改,包括 4 次插入0 次删除
  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
                     result:=2;
 {$endif ARM}
+{$ifdef RISCV}
+                  if not(is_imm12(aint(tordconstnode(p).value.svalue))) then
+                    result:=2;
+{$endif RISCV}
                   exit;
                 end;
               exitn: