mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 04:02:25 +00:00
Include int size in .sym files, fix __IN for out of range values, better naming.
This commit is contained in:
parent
a33e38cf6c
commit
b3c71fb2f0
205 changed files with 1353 additions and 1325 deletions
|
|
@ -60,12 +60,6 @@ typedef float REAL;
|
|||
typedef double LONGREAL;
|
||||
typedef void* SYSTEM_PTR;
|
||||
|
||||
// Unsigned variants are for use by shift and rotate macros.
|
||||
|
||||
typedef unsigned char U_SYSTEM_BYTE;
|
||||
typedef unsigned char U_CHAR;
|
||||
typedef unsigned char U_SHORTINT;
|
||||
|
||||
// For 32 bit builds, the size of LONGINT depends on a make option:
|
||||
|
||||
#if (__SIZEOF_POINTER__ == 8) || defined(LARGE) || defined(_WIN64)
|
||||
|
|
@ -80,9 +74,20 @@ typedef unsigned char U_SHORTINT;
|
|||
typedef unsigned long U_LONGINT;
|
||||
#endif
|
||||
|
||||
// Unsigned variants are for use by shift and rotate macros.
|
||||
|
||||
typedef unsigned char U_SYSTEM_BYTE;
|
||||
typedef unsigned char U_CHAR;
|
||||
typedef unsigned char U_SHORTINT;
|
||||
|
||||
typedef U_LONGINT SET;
|
||||
typedef U_LONGINT U_SET;
|
||||
|
||||
typedef SYSTEM_CARD8 U_SYSTEM_INT8;
|
||||
typedef SYSTEM_CARD16 U_SYSTEM_INT16;
|
||||
typedef SYSTEM_CARD32 U_SYSTEM_INT32;
|
||||
typedef SYSTEM_CARD64 U_SYSTEM_INT64;
|
||||
|
||||
|
||||
// OS Memory allocation interfaces are in PlatformXXX.Mod
|
||||
|
||||
|
|
@ -178,7 +183,7 @@ static int __str_cmp(CHAR *x, CHAR *y){
|
|||
#define __ABSFD(x) SYSTEM_ABSD((double)(x))
|
||||
#define __CAP(ch) ((CHAR)((ch)&0x5f))
|
||||
#define __ODD(x) ((x)&1)
|
||||
#define __IN(x, s) (((s)>>(x))&1)
|
||||
#define __IN(x, s) ((x)>=0 && (x)<(8*sizeof(SET)) && ((((U_SET)(s))>>(x))&1))
|
||||
#define __SETOF(x) ((SET)1<<(x))
|
||||
#define __SETRNG(l, h) ((~(SET)0<<(l))&~(SET)0>>(8*sizeof(SET)-1-(h)))
|
||||
#define __MASK(x, m) ((x)&~(m))
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue