Преглед изворни кода

Avoid generation of invalid 'cb(n)z sp,label' instruction

Pierre Muller пре 2 година
родитељ
комит
cd8aa3f0e0
1 измењених фајлова са 1 додато и 0 уклоњено
  1. 1 0
      compiler/aarch64/aoptcpu.pas

+ 1 - 0
compiler/aarch64/aoptcpu.pas

@@ -996,6 +996,7 @@ Implementation
          cb(n)z reg0,label
       }
       if MatchOpType(taicpu(p),top_reg,top_const) and
+        (taicpu(p).oper[0]^.reg<>NR_SP) and
         (taicpu(p).oper[1]^.val=0) and
         GetNextInstruction(p,hp1) and
         MatchInstruction(hp1,A_B,[PF_None]) and