* cleaned up do_spill_replace()

git-svn-id: trunk@27107 -
This commit is contained in:
Jonas Maebe 2014-03-11 23:19:01 +00:00
parent 92fa75838e
commit 7ea92f48cc

View File

@ -301,11 +301,8 @@ unit rgcpu;
(get_alias(getsupreg(oper[1]^.reg))<>orgreg) then (get_alias(getsupreg(oper[1]^.reg))<>orgreg) then
begin begin
{ str expects the register in oper[0] } { str expects the register in oper[0] }
oper[0]^.typ:=top_reg; instr.loadreg(0,oper[1]^.reg);
oper[0]^.reg:=oper[1]^.reg; instr.loadref(1,spilltemp);
oper[1]^.typ:=top_ref;
new(oper[1]^.ref);
oper[1]^.ref^:=spilltemp;
opcode:=A_STR; opcode:=A_STR;
result:=true; result:=true;
end end
@ -313,9 +310,7 @@ unit rgcpu;
(get_alias(getsupreg(oper[1]^.reg))=orgreg) and (get_alias(getsupreg(oper[1]^.reg))=orgreg) and
(get_alias(getsupreg(oper[0]^.reg))<>orgreg) then (get_alias(getsupreg(oper[0]^.reg))<>orgreg) then
begin begin
oper[1]^.typ:=top_ref; instr.loadref(1,spilltemp);
new(oper[1]^.ref);
oper[1]^.ref^:=spilltemp;
opcode:=A_LDR; opcode:=A_LDR;
result:=true; result:=true;
end; end;