From fcd3872d880a3163b10c956ea2eb59c9d3dd8958 Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 26 Feb 2011 20:15:53 +0000 Subject: [PATCH] + introduction of tcgint git-svn-id: trunk@17017 - --- compiler/cgbase.pas | 8 ++++---- compiler/globtype.pas | 3 +++ compiler/parabase.pas | 2 +- 3 files changed, 8 insertions(+), 5 deletions(-) diff --git a/compiler/cgbase.pas b/compiler/cgbase.pas index c82fe755f3..08f130bad8 100644 --- a/compiler/cgbase.pas +++ b/compiler/cgbase.pas @@ -331,8 +331,8 @@ interface {# From a constant numeric value, return the abstract code generator size. } - function int_cgsize(const a: aint): tcgsize;{$ifdef USEINLINE}inline;{$endif} - function int_float_cgsize(const a: aint): tcgsize; + function int_cgsize(const a: tcgint): tcgsize;{$ifdef USEINLINE}inline;{$endif} + function int_float_cgsize(const a: tcgint): tcgsize; { return the inverse condition of opcmp } function inverse_opcmp(opcmp: topcmp): topcmp;{$ifdef USEINLINE}inline;{$endif} @@ -589,7 +589,7 @@ implementation end; - function int_cgsize(const a: aint): tcgsize;{$ifdef USEINLINE}inline;{$endif} + function int_cgsize(const a: tcgint): tcgsize;{$ifdef USEINLINE}inline;{$endif} const size2cgsize : array[0..8] of tcgsize = ( OS_NO,OS_8,OS_16,OS_NO,OS_32,OS_NO,OS_NO,OS_NO,OS_64 @@ -602,7 +602,7 @@ implementation end; - function int_float_cgsize(const a: aint): tcgsize; + function int_float_cgsize(const a: tcgint): tcgsize; begin case a of 4 : diff --git a/compiler/globtype.pas b/compiler/globtype.pas index 2c23d5595e..8f114da397 100644 --- a/compiler/globtype.pas +++ b/compiler/globtype.pas @@ -86,6 +86,9 @@ interface ASizeInt = PInt; ASizeUInt = PUInt; + { type used for handling constants etc. in the code generator } + TCGInt = Int64; + { This must be an ordinal type with the same size as a pointer Note: Must be unsigned! Otherwise, ugly code like pointer(-1) will result in a pointer with the value diff --git a/compiler/parabase.pas b/compiler/parabase.pas index b81273f108..047f7f1a7e 100644 --- a/compiler/parabase.pas +++ b/compiler/parabase.pas @@ -63,7 +63,7 @@ unit parabase; TCGPara = object Location : PCGParalocation; - IntSize : aint; { size of the total location in bytes } + IntSize : tcgint; { size of the total location in bytes } Alignment : ShortInt; Size : TCGSize; { Size of the parameter included in all locations } {$ifdef powerpc}