* do not do the RedundantMovProcess optimization when the involved registers are r13 or r15 and if the target is arm thumb(2)

git-svn-id: trunk@25348 -
This commit is contained in:
florian 2013-08-23 15:22:53 +00:00
parent b4c7b40049
commit d5ddf39f73

View File

@ -1084,7 +1084,12 @@ Implementation
will also be in hp1 then.
}
if (taicpu(hp1).ops > I) and
MatchOperand(taicpu(p).oper[0]^, taicpu(hp1).oper[I]^.reg) then
MatchOperand(taicpu(p).oper[0]^, taicpu(hp1).oper[I]^.reg) and
{ prevent certain combinations on thumb(2), this is only a safe approximation }
(not(current_settings.cputype in cpu_thumb+cpu_thumb2) or
((getsupreg(taicpu(p).oper[1]^.reg)<>RS_R13) and
(getsupreg(taicpu(p).oper[1]^.reg)<>RS_R15))
) then
begin
DebugMsg('Peephole RedundantMovProcess done', hp1);
taicpu(hp1).oper[I]^.reg := taicpu(p).oper[1]^.reg;