mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-20 21:09:24 +02:00
* 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:
parent
d89b742109
commit
4e2de05667
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user