Browse Source

* use is_proc_far(procdefinition) instead of the current memory model to
determine whether to issue a near or a far call in ti8086callnode.do_call_ref.
This will allow adding support for near and far procvars in any memory model.

git-svn-id: trunk@38594 -

nickysn 7 years ago
parent
commit
48b57c2f9a
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/i8086/n8086cal.pas

+ 2 - 1
compiler/i8086/n8086cal.pas

@@ -51,6 +51,7 @@ implementation
       aasmtai,aasmdata,aasmcpu,
       ncal,nbas,nmem,nld,ncnv,
       hlcgobj,
+      symcpu,
       cga,cgobj,cgx86,cpuinfo;
 
 
@@ -118,7 +119,7 @@ implementation
 
     function ti8086callnode.do_call_ref(ref: treference): tcgpara;
       begin
-        if current_settings.x86memorymodel in x86_far_code_models then
+        if is_proc_far(procdefinition) then
           current_asmdata.CurrAsmList.concat(taicpu.op_ref(A_CALL,S_FAR,ref))
         else
           current_asmdata.CurrAsmList.concat(taicpu.op_ref(A_CALL,S_NO,ref));