2
0
Эх сурвалжийг харах

+ 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 -

nickysn 7 жил өмнө
parent
commit
dcdd498524

+ 4 - 7
compiler/i8086/symcpu.pas

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