+ proper spilling support for R_SUBH (i.e. AH,BH,CH,DH) x86 registers in trgx86.do_spill_replace

git-svn-id: trunk@24476 -
This commit is contained in:
nickysn 2013-05-09 11:57:00 +00:00
parent 1358618c36
commit 2a9d38d878

View File

@ -115,6 +115,7 @@ implementation
var
n,replaceoper : longint;
is_subh: Boolean;
begin
result:=false;
with instr do
@ -274,9 +275,12 @@ implementation
{ Replace register with spill reference }
if replaceoper<>-1 then
begin
is_subh:=getsubreg(oper[replaceoper]^.reg)=R_SUBH;
oper[replaceoper]^.typ:=top_ref;
new(oper[replaceoper]^.ref);
oper[replaceoper]^.ref^:=spilltemp;
if is_subh then
inc(oper[replaceoper]^.ref^.offset);
{ memory locations aren't guaranteed to be aligned }
case opcode of
A_MOVAPS: