diff --git a/compiler/defutil.pas b/compiler/defutil.pas index 7b7a944d49..ab84dfc00c 100644 --- a/compiler/defutil.pas +++ b/compiler/defutil.pas @@ -331,14 +331,6 @@ interface { returns true of def is a methodpointer } function is_methodpointer(def : tdef) : boolean; -{$ifdef i8086} - {# Returns true if p is a far pointer def } - function is_farpointer(p : tdef) : boolean; - - {# Returns true if p is a huge pointer def } - function is_hugepointer(p : tdef) : boolean; -{$endif i8086} - implementation uses @@ -1433,18 +1425,4 @@ implementation result:=(def.typ=procvardef) and (po_methodpointer in tprocvardef(def).procoptions); end; -{$ifdef i8086} - { true if p is a far pointer def } - function is_farpointer(p : tdef) : boolean; - begin - result:=(p.typ=pointerdef) and (tcpupointerdef(p).x86pointertyp=x86pt_far); - end; - - { true if p is a huge pointer def } - function is_hugepointer(p : tdef) : boolean; - begin - result:=(p.typ=pointerdef) and (tcpupointerdef(p).x86pointertyp=x86pt_huge); - end; -{$endif i8086} - end. diff --git a/compiler/i8086/n8086add.pas b/compiler/i8086/n8086add.pas index bc1feed76b..6e99387d3e 100644 --- a/compiler/i8086/n8086add.pas +++ b/compiler/i8086/n8086add.pas @@ -55,7 +55,7 @@ interface uses globtype,systems, cutils,verbose,globals,constexp,pass_1, - symconst,symdef,symtype,paramgr,defutil, + symconst,symdef,symtype,symcpu,paramgr,defutil, aasmbase,aasmtai,aasmdata,aasmcpu, cgbase,procinfo, ncal,ncon,nset,cgutils,tgobj, diff --git a/compiler/i8086/n8086inl.pas b/compiler/i8086/n8086inl.pas index e369f53c7f..8329e6b6af 100644 --- a/compiler/i8086/n8086inl.pas +++ b/compiler/i8086/n8086inl.pas @@ -51,7 +51,7 @@ implementation symconst, defutil, aasmbase,aasmtai,aasmdata,aasmcpu, - symtype,symdef, + symtype,symdef,symcpu, cgbase,pass_2, cpuinfo,cpubase,paramgr, nbas,ncon,ncal,ncnv,nld,ncgutil, diff --git a/compiler/i8086/n8086tcon.pas b/compiler/i8086/n8086tcon.pas index 0d4a735322..4a10b94615 100644 --- a/compiler/i8086/n8086tcon.pas +++ b/compiler/i8086/n8086tcon.pas @@ -42,7 +42,7 @@ interface implementation uses - ncnv,defcmp,defutil,aasmtai; + ncnv,defcmp,defutil,aasmtai,symcpu; { ti8086typedconstbuilder } diff --git a/compiler/i8086/symcpu.pas b/compiler/i8086/symcpu.pas index e7a5c23ab9..f734a1b278 100644 --- a/compiler/i8086/symcpu.pas +++ b/compiler/i8086/symcpu.pas @@ -210,6 +210,11 @@ const function is_proc_far(p: tabstractprocdef): boolean; + {# Returns true if p is a far pointer def } + function is_farpointer(p : tdef) : boolean; + + {# Returns true if p is a huge pointer def } + function is_hugepointer(p : tdef) : boolean; implementation @@ -227,6 +232,17 @@ implementation internalerror(2014041301); end; + { true if p is a far pointer def } + function is_farpointer(p : tdef) : boolean; + begin + result:=(p.typ=pointerdef) and (tcpupointerdef(p).x86pointertyp=x86pt_far); + end; + + { true if p is a huge pointer def } + function is_hugepointer(p : tdef) : boolean; + begin + result:=(p.typ=pointerdef) and (tcpupointerdef(p).x86pointertyp=x86pt_huge); + end; {**************************************************************************** tcpuarraydef