* don't apply the AddSubLdr2Ldr optimization if the base register in the reference is used/modified during the ldr/str

git-svn-id: trunk@22222 -
This commit is contained in:
florian 2012-08-23 21:04:11 +00:00
parent d89b742109
commit 4e2de05667

View File

@ -983,6 +983,8 @@ Implementation
(MatchInstruction(hp1, A_LDR, [C_None], []) or
MatchInstruction(hp1, A_STR, [C_None], [])) and
(taicpu(hp1).oper[1]^.ref^.base=taicpu(p).oper[0]^.reg) and
{ don't optimize if the register is stored/overwritten }
(taicpu(hp1).oper[0]^.reg<>taicpu(p).oper[1]^.reg) and
(taicpu(hp1).oper[1]^.ref^.index=NR_NO) and
(taicpu(hp1).oper[1]^.ref^.addressmode=AM_OFFSET) and
{ new offset must be valid: either in the range of 8 or 12 bit, depend on the