Ver Fonte

+ introduce po_hasnearfarcallmodel (specifies that the near/far call model was
specified explicitly). This will be useful, when we implement an automatic
call model selection optimization.

git-svn-id: trunk@38732 -

nickysn há 7 anos atrás
pai
commit
42ebdbe277
2 ficheiros alterados com 15 adições e 3 exclusões
  1. 13 3
      compiler/i8086/symcpu.pas
  2. 2 0
      compiler/symconst.pas

+ 13 - 3
compiler/i8086/symcpu.pas

@@ -368,13 +368,17 @@ implementation
   procedure tcpuprocdef.declared_far;
     begin
       include(procoptions,po_far);
+      include(procoptions,po_hasnearfarcallmodel);
     end;
 
 
   procedure tcpuprocdef.declared_near;
     begin
       if not (cs_huge_code in current_settings.moduleswitches) then
-        exclude(procoptions,po_far)
+        begin
+          exclude(procoptions,po_far);
+          include(procoptions,po_hasnearfarcallmodel);
+        end
       else
         inherited declared_near;
     end;
@@ -473,7 +477,10 @@ implementation
   procedure tcpuprocvardef.declared_far;
     begin
       if is_addressonly then
-        include(procoptions,po_far)
+        begin
+          include(procoptions,po_far);
+          include(procoptions,po_hasnearfarcallmodel);
+        end
       else
         inherited;
     end;
@@ -482,7 +489,10 @@ implementation
   procedure tcpuprocvardef.declared_near;
     begin
       if is_addressonly then
-        exclude(procoptions,po_far)
+        begin
+          exclude(procoptions,po_far);
+          include(procoptions,po_hasnearfarcallmodel);
+        end
       else
         inherited;
     end;

+ 2 - 0
compiler/symconst.pas

@@ -400,6 +400,8 @@ type
     po_auto_raised_visibility,
     { procedure is far (x86 only) }
     po_far,
+    { near/far call model is specified explicitly (x86 only) }
+    po_hasnearfarcallmodel,
     { the procedure never returns, this information is usefull for dfa }
     po_noreturn,
     { procvar is a function reference }