Explorar o código

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

florian %!s(int64=2) %!d(string=hai) anos
pai
achega
f3499cea85
Modificáronse 1 ficheiros con 2 adicións e 2 borrados
  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;