From 710c8308596fbb76cd1db99b5d0c8330435f6a2f Mon Sep 17 00:00:00 2001 From: nickysn Date: Tue, 4 Oct 2016 14:08:33 +0000 Subject: [PATCH] + 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 - --- compiler/aasmtai.pas | 30 ++++++++++++++++++++++++++++++ 1 file changed, 30 insertions(+) diff --git a/compiler/aasmtai.pas b/compiler/aasmtai.pas index f320234baf..eeefceca00 100644 --- a/compiler/aasmtai.pas +++ b/compiler/aasmtai.pas @@ -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;