+ allow far procedures and functions in the tiny, small and compact i8086 memory

models. Even though, they generate less efficient code, they are useful when
  interacting with external APIs (e.g. declaring callbacks for the Win16 API).

git-svn-id: trunk@38726 -
This commit is contained in:
nickysn 2018-04-10 13:26:14 +00:00
parent 55386ba547
commit dcdd498524

View File

@ -366,17 +366,13 @@ implementation
procedure tcpuprocdef.declared_far;
begin
if current_settings.x86memorymodel in x86_far_code_models then
include(procoptions,po_far)
else
inherited declared_far;
include(procoptions,po_far);
end;
procedure tcpuprocdef.declared_near;
begin
if (current_settings.x86memorymodel in x86_far_code_models) and
not (cs_huge_code in current_settings.moduleswitches) then
if not (cs_huge_code in current_settings.moduleswitches) then
exclude(procoptions,po_far)
else
inherited declared_near;
@ -403,7 +399,8 @@ implementation
function tcpuprocdef.is_far: boolean;
begin
result:=(po_exports in procoptions) or
((current_settings.x86memorymodel in x86_far_code_models) and ((po_far in procoptions) or default_far));
(po_far in procoptions) or
((current_settings.x86memorymodel in x86_far_code_models) and default_far);
end;
{****************************************************************************