mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-22 21:29:28 +02:00
* don't load a spilled register between mov lr,pc mov pc,<reg>
git-svn-id: trunk@6273 -
This commit is contained in:
parent
2167655902
commit
b16b9d5251
@ -58,6 +58,20 @@ unit rgcpu;
|
|||||||
l : tasmlabel;
|
l : tasmlabel;
|
||||||
hreg : tregister;
|
hreg : tregister;
|
||||||
begin
|
begin
|
||||||
|
{ don't load spilled register between
|
||||||
|
mov lr,pc
|
||||||
|
mov pc,r4
|
||||||
|
but befure the mov lr,pc
|
||||||
|
}
|
||||||
|
if assigned(pos.previous) and
|
||||||
|
(pos.typ=ait_instruction) and
|
||||||
|
(taicpu(pos).opcode=A_MOV) and
|
||||||
|
(taicpu(pos).oper[0]^.typ=top_reg) and
|
||||||
|
(taicpu(pos).oper[0]^.reg=NR_R14) and
|
||||||
|
(taicpu(pos).oper[1]^.typ=top_reg) and
|
||||||
|
(taicpu(pos).oper[1]^.reg=NR_PC) then
|
||||||
|
pos:=tai(pos.previous);
|
||||||
|
|
||||||
if abs(spilltemp.offset)>4095 then
|
if abs(spilltemp.offset)>4095 then
|
||||||
begin
|
begin
|
||||||
helplist:=TAsmList.create;
|
helplist:=TAsmList.create;
|
||||||
|
Loading…
Reference in New Issue
Block a user