mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-19 00:39:34 +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;
|
||||
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 }
|
||||
|
||||
@ -1115,6 +1108,10 @@ interface
|
||||
function getansistringdef:tstringdef;
|
||||
function getparaencoding(def:tdef):tstringencoding; inline;
|
||||
|
||||
{$ifdef x86}
|
||||
function default_x86_data_pointer_type: tx86pointertyp;
|
||||
{$endif x86}
|
||||
|
||||
implementation
|
||||
|
||||
uses
|
||||
@ -7491,4 +7488,16 @@ implementation
|
||||
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.
|
||||
|
Loading…
Reference in New Issue
Block a user