mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-22 08:29:29 +02:00
+ added constructors tai_const.Create_int_codeptr and .Create_int_dataptr. To be
used for emitting magic consts with the size of a code or data pointer (used in e.g. rtti data). git-svn-id: trunk@28724 -
This commit is contained in:
parent
1e0a69fa7f
commit
27a7c0863b
@ -579,6 +579,8 @@ interface
|
||||
constructor Create_type_name(_typ:taiconst_type;const name:string;_symtyp:Tasmsymtype;ofs:aint);
|
||||
constructor Create_nil_codeptr;
|
||||
constructor Create_nil_dataptr;
|
||||
constructor Create_int_codeptr(_value: int64);
|
||||
constructor Create_int_dataptr(_value: int64);
|
||||
constructor ppuload(t:taitype;ppufile:tcompilerppufile);override;
|
||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||
procedure derefimpl;override;
|
||||
@ -1780,6 +1782,40 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
constructor tai_const.Create_int_codeptr(_value: int64);
|
||||
begin
|
||||
inherited Create;
|
||||
typ:=ait_const;
|
||||
{$ifdef i8086}
|
||||
if current_settings.x86memorymodel in x86_far_code_models then
|
||||
consttype:=aitconst_farptr
|
||||
else
|
||||
{$endif i8086}
|
||||
consttype:=aitconst_ptr;
|
||||
sym:=nil;
|
||||
endsym:=nil;
|
||||
symofs:=0;
|
||||
value:=_value;
|
||||
end;
|
||||
|
||||
|
||||
constructor tai_const.Create_int_dataptr(_value: int64);
|
||||
begin
|
||||
inherited Create;
|
||||
typ:=ait_const;
|
||||
{$ifdef i8086}
|
||||
if current_settings.x86memorymodel in x86_far_data_models then
|
||||
consttype:=aitconst_farptr
|
||||
else
|
||||
{$endif i8086}
|
||||
consttype:=aitconst_ptr;
|
||||
sym:=nil;
|
||||
endsym:=nil;
|
||||
symofs:=0;
|
||||
value:=_value;
|
||||
end;
|
||||
|
||||
|
||||
constructor tai_const.ppuload(t:taitype;ppufile:tcompilerppufile);
|
||||
begin
|
||||
inherited ppuload(t,ppufile);
|
||||
|
Loading…
Reference in New Issue
Block a user