Browse Source

* patch by Nico Erfurth: Fix for MovStrMov Peephole optimizer on ARM
The loop checked for the wrong instruction for .opcode = A_STR. Making
the whole optimizer non functional but at least not destructive.

git-svn-id: trunk@21508 -

florian 13 years ago
parent
commit
8cae4c9f23
1 changed files with 2 additions and 3 deletions
  1. 2 3
      compiler/arm/aoptcpu.pas

+ 2 - 3
compiler/arm/aoptcpu.pas

@@ -442,9 +442,8 @@ Implementation
                        (taicpu(p).oper[1]^.typ = top_const) and
                        GetNextInstruction(p,hp1) then
                       begin
-                        while (tai(p).typ = ait_instruction) and
-                              (taicpu(p).opcode = A_STR) and
-                              MatchOperand(taicpu(hp1).oper[0]^, taicpu(p).oper[0]^) and
+                        while MatchInstruction(hp1, A_STR, [taicpu(p).condition], []) and
+                              MatchOperand(taicpu(p).oper[0]^, taicpu(hp1).oper[0]^) and
                               GetNextInstruction(hp1, hp2) and
                               MatchInstruction(hp2, A_MOV, [taicpu(p).condition], [PF_None]) and
                               (taicpu(hp2).ops = 2) and