* tcgx86.make_simple_ref: in i8086 memory models with DS<>SS, add an SS: segment

override when converting SP-relative references to use a general purpose
  register

git-svn-id: trunk@27473 -
This commit is contained in:
nickysn 2014-04-05 08:56:40 +00:00
parent adc8cdb5af
commit ee20ecfcf2

View File

@ -607,6 +607,9 @@ unit cgx86;
href.base:=getaddressregister(list);
{ let the register allocator find a suitable register for the reference }
list.Concat(Taicpu.op_reg_reg(A_MOV, S_W, NR_SP, href.base));
{ if DS<>SS in the current memory model, we need to add an SS: segment override as well }
if (ref.segment=NR_NO) and not segment_regs_equal(NR_DS,NR_SS) then
href.segment:=NR_SS;
ref:=href;
end;