Browse Source

Disable one peephole optimization for Thumb

git-svn-id: trunk@24635 -
Jeppe Johansen 12 năm trước cách đây
mục cha
commit
c4263ced51
1 tập tin đã thay đổi với 2 bổ sung1 xóa
  1. 2 1
      compiler/arm/aoptcpu.pas

+ 2 - 1
compiler/arm/aoptcpu.pas

@@ -443,7 +443,8 @@ Implementation
         not(RegModifiedBetween(taicpu(hp1).oper[0]^.reg,p,hp1)) and
         not(RegModifiedBetween(taicpu(hp1).oper[0]^.reg,p,hp1)) and
         { don't apply the optimization if the (new) index register is loaded }
         { don't apply the optimization if the (new) index register is loaded }
         (p.oper[0]^.reg<>taicpu(hp1).oper[2]^.reg) and
         (p.oper[0]^.reg<>taicpu(hp1).oper[2]^.reg) and
-        not(RegModifiedBetween(taicpu(hp1).oper[2]^.reg,p,hp1)) then
+        not(RegModifiedBetween(taicpu(hp1).oper[2]^.reg,p,hp1)) and
+        not(current_settings.cputype in cpu_thumb) then
         begin
         begin
           DebugMsg('Peephole Str/LdrAdd/Sub2Str/Ldr Postindex done', p);
           DebugMsg('Peephole Str/LdrAdd/Sub2Str/Ldr Postindex done', p);
           p.oper[1]^.ref^.addressmode:=AM_POSTINDEXED;
           p.oper[1]^.ref^.addressmode:=AM_POSTINDEXED;