Browse Source

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

florian 2 years ago
parent
commit
a221f2af79
1 changed files with 2 additions and 2 deletions
  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;