mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-20 19:30:30 +02:00
+ replace 'ld orgreg,const' with 'ld spilltemp,const' in trgcpu.do_spill_replace
git-svn-id: branches/z80@44536 -
This commit is contained in:
parent
fe3f4a7447
commit
a58bab4318
@ -183,6 +183,17 @@ unit rgcpu;
|
|||||||
opcode:=A_LD;
|
opcode:=A_LD;
|
||||||
result:=true;
|
result:=true;
|
||||||
end;
|
end;
|
||||||
|
end
|
||||||
|
{ Replace 'ld orgreg,const' with 'ld spilltemp,const' }
|
||||||
|
else if (opcode=A_LD) and (ops=2) and (oper[1]^.typ=top_const) and (oper[0]^.typ=top_reg) then
|
||||||
|
begin
|
||||||
|
if (getregtype(oper[0]^.reg)=regtype) and
|
||||||
|
(get_alias(getsupreg(oper[0]^.reg))=orgreg) then
|
||||||
|
begin
|
||||||
|
instr.loadref(0,spilltemp);
|
||||||
|
opcode:=A_LD;
|
||||||
|
result:=true;
|
||||||
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
Loading…
Reference in New Issue
Block a user