mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 02:32:51 +02:00
* patch by J. Gareth Moreton: x86: Lea2Nop for stack pointer, resolves #39225
git-svn-id: trunk@49612 -
This commit is contained in:
parent
1c13db554c
commit
2629bd7ba9
@ -3742,8 +3742,15 @@ unit aoptx86;
|
||||
{ changes "lea (%reg1), %reg2" into "mov %reg1, %reg2" }
|
||||
if (taicpu(p).oper[0]^.ref^.base <> NR_NO) and
|
||||
(taicpu(p).oper[0]^.ref^.index = NR_NO) and
|
||||
{ do not mess with leas acessing the stack pointer }
|
||||
(taicpu(p).oper[1]^.reg <> NR_STACK_POINTER_REG) and
|
||||
(
|
||||
{ do not mess with leas accessing the stack pointer
|
||||
unless it's a null operation }
|
||||
(taicpu(p).oper[1]^.reg <> NR_STACK_POINTER_REG) or
|
||||
(
|
||||
(taicpu(p).oper[0]^.ref^.base = NR_STACK_POINTER_REG) and
|
||||
(taicpu(p).oper[0]^.ref^.offset = 0)
|
||||
)
|
||||
) and
|
||||
(not(Assigned(taicpu(p).oper[0]^.ref^.Symbol))) then
|
||||
begin
|
||||
if (taicpu(p).oper[0]^.ref^.offset = 0) then
|
||||
|
Loading…
Reference in New Issue
Block a user