Parcourir la source

* completed post/pre inc/decrement addressing mode instructions in TAoptBaseCpu.RegModifiedByInstruction

florian il y a 2 ans
Parent
commit
f3499cea85
1 fichiers modifiés avec 2 ajouts et 2 suppressions
  1. 2 2
      compiler/avr/aoptcpub.pas

+ 2 - 2
compiler/avr/aoptcpub.pas

@@ -140,14 +140,14 @@ Implementation
           exit;
         end;
 
-      If (taicpu(p1).opcode=A_LD) and
+      If (taicpu(p1).opcode in [A_LD,A_LPM,A_ELPM]) and
         (taicpu(p1).oper[1]^.ref^.addressmode in [AM_POSTINCREMENT,AM_PREDECREMENT]) and (taicpu(p1).oper[1]^.ref^.base=reg) then
         begin
           Result:=true;
           exit;
         end;
 
-      If (taicpu(p1).opcode=A_ST) and
+      If (taicpu(p1).opcode in [A_ST,A_SPM]) and
         (taicpu(p1).oper[0]^.ref^.addressmode in [AM_POSTINCREMENT,AM_PREDECREMENT]) and (taicpu(p1).oper[0]^.ref^.base=reg) then
         begin
           Result:=true;