Browse Source

* patch by Nico Erfurth: adds a check for SM_ASR to also support removal of unnecessary sign extension before STRH.

git-svn-id: trunk@21446 -
florian 13 years ago
parent
commit
3ae5fc8c04
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/arm/aoptcpu.pas

+ 1 - 1
compiler/arm/aoptcpu.pas

@@ -374,7 +374,7 @@ Implementation
                         }
                         }
                         if (taicpu(p).oper[2]^.shifterop^.shiftmode=SM_LSL) and
                         if (taicpu(p).oper[2]^.shifterop^.shiftmode=SM_LSL) and
                           (taicpu(p).oper[2]^.shifterop^.shiftimm=16) and
                           (taicpu(p).oper[2]^.shifterop^.shiftimm=16) and
-                          (taicpu(hp1).oper[2]^.shifterop^.shiftmode=SM_LSR) and
+                          (taicpu(hp1).oper[2]^.shifterop^.shiftmode in [SM_LSR,SM_ASR]) and
                           (taicpu(hp1).oper[2]^.shifterop^.shiftimm=16) and
                           (taicpu(hp1).oper[2]^.shifterop^.shiftimm=16) and
                           getnextinstruction(hp1,hp2) and
                           getnextinstruction(hp1,hp2) and
                           MatchInstruction(hp2, A_STR, [taicpu(p).condition], [PF_H]) and
                           MatchInstruction(hp2, A_STR, [taicpu(p).condition], [PF_H]) and