+ remove the segment prefix in make_simple_ref on i8086, in case it is the same

as the default segment for the reference (SS for BP-relative, DS for all
  others)

git-svn-id: trunk@27687 -
This commit is contained in:
nickysn 2014-04-29 23:11:10 +00:00
parent 17899e92b4
commit 1eb24f9d98

View File

@ -619,6 +619,15 @@ unit cgx86;
list.concat(taicpu.op_reg_reg(A_MOV,S_W,ref.segment,NR_ES));
ref.segment:=NR_ES;
end;
{ can the segment override be dropped? }
if ref.segment<>NR_NO then
begin
if (ref.base=NR_BP) and segment_regs_equal(ref.segment,NR_SS) then
ref.segment:=NR_NO;
if (ref.base<>NR_BP) and segment_regs_equal(ref.segment,NR_DS) then
ref.segment:=NR_NO;
end;
{$endif}
end;