소스 검색

Fix minor bug in peephole optimizer.

git-svn-id: trunk@32748 -
Jeppe Johansen 9 년 전
부모
커밋
803f402bf8
1개의 변경된 파일3개의 추가작업 그리고 0개의 파일을 삭제
  1. 3 0
      compiler/arm/aoptcpu.pas

+ 3 - 0
compiler/arm/aoptcpu.pas

@@ -1442,6 +1442,9 @@ Implementation
                            (not GenerateThumb2Code)
                          )
                        ) and
+                       { Only fold if both registers are used. Otherwise we are folding p with itself }
+                       (taicpu(hp1).oper[1]^.ref^.index<>NR_NO) and
+                       (taicpu(hp1).oper[1]^.ref^.base<>NR_NO) and
                        { Only fold if there isn't another shifterop already, and offset is zero. }
                        (taicpu(hp1).oper[1]^.ref^.offset = 0) and
                        (taicpu(hp1).oper[1]^.ref^.shiftmode = SM_None) and