From 9d2728a5605f651934fe67a6fe6986b3e4a2c011 Mon Sep 17 00:00:00 2001 From: Ash Wolf Date: Sun, 20 Nov 2022 00:07:22 -0500 Subject: add a bunch of code and a ton of stub files for later --- includes/compiler/common.h | 19 ++++++++++++++----- 1 file changed, 14 insertions(+), 5 deletions(-) (limited to 'includes/compiler/common.h') diff --git a/includes/compiler/common.h b/includes/compiler/common.h index 15043f5..48a33dc 100644 --- a/includes/compiler/common.h +++ b/includes/compiler/common.h @@ -204,14 +204,15 @@ typedef struct TemplParamID { typedef enum TemplDepSubType { TDE_PARAM, TDE_TYPEEXPR, + TDE_unk2, // may actually be 1? TDE_CAST, TDE_QUALNAME, TDE_QUALTEMPL, - TDE_OBJACCESS, - TDE_SOURCEREF, - TDE_FUNCCALL, - TDE_LOCAL, - TDE_MONAND, + //TDE_OBJACCESS, + //TDE_SOURCEREF, + //TDE_FUNCCALL, + //TDE_LOCAL, + TDE_MONAND = 7, TDE_MONPLUS, TDE_MONMUL, TDE_NEW, @@ -333,6 +334,14 @@ struct CParams { CWDataType targetCPU; char *targetName; }; + +#define FITS_IN_SHORT(value) ( (value) == ((short) (value)) ) +#define FITS_IN_USHORT(value) ( (value) == ((unsigned short) (value)) ) +#define FITS_IN_HI_SHORT(value) ( (value) == (value & 0xFFFF0000) ) +#define FITS_IN_SHORT2(value) ( ((short) (value)) == (value) ) +#define HIGH_PART(value) ( (short) (((value) >> 16) + (((value) & 0x8000) >> 15)) ) +#define LOW_PART(value) ( (short) (value) ) + #ifdef __MWERKS__ #pragma options align=reset #endif -- cgit v1.2.3