mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-20 11:29:22 +02:00
+ add a CS: override for references without an explicitly set segment override, which are relative to a function entry point
git-svn-id: trunk@32187 -
This commit is contained in:
parent
1eaa77d2f9
commit
92a39c93f5
@ -2007,6 +2007,14 @@ Unit Rax86int;
|
|||||||
if (oper.typesize<>0) and
|
if (oper.typesize<>0) and
|
||||||
(oper.opr.typ in [OPR_REFERENCE,OPR_LOCAL]) then
|
(oper.opr.typ in [OPR_REFERENCE,OPR_LOCAL]) then
|
||||||
oper.SetSize(oper.typesize,true);
|
oper.SetSize(oper.typesize,true);
|
||||||
|
{$ifdef i8086}
|
||||||
|
{ references to a procedure/function entry, without an explicit segment
|
||||||
|
override, are added an CS: override by default (this is Turbo Pascal 7
|
||||||
|
compatible) }
|
||||||
|
if (oper.opr.typ=OPR_REFERENCE) and assigned(oper.opr.ref.symbol) and
|
||||||
|
(oper.opr.ref.symbol.typ=AT_FUNCTION) and (oper.opr.ref.segment=NR_NO) then
|
||||||
|
oper.opr.ref.segment:=NR_CS;
|
||||||
|
{$endif i8086}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user