mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-28 07:31:13 +01:00
+ 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:
parent
17899e92b4
commit
1eb24f9d98
@ -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;
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user