mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 09:06:02 +02:00
+ default_x86_data_pointer_type implemented as function that returns the proper
type in far data memory models git-svn-id: trunk@26928 -
This commit is contained in:
parent
a7117a6157
commit
75134c2a26
@ -196,13 +196,6 @@ interface
|
|||||||
procedure deref;override;
|
procedure deref;override;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{$ifdef x86}
|
|
||||||
const
|
|
||||||
{ TODO: make this depend on the memory model, when other memory models are supported }
|
|
||||||
default_x86_data_pointer_type = x86pt_near;
|
|
||||||
|
|
||||||
type
|
|
||||||
{$endif x86}
|
|
||||||
|
|
||||||
{ tpointerdef }
|
{ tpointerdef }
|
||||||
|
|
||||||
@ -1115,6 +1108,10 @@ interface
|
|||||||
function getansistringdef:tstringdef;
|
function getansistringdef:tstringdef;
|
||||||
function getparaencoding(def:tdef):tstringencoding; inline;
|
function getparaencoding(def:tdef):tstringencoding; inline;
|
||||||
|
|
||||||
|
{$ifdef x86}
|
||||||
|
function default_x86_data_pointer_type: tx86pointertyp;
|
||||||
|
{$endif x86}
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
@ -7491,4 +7488,16 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
{$ifdef x86}
|
||||||
|
function default_x86_data_pointer_type: tx86pointertyp;
|
||||||
|
begin
|
||||||
|
{$ifdef i8086}
|
||||||
|
if current_settings.x86memorymodel in x86_far_data_models then
|
||||||
|
result:=x86pt_far
|
||||||
|
else
|
||||||
|
{$endif i8086}
|
||||||
|
result:=x86pt_near;
|
||||||
|
end;
|
||||||
|
{$endif x86}
|
||||||
|
|
||||||
end.
|
end.
|
||||||
|
Loading…
Reference in New Issue
Block a user