diff options
author | Ash Wolf <ninji@wuffs.org> | 2022-11-20 00:07:22 -0500 |
---|---|---|
committer | Ash Wolf <ninji@wuffs.org> | 2022-11-20 00:07:22 -0500 |
commit | 9d2728a5605f651934fe67a6fe6986b3e4a2c011 (patch) | |
tree | e81e0a3588a0c8d1855bf28316efe27d86b04d66 /includes/compiler/common.h | |
parent | 9a46dd0e2e80790d9848c0bbd718932a27c23269 (diff) | |
download | MWCC-9d2728a5605f651934fe67a6fe6986b3e4a2c011.tar.gz MWCC-9d2728a5605f651934fe67a6fe6986b3e4a2c011.zip |
add a bunch of code and a ton of stub files for later
Diffstat (limited to 'includes/compiler/common.h')
-rw-r--r-- | includes/compiler/common.h | 19 |
1 files changed, 14 insertions, 5 deletions
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 |