mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-12 10:09:08 +02:00
* strip segment overrides, for segments, which should be equal in the current
model to the default segment of the reference in optimize_ref, when inlineasm=false git-svn-id: trunk@37511 -
This commit is contained in:
parent
d220d6f2c6
commit
875339993f
@ -1878,7 +1878,9 @@ implementation
|
||||
else
|
||||
ss_equals_ds:=segment_regs_equal(NR_DS,NR_SS);
|
||||
{ remove redundant segment overrides }
|
||||
if (ref.segment<>NR_NO) and (ref.segment=get_default_segment_of_ref(ref)) then
|
||||
if (ref.segment<>NR_NO) and
|
||||
((inlineasm and (ref.segment=get_default_segment_of_ref(ref))) or
|
||||
((not inlineasm) and (segment_regs_equal(ref.segment,get_default_segment_of_ref(ref))))) then
|
||||
ref.segment:=NR_NO;
|
||||
if not is_16_bit_ref(ref) then
|
||||
begin
|
||||
@ -1906,7 +1908,9 @@ implementation
|
||||
end;
|
||||
end;
|
||||
{ remove redundant segment overrides again }
|
||||
if (ref.segment<>NR_NO) and (ref.segment=get_default_segment_of_ref(ref)) then
|
||||
if (ref.segment<>NR_NO) and
|
||||
((inlineasm and (ref.segment=get_default_segment_of_ref(ref))) or
|
||||
((not inlineasm) and (segment_regs_equal(ref.segment,get_default_segment_of_ref(ref))))) then
|
||||
ref.segment:=NR_NO;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user