mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-12-16 00:30:44 +01:00
+ added constructors taiconst.Create_sizeint and .Create_sizeint_unaligned. They
create constants, corresponding to the SizeInt type for the current target and are intended to eventually replace .Create_pint, since the pint type is now deprecated (because it does not correspond to the size of a pointer in certain i8086 memory models). git-svn-id: trunk@34620 -
This commit is contained in:
parent
35b2ffa872
commit
710c830859
@ -160,12 +160,18 @@ interface
|
||||
{$if defined(cpu64bitaddr)}
|
||||
aitconst_ptr = aitconst_64bit;
|
||||
aitconst_ptr_unaligned = aitconst_64bit_unaligned;
|
||||
aitconst_sizeint = aitconst_64bit;
|
||||
aitconst_sizeint_unaligned = aitconst_64bit_unaligned;
|
||||
{$elseif defined(cpu32bitaddr)}
|
||||
aitconst_ptr = aitconst_32bit;
|
||||
aitconst_ptr_unaligned = aitconst_32bit_unaligned;
|
||||
aitconst_sizeint = aitconst_32bit;
|
||||
aitconst_sizeint_unaligned = aitconst_32bit_unaligned;
|
||||
{$elseif defined(cpu16bitaddr)}
|
||||
aitconst_ptr = aitconst_16bit;
|
||||
aitconst_ptr_unaligned = aitconst_16bit_unaligned;
|
||||
aitconst_sizeint = aitconst_16bit;
|
||||
aitconst_sizeint_unaligned = aitconst_16bit_unaligned;
|
||||
{$endif}
|
||||
|
||||
{$if defined(cpu64bitalu)}
|
||||
@ -611,6 +617,8 @@ interface
|
||||
constructor Create_aint(_value : aint);
|
||||
constructor Create_pint(_value : pint);
|
||||
constructor Create_pint_unaligned(_value : pint);
|
||||
constructor Create_sizeint(_value : asizeint);
|
||||
constructor Create_sizeint_unaligned(_value : asizeint);
|
||||
constructor Create_sym(_sym:tasmsymbol);
|
||||
{$ifdef i8086}
|
||||
constructor Create_sym_near(_sym:tasmsymbol);
|
||||
@ -1574,6 +1582,28 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
constructor tai_const.Create_sizeint(_value : asizeint);
|
||||
begin
|
||||
inherited Create;
|
||||
typ:=ait_const;
|
||||
consttype:=aitconst_sizeint;
|
||||
value:=_value;
|
||||
sym:=nil;
|
||||
endsym:=nil;
|
||||
end;
|
||||
|
||||
|
||||
constructor tai_const.Create_sizeint_unaligned(_value : asizeint);
|
||||
begin
|
||||
inherited Create;
|
||||
typ:=ait_const;
|
||||
consttype:=aitconst_sizeint_unaligned;
|
||||
value:=_value;
|
||||
sym:=nil;
|
||||
endsym:=nil;
|
||||
end;
|
||||
|
||||
|
||||
constructor tai_const.Create_type_sym(_typ:taiconst_type;_sym:tasmsymbol);
|
||||
begin
|
||||
inherited Create;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user