mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-06-03 13:58:32 +02:00
* 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:
parent
adc8cdb5af
commit
ee20ecfcf2
@ -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;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user