mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 12:19:30 +02:00
* in the i8086 load node, when generating static/global var access to variables
in the default data segment, set their treference.segment to NR_DS, in order to avoid creating redundant segment relocations to the default data segment (which is a problem with win16 multiple instance applications). Redundant segment overrides are stripped later anyway, so it doesn't hurt the generated code. git-svn-id: trunk@37715 -
This commit is contained in:
parent
b41dafa618
commit
8d18dafe34
@ -207,14 +207,13 @@ implementation
|
||||
{ Normal (or external) variable }
|
||||
else
|
||||
begin
|
||||
if (current_settings.x86memorymodel<>mm_huge) and not (vo_is_far in gvs.varoptions) then
|
||||
begin
|
||||
inherited pass_generate_code;
|
||||
exit;
|
||||
end;
|
||||
if not (vo_is_external in gvs.varoptions) and gvs.Owner.iscurrentunit then
|
||||
if ((current_settings.x86memorymodel<>mm_huge) and not (vo_is_far in gvs.varoptions)) or
|
||||
(not (vo_is_external in gvs.varoptions) and gvs.Owner.iscurrentunit) then
|
||||
begin
|
||||
inherited pass_generate_code;
|
||||
if (location.loc<>LOC_REFERENCE) and (location.loc<>LOC_CREFERENCE) then
|
||||
internalerror(2017121101);
|
||||
location.reference.segment:=NR_DS;
|
||||
exit;
|
||||
end;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user