mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-16 12:19:30 +02:00
+ 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:
parent
55386ba547
commit
dcdd498524
@ -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;
|
||||
|
||||
{****************************************************************************
|
||||
|
Loading…
Reference in New Issue
Block a user