Browse Source

* use a better way (suggested by Jonas) to determine whether a procedure is from
the same unit

git-svn-id: trunk@27629 -

nickysn 11 years ago
parent
commit
313240b9e8
1 changed files with 1 additions and 1 deletions
  1. 1 1
      compiler/i8086/hlcgcpu.pas

+ 1 - 1
compiler/i8086/hlcgcpu.pas

@@ -265,7 +265,7 @@ implementation
           { far calls to the same module (in $HUGECODE off mode) can be optimized
           { far calls to the same module (in $HUGECODE off mode) can be optimized
             to push cs + call near, because they are in the same segment }
             to push cs + call near, because they are in the same segment }
           if not (cs_huge_code in current_settings.moduleswitches) and
           if not (cs_huge_code in current_settings.moduleswitches) and
-                 (pd.procsym.owner=current_module.localsymtable) then
+             pd.owner.iscurrentunit and not (po_external in pd.procoptions) then
             begin
             begin
               list.concat(Taicpu.Op_reg(A_PUSH,S_W,NR_CS));
               list.concat(Taicpu.Op_reg(A_PUSH,S_W,NR_CS));
               tcg8086(cg).a_call_name_near(list,s,weak);
               tcg8086(cg).a_call_name_near(list,s,weak);