From 7efd5a0158079febaa2b40d4f398ff016b709873 Mon Sep 17 00:00:00 2001 From: David Brown Date: Wed, 14 Sep 2016 13:02:00 +0100 Subject: [PATCH] More LONGINTS changed to Address. Remove special FetchAddress code in Heap. --- bootstrap/SYSTEM.c | 99 ++++++++-------- bootstrap/SYSTEM.h | 99 ++++++++-------- bootstrap/unix-44/Configuration.c | 4 +- bootstrap/unix-44/Configuration.h | 2 +- bootstrap/unix-44/Console.c | 2 +- bootstrap/unix-44/Console.h | 2 +- bootstrap/unix-44/Files.c | 2 +- bootstrap/unix-44/Files.h | 2 +- bootstrap/unix-44/Heap.c | 13 ++- bootstrap/unix-44/Heap.h | 2 +- bootstrap/unix-44/Modules.c | 2 +- bootstrap/unix-44/Modules.h | 2 +- bootstrap/unix-44/OPB.c | 130 +++++++++++----------- bootstrap/unix-44/OPB.h | 2 +- bootstrap/unix-44/OPC.c | 26 ++--- bootstrap/unix-44/OPC.h | 2 +- bootstrap/unix-44/OPM.c | 24 ++-- bootstrap/unix-44/OPM.h | 2 +- bootstrap/unix-44/OPP.c | 26 ++--- bootstrap/unix-44/OPP.h | 2 +- bootstrap/unix-44/OPS.c | 2 +- bootstrap/unix-44/OPS.h | 2 +- bootstrap/unix-44/OPT.c | 14 +-- bootstrap/unix-44/OPT.h | 2 +- bootstrap/unix-44/OPV.c | 74 ++++++------ bootstrap/unix-44/OPV.h | 2 +- bootstrap/unix-44/Platform.c | 2 +- bootstrap/unix-44/Platform.h | 2 +- bootstrap/unix-44/Reals.c | 2 +- bootstrap/unix-44/Reals.h | 2 +- bootstrap/unix-44/Strings.c | 2 +- bootstrap/unix-44/Strings.h | 2 +- bootstrap/unix-44/Texts.c | 8 +- bootstrap/unix-44/Texts.h | 2 +- bootstrap/unix-44/Vishap.c | 2 +- bootstrap/unix-44/errors.c | 2 +- bootstrap/unix-44/errors.h | 2 +- bootstrap/unix-44/extTools.c | 2 +- bootstrap/unix-44/extTools.h | 2 +- bootstrap/unix-44/vt100.c | 2 +- bootstrap/unix-44/vt100.h | 2 +- bootstrap/unix-48/Configuration.c | 4 +- bootstrap/unix-48/Configuration.h | 2 +- bootstrap/unix-48/Console.c | 2 +- bootstrap/unix-48/Console.h | 2 +- bootstrap/unix-48/Files.c | 2 +- bootstrap/unix-48/Files.h | 2 +- bootstrap/unix-48/Heap.c | 13 ++- bootstrap/unix-48/Heap.h | 2 +- bootstrap/unix-48/Modules.c | 2 +- bootstrap/unix-48/Modules.h | 2 +- bootstrap/unix-48/OPB.c | 130 +++++++++++----------- bootstrap/unix-48/OPB.h | 2 +- bootstrap/unix-48/OPC.c | 26 ++--- bootstrap/unix-48/OPC.h | 2 +- bootstrap/unix-48/OPM.c | 24 ++-- bootstrap/unix-48/OPM.h | 2 +- bootstrap/unix-48/OPP.c | 26 ++--- bootstrap/unix-48/OPP.h | 2 +- bootstrap/unix-48/OPS.c | 2 +- bootstrap/unix-48/OPS.h | 2 +- bootstrap/unix-48/OPT.c | 14 +-- bootstrap/unix-48/OPT.h | 2 +- bootstrap/unix-48/OPV.c | 74 ++++++------ bootstrap/unix-48/OPV.h | 2 +- bootstrap/unix-48/Platform.c | 2 +- bootstrap/unix-48/Platform.h | 2 +- bootstrap/unix-48/Reals.c | 2 +- bootstrap/unix-48/Reals.h | 2 +- bootstrap/unix-48/Strings.c | 2 +- bootstrap/unix-48/Strings.h | 2 +- bootstrap/unix-48/Texts.c | 8 +- bootstrap/unix-48/Texts.h | 2 +- bootstrap/unix-48/Vishap.c | 2 +- bootstrap/unix-48/errors.c | 2 +- bootstrap/unix-48/errors.h | 2 +- bootstrap/unix-48/extTools.c | 2 +- bootstrap/unix-48/extTools.h | 2 +- bootstrap/unix-48/vt100.c | 2 +- bootstrap/unix-48/vt100.h | 2 +- bootstrap/unix-88/Configuration.c | 4 +- bootstrap/unix-88/Configuration.h | 2 +- bootstrap/unix-88/Console.c | 2 +- bootstrap/unix-88/Console.h | 2 +- bootstrap/unix-88/Files.c | 2 +- bootstrap/unix-88/Files.h | 2 +- bootstrap/unix-88/Heap.c | 13 ++- bootstrap/unix-88/Heap.h | 2 +- bootstrap/unix-88/Modules.c | 2 +- bootstrap/unix-88/Modules.h | 2 +- bootstrap/unix-88/OPB.c | 130 +++++++++++----------- bootstrap/unix-88/OPB.h | 2 +- bootstrap/unix-88/OPC.c | 26 ++--- bootstrap/unix-88/OPC.h | 2 +- bootstrap/unix-88/OPM.c | 24 ++-- bootstrap/unix-88/OPM.h | 2 +- bootstrap/unix-88/OPP.c | 26 ++--- bootstrap/unix-88/OPP.h | 2 +- bootstrap/unix-88/OPS.c | 2 +- bootstrap/unix-88/OPS.h | 2 +- bootstrap/unix-88/OPT.c | 14 +-- bootstrap/unix-88/OPT.h | 2 +- bootstrap/unix-88/OPV.c | 74 ++++++------ bootstrap/unix-88/OPV.h | 2 +- bootstrap/unix-88/Platform.c | 2 +- bootstrap/unix-88/Platform.h | 2 +- bootstrap/unix-88/Reals.c | 2 +- bootstrap/unix-88/Reals.h | 2 +- bootstrap/unix-88/Strings.c | 2 +- bootstrap/unix-88/Strings.h | 2 +- bootstrap/unix-88/Texts.c | 8 +- bootstrap/unix-88/Texts.h | 2 +- bootstrap/unix-88/Vishap.c | 2 +- bootstrap/unix-88/errors.c | 2 +- bootstrap/unix-88/errors.h | 2 +- bootstrap/unix-88/extTools.c | 2 +- bootstrap/unix-88/extTools.h | 2 +- bootstrap/unix-88/vt100.c | 2 +- bootstrap/unix-88/vt100.h | 2 +- bootstrap/windows-48/Configuration.c | 4 +- bootstrap/windows-48/Configuration.h | 2 +- bootstrap/windows-48/Console.c | 2 +- bootstrap/windows-48/Console.h | 2 +- bootstrap/windows-48/Files.c | 2 +- bootstrap/windows-48/Files.h | 2 +- bootstrap/windows-48/Heap.c | 13 ++- bootstrap/windows-48/Heap.h | 2 +- bootstrap/windows-48/Modules.c | 2 +- bootstrap/windows-48/Modules.h | 2 +- bootstrap/windows-48/OPB.c | 130 +++++++++++----------- bootstrap/windows-48/OPB.h | 2 +- bootstrap/windows-48/OPC.c | 26 ++--- bootstrap/windows-48/OPC.h | 2 +- bootstrap/windows-48/OPM.c | 24 ++-- bootstrap/windows-48/OPM.h | 2 +- bootstrap/windows-48/OPP.c | 26 ++--- bootstrap/windows-48/OPP.h | 2 +- bootstrap/windows-48/OPS.c | 2 +- bootstrap/windows-48/OPS.h | 2 +- bootstrap/windows-48/OPT.c | 14 +-- bootstrap/windows-48/OPT.h | 2 +- bootstrap/windows-48/OPV.c | 74 ++++++------ bootstrap/windows-48/OPV.h | 2 +- bootstrap/windows-48/Platform.c | 2 +- bootstrap/windows-48/Platform.h | 2 +- bootstrap/windows-48/Reals.c | 2 +- bootstrap/windows-48/Reals.h | 2 +- bootstrap/windows-48/Strings.c | 2 +- bootstrap/windows-48/Strings.h | 2 +- bootstrap/windows-48/Texts.c | 8 +- bootstrap/windows-48/Texts.h | 2 +- bootstrap/windows-48/Vishap.c | 2 +- bootstrap/windows-48/errors.c | 2 +- bootstrap/windows-48/errors.h | 2 +- bootstrap/windows-48/extTools.c | 2 +- bootstrap/windows-48/extTools.h | 2 +- bootstrap/windows-48/vt100.c | 2 +- bootstrap/windows-48/vt100.h | 2 +- bootstrap/windows-88/Configuration.c | 4 +- bootstrap/windows-88/Configuration.h | 2 +- bootstrap/windows-88/Console.c | 2 +- bootstrap/windows-88/Console.h | 2 +- bootstrap/windows-88/Files.c | 2 +- bootstrap/windows-88/Files.h | 2 +- bootstrap/windows-88/Heap.c | 13 ++- bootstrap/windows-88/Heap.h | 2 +- bootstrap/windows-88/Modules.c | 2 +- bootstrap/windows-88/Modules.h | 2 +- bootstrap/windows-88/OPB.c | 130 +++++++++++----------- bootstrap/windows-88/OPB.h | 2 +- bootstrap/windows-88/OPC.c | 26 ++--- bootstrap/windows-88/OPC.h | 2 +- bootstrap/windows-88/OPM.c | 24 ++-- bootstrap/windows-88/OPM.h | 2 +- bootstrap/windows-88/OPP.c | 26 ++--- bootstrap/windows-88/OPP.h | 2 +- bootstrap/windows-88/OPS.c | 2 +- bootstrap/windows-88/OPS.h | 2 +- bootstrap/windows-88/OPT.c | 14 +-- bootstrap/windows-88/OPT.h | 2 +- bootstrap/windows-88/OPV.c | 74 ++++++------ bootstrap/windows-88/OPV.h | 2 +- bootstrap/windows-88/Platform.c | 2 +- bootstrap/windows-88/Platform.h | 2 +- bootstrap/windows-88/Reals.c | 2 +- bootstrap/windows-88/Reals.h | 2 +- bootstrap/windows-88/Strings.c | 2 +- bootstrap/windows-88/Strings.h | 2 +- bootstrap/windows-88/Texts.c | 8 +- bootstrap/windows-88/Texts.h | 2 +- bootstrap/windows-88/Vishap.c | 2 +- bootstrap/windows-88/errors.c | 2 +- bootstrap/windows-88/errors.h | 2 +- bootstrap/windows-88/extTools.c | 2 +- bootstrap/windows-88/extTools.h | 2 +- bootstrap/windows-88/vt100.c | 2 +- bootstrap/windows-88/vt100.h | 2 +- src/system/Heap.Mod | 112 +++++++++---------- src/system/SYSTEM.c | 96 ++++++++-------- src/system/SYSTEM.h | 56 +++++----- src/test/confidence/planned-binary-change | 2 +- 201 files changed, 1227 insertions(+), 1132 deletions(-) diff --git a/bootstrap/SYSTEM.c b/bootstrap/SYSTEM.c index d7603f8e..6efc8321 100644 --- a/bootstrap/SYSTEM.c +++ b/bootstrap/SYSTEM.c @@ -23,9 +23,6 @@ -LONGINT SYSTEM_ABS (LONGINT i) {return __ABS(i);} -double SYSTEM_ABSD(double i) {return __ABS(i);} - int64 SYSTEM_DIV(int64 x, int64 y) { @@ -49,37 +46,6 @@ int64 SYSTEM_MOD(int64 x, int64 y) else {return -((-x) % (-y));} } - -void SYSTEM_INHERIT(LONGINT *t, LONGINT *t0) -{ - t -= __TPROC0OFF; - t0 -= __TPROC0OFF; - while (*t0 != __EOM) {*t = *t0; t--; t0--;} -} - - -void SYSTEM_ENUMP(void *adr, LONGINT n, void (*P)()) -{ - while (n > 0) { - P((address)(*((void**)(adr)))); - adr = ((void**)adr) + 1; - n--; - } -} - -void SYSTEM_ENUMR(void *adr, LONGINT *typ, LONGINT size, LONGINT n, void (*P)()) -{ - LONGINT *t, off; - typ++; - while (n > 0) { - t = typ; - off = *t; - while (off >= 0) {P(*(address*)((char*)adr+off)); t++; off = *t;} - adr = ((char*)adr) + size; - n--; - } -} - LONGINT SYSTEM_ENTIER(double x) { LONGINT y; @@ -91,22 +57,55 @@ LONGINT SYSTEM_ENTIER(double x) } } + + + +void SYSTEM_INHERIT(address *t, address *t0) +{ + t -= __TPROC0OFF; + t0 -= __TPROC0OFF; + while (*t0 != __EOM) {*t = *t0; t--; t0--;} +} + + +void SYSTEM_ENUMP(void *adr, address n, void (*P)()) +{ + while (n > 0) { + P((address)(*((void**)(adr)))); + adr = ((void**)adr) + 1; + n--; + } +} + +void SYSTEM_ENUMR(void *adr, address *typ, address size, address n, void (*P)()) +{ + address *t, off; + typ++; + while (n > 0) { + t = typ; + off = *t; + while (off >= 0) {P(*(address*)((char*)adr+off)); t++; off = *t;} + adr = ((char*)adr) + size; + n--; + } +} + extern void Heap_Lock(); extern void Heap_Unlock(); -SYSTEM_PTR SYSTEM_NEWARR(LONGINT *typ, LONGINT elemsz, int elemalgn, int nofdim, int nofdyn, ...) +SYSTEM_PTR SYSTEM_NEWARR(address *typ, address elemsz, int elemalgn, int nofdim, int nofdyn, ...) { - LONGINT nofelems, size, dataoff, n, nptr, *x, *p, nofptrs, i, *ptab, off; + address nofelems, size, dataoff, n, nptr, *x, *p, nofptrs, i, *ptab, off; va_list ap; va_start(ap, nofdyn); nofelems = 1; while (nofdim > 0) { - nofelems = nofelems * va_arg(ap, LONGINT); nofdim--; + nofelems = nofelems * va_arg(ap, address); nofdim--; if (nofelems <= 0) __HALT(-20); } va_end(ap); - dataoff = nofdyn * sizeof(LONGINT); - if (elemalgn > sizeof(LONGINT)) { + dataoff = nofdyn * sizeof(address); + if (elemalgn > sizeof(address)) { n = dataoff % elemalgn; if (n != 0) dataoff += elemalgn - n; } @@ -116,37 +115,37 @@ SYSTEM_PTR SYSTEM_NEWARR(LONGINT *typ, LONGINT elemsz, int elemalgn, int nofdim, /* element typ does not contain pointers */ x = Heap_NEWBLK(size); } - else if (typ == (LONGINT*)POINTER__typ) { + else if (typ == (address*)POINTER__typ) { /* element type is a pointer */ - x = Heap_NEWBLK(size + nofelems * sizeof(LONGINT)); - p = (LONGINT*)(address)x[-1]; + x = Heap_NEWBLK(size + nofelems * sizeof(address)); + p = (address*)(address)x[-1]; p[-nofelems] = *p; /* build new type desc in situ: 1. copy block size; 2. setup ptr tab; 3. set sentinel; 4. patch tag */ p -= nofelems - 1; n = 1; /* n =1 for skipping the size field */ - while (n <= nofelems) {*p = n*sizeof(LONGINT); p++; n++;} - *p = - (nofelems + 1) * sizeof(LONGINT); /* sentinel */ - x[-1] -= nofelems * sizeof(LONGINT); + while (n <= nofelems) {*p = n*sizeof(address); p++; n++;} + *p = - (nofelems + 1) * sizeof(address); /* sentinel */ + x[-1] -= nofelems * sizeof(address); } else { /* element type is a record that contains pointers */ ptab = typ + 1; nofptrs = 0; while (ptab[nofptrs] >= 0) {nofptrs++;} /* number of pointers per element */ nptr = nofelems * nofptrs; /* total number of pointers */ - x = Heap_NEWBLK(size + nptr * sizeof(LONGINT)); - p = (LONGINT*)(address)x[- 1]; + x = Heap_NEWBLK(size + nptr * sizeof(address)); + p = (address*)(address)x[- 1]; p[-nptr] = *p; /* build new type desc in situ; 1. copy block size; 2. setup ptr tab; 3. set sentinel; 4. patch tag */ p -= nptr - 1; n = 0; off = dataoff; while (n < nofelems) {i = 0; while (i < nofptrs) {*p = off + ptab[i]; p++; i++;} off += elemsz; n++; } - *p = - (nptr + 1) * sizeof(LONGINT); /* sentinel */ - x[-1] -= nptr * sizeof(LONGINT); + *p = - (nptr + 1) * sizeof(address); /* sentinel */ + x[-1] -= nptr * sizeof(address); } if (nofdyn != 0) { /* setup len vector for index checks */ va_start(ap, nofdyn); p = x; - while (nofdyn > 0) {*p = va_arg(ap, LONGINT); p++, nofdyn--;} + while (nofdyn > 0) {*p = va_arg(ap, address); p++, nofdyn--;} va_end(ap); } Heap_Unlock(); diff --git a/bootstrap/SYSTEM.h b/bootstrap/SYSTEM.h index 709c26a7..ddd85144 100644 --- a/bootstrap/SYSTEM.h +++ b/bootstrap/SYSTEM.h @@ -92,7 +92,6 @@ typedef float REAL; typedef double LONGREAL; typedef void* SYSTEM_PTR; -#define uSET SET // 'address' is a synonym for an int of pointer size @@ -130,13 +129,13 @@ extern void Platform_AssertFail(LONGINT x); // Index checking static inline int64 __XF(uint64 i, uint64 ub) {if (i >= ub) {__HALT(-2);} return i;} -#define __X(i, ub) (((uint64)(i)<(uint64)(ub))?i:(__HALT(-2),0)) +#define __X(i, ub) (((i)<(ub))?i:(__HALT(-2),0)) // Range checking, and checked SHORT and CHR functions static inline int64 __RF(uint64 i, uint64 ub) {if (i >= ub) {__HALT(-8);} return i;} -#define __R(i, ub) (((uint64)(i)<(uint64)(ub))?i:(__HALT(-8),0)) +#define __R(i, ub) (((i)<(ub))?i:(__HALT(-8),0)) #define __SHORT(x, ub) ((int)((uLONGINT)(x)+(ub)<(ub)+(ub)?(x):(__HALT(-8),0))) #define __SHORTF(x, ub) ((int)(__RF((x)+(ub),(ub)+(ub))-(ub))) #define __CHR(x) ((CHAR)__R(x, 256)) @@ -144,17 +143,6 @@ static inline int64 __RF(uint64 i, uint64 ub) {if (i >= ub) {__HALT(-8);} return -// Run time system routines in SYSTEM.c - - -extern LONGINT SYSTEM_ABS (LONGINT i); -extern double SYSTEM_ABSD (double i); -extern void SYSTEM_INHERIT(LONGINT *t, LONGINT *t0); -extern void SYSTEM_ENUMP (void *adr, LONGINT n, void (*P)()); -extern void SYSTEM_ENUMR (void *adr, LONGINT *typ, LONGINT size, LONGINT n, void (*P)()); -extern LONGINT SYSTEM_ENTIER (double x); - - // Signal handling in SYSTEM.c #ifndef _WIN32 @@ -211,7 +199,6 @@ static inline int __str_cmp(CHAR *x, CHAR *y){ static inline int64 SYSTEM_ASH(int64 x, int64 n) {return __ASH(x,n);} #define __ASHF(x, n) SYSTEM_ASH((int64)(x), (int64)(n)) -#define __BIT(x, n) (*(uint64*)(x)>>(n)&1) #define __MOVE(s, d, n) memcpy((char*)(address)(d),(char*)(address)(s),n) @@ -225,17 +212,28 @@ extern int64 SYSTEM_MOD(int64 x, int64 y); #define __MOD(x, y) (((x)>0 && (y)>0) ? (x)%(y) : __MODF(x, y)) +extern LONGINT SYSTEM_ENTIER (double x); +#define __ENTIER(x) SYSTEM_ENTIER(x) + + +#define __ABS(x) (((x)<0)?-(x):(x)) + +static inline int32 SYSTEM_ABS64(int64 i) {return i >= 0 ? i : -i;} +static inline int64 SYSTEM_ABS32(int32 i) {return i >= 0 ? i : -i;} +#define __ABSF(x) ((sizeof(x) <= 4) ? SYSTEM_ABS32(i) : SYSTEM_ABS64(i)) + +static inline double SYSTEM_ABSD(double i) {return i >= 0.0 ? i : -i;} +#define __ABSFD(x) SYSTEM_ABSD(x) -#define __ENTIER(x) SYSTEM_ENTIER(x) -#define __ABS(x) (((x)<0)?-(x):(x)) -#define __ABSF(x) SYSTEM_ABS((LONGINT)(x)) -#define __ABSFD(x) SYSTEM_ABSD((double)(x)) #define __CAP(ch) ((CHAR)((ch)&0x5f)) #define __ODD(x) ((x)&1) -#define __IN(x, s) ((x)>=0 && (x)<(8*sizeof(SET)) && ((((uSET)(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)) + +#define __IN(x, s, size) (((unsigned int)(x))>(x))&1)) +#define __SETOF(x, size) ((uint##size)1<<(x)) +#define __SETRNG(l, h, size) ((~(uint##size)0<<(l))&~(uint##size)0>>(size-1-(h))) + +#define __MASK(x, m) ((x)&~(m)) +#define __BIT(x, n) (*(uint64*)(x)>>(n)&1) @@ -245,6 +243,10 @@ extern int64 SYSTEM_MOD(int64 x, int64 y); #define __CASECHK __HALT(-4) #define __WITHCHK __HALT(-7) +#define __IS(tag, typ, level) (*(tag-(__BASEOFF-level))==(LONGINT)(address)typ##__typ) +#define __TYPEOF(p) ((LONGINT*)(address)(*(((LONGINT*)(p))-1))) +#define __ISP(p, typ, level) __IS(__TYPEOF(p),typ,level) + #define __GUARDP(p, typ, level) ((typ*)(__ISP(p,typ,level)?p:(__HALT(-5),p))) #define __GUARDR(r, typ, level) (*((typ*)(__IS(r##__typ,typ,level)?r:(__HALT(-5),r)))) #define __GUARDA(p, typ, level) ((struct typ*)(__IS(__TYPEOF(p),typ,level)?p:(__HALT(-5),p))) @@ -284,51 +286,52 @@ extern SYSTEM_PTR Heap_NEWBLK (address size); extern SYSTEM_PTR Heap_NEWREC (address tag); extern SYSTEM_PTR SYSTEM_NEWARR(LONGINT*, LONGINT, int, int, int, ...); -#define __SYSNEW(p, len) p = Heap_NEWBLK((LONGINT)(len)) -#define __NEW(p, t) p = Heap_NEWREC((LONGINT)(address)t##__typ) +#define __SYSNEW(p, len) p = Heap_NEWBLK((address)(len)) +#define __NEW(p, t) p = Heap_NEWREC((address)t##__typ) #define __NEWARR SYSTEM_NEWARR /* Type handling */ +extern void SYSTEM_INHERIT(address *t, address *t0); +extern void SYSTEM_ENUMP (void *adr, address n, void (*P)()); +extern void SYSTEM_ENUMR (void *adr, address *typ, address size, address n, void (*P)()); + + #define __TDESC(t, m, n) \ static struct t##__desc { \ - LONGINT tproc[m]; /* Proc for each ptr field */ \ - LONGINT tag; \ - LONGINT next; /* Module table type list points here */ \ - LONGINT level; \ - LONGINT module; \ + address tproc[m]; /* Proc for each ptr field */ \ + address tag; \ + address next; /* Module table type list points here */ \ + address level; \ + address module; \ char name[24]; \ - LONGINT basep[__MAXEXT]; /* List of bases this extends */ \ - LONGINT reserved; \ - LONGINT blksz; /* xxx_typ points here */ \ - LONGINT ptr[n+1]; /* Offsets of ptrs up to -ve sentinel */ \ + address basep[__MAXEXT]; /* List of bases this extends */ \ + address reserved; \ + address blksz; /* xxx_typ points here */ \ + address ptr[n+1]; /* Offsets of ptrs up to -ve sentinel */ \ } t##__desc #define __BASEOFF (__MAXEXT+1) // blksz as index to base. -#define __TPROC0OFF (__BASEOFF+24/sizeof(LONGINT)+5) // blksz as index to tproc IFF m=1. +#define __TPROC0OFF (__BASEOFF+24/sizeof(address)+5) // blksz as index to tproc IFF m=1. #define __EOM 1 #define __TDFLDS(name, size) {__EOM}, 1, 0, 0, 0, name, {0}, 0, size -#define __ENUMP(adr, n, P) SYSTEM_ENUMP(adr, (LONGINT)(n), P) -#define __ENUMR(adr, typ, size, n, P) SYSTEM_ENUMR(adr, typ, (LONGINT)(size), (LONGINT)(n), P) +#define __ENUMP(adr, n, P) SYSTEM_ENUMP(adr, (address)(n), P) +#define __ENUMR(adr, typ, size, n, P) SYSTEM_ENUMR(adr, typ, (address)(size), (address)(n), P) #define __INITYP(t, t0, level) \ - t##__typ = (LONGINT*)&t##__desc.blksz; \ - memcpy(t##__desc.basep, t0##__typ - __BASEOFF, level*sizeof(LONGINT)); \ - t##__desc.basep[level] = (LONGINT)(address)t##__typ; \ - t##__desc.module = (LONGINT)(address)m; \ + t##__typ = (address*)&t##__desc.blksz; \ + memcpy(t##__desc.basep, t0##__typ - __BASEOFF, level*sizeof(address)); \ + t##__desc.basep[level] = (address)t##__typ; \ + t##__desc.module = (address)m; \ if(t##__desc.blksz!=sizeof(struct t)) __HALT(-15); \ - t##__desc.blksz = (t##__desc.blksz+5*sizeof(LONGINT)-1)/(4*sizeof(LONGINT))*(4*sizeof(LONGINT)); \ - Heap_REGTYP(m, (LONGINT)(address)&t##__desc.next); \ + t##__desc.blksz = (t##__desc.blksz+5*sizeof(address)-1)/(4*sizeof(address))*(4*sizeof(address)); \ + Heap_REGTYP(m, (address)&t##__desc.next); \ SYSTEM_INHERIT(t##__typ, t0##__typ) -#define __IS(tag, typ, level) (*(tag-(__BASEOFF-level))==(LONGINT)(address)typ##__typ) -#define __TYPEOF(p) ((LONGINT*)(address)(*(((LONGINT*)(p))-1))) -#define __ISP(p, typ, level) __IS(__TYPEOF(p),typ,level) - // Oberon-2 type bound procedures support -#define __INITBP(t, proc, num) *(t##__typ-(__TPROC0OFF+num))=(LONGINT)(address)proc +#define __INITBP(t, proc, num) *(t##__typ-(__TPROC0OFF+num))=(address)proc #define __SEND(typ, num, funtyp, parlist) ((funtyp)((address)*(typ-(__TPROC0OFF+num))))parlist diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index cc4f7969..d8c934bf 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -18,6 +18,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/09/12] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/09/14] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index 3ce4467e..2b7bdf82 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-44/Console.c b/bootstrap/unix-44/Console.c index e33f3d7c..5a0b29a2 100644 --- a/bootstrap/unix-44/Console.c +++ b/bootstrap/unix-44/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-44/Console.h b/bootstrap/unix-44/Console.h index c6fe7fc4..0af02096 100644 --- a/bootstrap/unix-44/Console.h +++ b/bootstrap/unix-44/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/unix-44/Files.c b/bootstrap/unix-44/Files.c index ebdd14a9..58145066 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-44/Files.h b/bootstrap/unix-44/Files.h index 42e60467..521906c3 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-44/Heap.c b/bootstrap/unix-44/Heap.c index 4d96ea89..f03a4d7e 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tskSfF */ #define INTEGER int16 #define LONGINT int32 @@ -82,6 +82,7 @@ export LONGINT *Heap__1__typ; static void Heap_CheckFin (void); static void Heap_ExtendHeap (address blksz); export void Heap_FINALL (void); +static address Heap_FetchAddress (address pointer); static void Heap_Finalize (void); export void Heap_GC (BOOLEAN markStack); static void Heap_HeapSort (address n, address *a, LONGINT a__len); @@ -106,7 +107,6 @@ export void Heap_Unlock (void); extern void *Heap__init(); extern address Platform_MainStackFrame; extern address Platform_OSAllocate(address size); -#define Heap_FetchAddress(pointer) (address)(*((void**)((address)pointer))) #define Heap_HeapModuleInit() Heap__init() #define Heap_OSAllocate(size) Platform_OSAllocate(size) #define Heap_PlatformHalt(code) Platform_Halt(code) @@ -188,6 +188,15 @@ static address Heap_NewChunk (address blksz) return _o_result; } +static address Heap_FetchAddress (address pointer) +{ + address _o_result; + address r; + __GET(pointer, r, address); + _o_result = r; + return _o_result; +} + static void Heap_ExtendHeap (address blksz) { address size, chnk, j, next; diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 1a6c9e05..29b4cb26 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-44/Modules.c b/bootstrap/unix-44/Modules.c index 9834a814..a71d3e4d 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-44/Modules.h b/bootstrap/unix-44/Modules.h index e34e59ed..6a744f9b 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-44/OPB.c b/bootstrap/unix-44/OPB.c index 92c0af42..a905da35 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -345,7 +345,7 @@ void OPB_Index (OPT_Node *x, OPT_Node y) f = y->typ->form; if ((*x)->class >= 7) { OPB_err(79); - } else if (f != 4 || __IN(y->class, 0x0300)) { + } else if (f != 4 || __IN(y->class, 0x0300, 32)) { OPB_err(80); y->typ = OPT_inttyp; } @@ -372,7 +372,7 @@ void OPB_Field (OPT_Node *x, OPT_Object y) if ((*x)->class >= 7) { OPB_err(77); } - if ((y != NIL && __IN(y->mode, 0x2010))) { + if ((y != NIL && __IN(y->mode, 0x2010, 32))) { OPB_BindNodes(2, y->typ, &*x, NIL); (*x)->obj = y; (*x)->readonly = (*x)->left->readonly || (y->vis == 2 && y->mnolev < 0); @@ -476,7 +476,7 @@ void OPB_In (OPT_Node *x, OPT_Node y) if (k < 0 || k > OPM_MaxSet) { OPB_err(202); } else if (y->class == 7) { - (*x)->conval->intval = OPB_BoolToInt(__IN(k, y->conval->setval)); + (*x)->conval->intval = OPB_BoolToInt(__IN(k, y->conval->setval, 32)); (*x)->obj = NIL; } else { OPB_BindNodes(12, OPT_booltyp, &*x, y); @@ -572,12 +572,12 @@ void OPB_MOp (int8 op, OPT_Node *x) } break; case 6: - if (!__IN(f, 0x70)) { + if (!__IN(f, 0x70, 32)) { OPB_err(96); } break; case 7: - if (__IN(f, 0xf0)) { + if (__IN(f, 0xf0, 32)) { if (z->class == 7) { if (f == 4) { if (z->conval->intval == (-2147483647-1)) { @@ -586,7 +586,7 @@ void OPB_MOp (int8 op, OPT_Node *x) z->conval->intval = -z->conval->intval; OPB_SetIntType(z); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { z->conval->realval = -z->conval->realval; } else { z->conval->setval = ~z->conval->setval; @@ -600,7 +600,7 @@ void OPB_MOp (int8 op, OPT_Node *x) } break; case 21: - if (__IN(f, 0x70)) { + if (__IN(f, 0x70, 32)) { if (z->class == 7) { if (f == 4) { if (z->conval->intval == (-2147483647-1)) { @@ -747,7 +747,7 @@ void OPB_CheckParameters (OPT_Object fp, OPT_Object ap, BOOLEAN checkNames) static void OPB_CheckProc (OPT_Struct x, OPT_Object y) { - if (__IN(y->mode, 0x04c0)) { + if (__IN(y->mode, 0x04c0, 32)) { if (y->mode == 6) { if (y->mnolev == 0) { y->mode = 7; @@ -923,7 +923,7 @@ static void OPB_ConstOp (int16 op, OPT_Node x, OPT_Node y) } break; case 9: - if (!__IN(g, 0x1800)) { + if (!__IN(g, 0x1800, 32)) { OPB_err(100); } break; @@ -954,7 +954,7 @@ static void OPB_ConstOp (int16 op, OPT_Node x, OPT_Node y) } else { OPB_err(204); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { temp = __ABS(yval->realval) <= (LONGREAL)1; if (temp || __ABS(xval->realval) <= 1.79769296342094e+308 / (LONGREAL)__ABS(yval->realval)) { xval->realval = xval->realval * yval->realval; @@ -978,7 +978,7 @@ static void OPB_ConstOp (int16 op, OPT_Node x, OPT_Node y) xval->realval = (LONGREAL)1; } x->typ = OPT_realtyp; - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { temp = __ABS(yval->realval) >= (LONGREAL)1; if (temp || __ABS(xval->realval) <= 1.79769296342094e+308 * __ABS(yval->realval)) { xval->realval = xval->realval / yval->realval; @@ -1032,7 +1032,7 @@ static void OPB_ConstOp (int16 op, OPT_Node x, OPT_Node y) } else { OPB_err(206); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { temp = (yval->realval >= (LONGREAL)0 && xval->realval <= 1.79769296342094e+308 - yval->realval); if (temp || (yval->realval < (LONGREAL)0 && xval->realval >= -1.79769296342094e+308 - yval->realval)) { xval->realval = xval->realval + yval->realval; @@ -1054,7 +1054,7 @@ static void OPB_ConstOp (int16 op, OPT_Node x, OPT_Node y) } else { OPB_err(207); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { temp = (yval->realval >= (LONGREAL)0 && xval->realval >= -1.79769296342094e+308 + yval->realval); if (temp || (yval->realval < (LONGREAL)0 && xval->realval <= 1.79769296342094e+308 + yval->realval)) { xval->realval = xval->realval - yval->realval; @@ -1082,28 +1082,28 @@ static void OPB_ConstOp (int16 op, OPT_Node x, OPT_Node y) xval->intval = OPB_BoolToInt(ConstCmp__14() != 9); break; case 11: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 32)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() == 11); } break; case 12: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 32)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() != 13); } break; case 13: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 32)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() == 13); } break; case 14: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 32)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() != 11); @@ -1136,7 +1136,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) (*x)->conval->intval = 1; } } - } else if (__IN(g, 0x60)) { + } else if (__IN(g, 0x60, 32)) { (*x)->conval->realval = (*x)->conval->intval; (*x)->conval->intval = -1; } else { @@ -1145,8 +1145,8 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) OPB_err(220); } } - } else if (__IN(f, 0x60)) { - if (__IN(g, 0x60)) { + } else if (__IN(f, 0x60, 32)) { + if (__IN(g, 0x60, 32)) { OPB_CheckRealType(g, 203, (*x)->conval); } else { r = (*x)->conval->realval; @@ -1195,8 +1195,8 @@ static BOOLEAN strings__41 (OPT_Node *x, OPT_Node *y) { BOOLEAN _o_result; BOOLEAN ok, xCharArr, yCharArr; - xCharArr = (__IN((*x)->typ->comp, 0x0c) && (*x)->typ->BaseTyp->form == 3) || *Op__38_s->f == 8; - yCharArr = (__IN((*y)->typ->comp, 0x0c) && (*y)->typ->BaseTyp->form == 3) || *Op__38_s->g == 8; + xCharArr = (__IN((*x)->typ->comp, 0x0c, 32) && (*x)->typ->BaseTyp->form == 3) || *Op__38_s->f == 8; + yCharArr = (__IN((*y)->typ->comp, 0x0c, 32) && (*y)->typ->BaseTyp->form == 3) || *Op__38_s->g == 8; if ((((xCharArr && *Op__38_s->g == 3)) && (*y)->class == 7)) { OPB_CharToString(*y); *Op__38_s->g = 8; @@ -1255,7 +1255,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) case 4: if ((g == 4 && y->typ->size < z->typ->size)) { OPB_Convert(&y, z->typ); - } else if (__IN(g, 0x70)) { + } else if (__IN(g, 0x70, 32)) { OPB_Convert(&z, y->typ); } else { OPB_err(100); @@ -1264,23 +1264,23 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) case 5: if (g == 4) { OPB_Convert(&y, z->typ); - } else if (__IN(g, 0x60)) { + } else if (__IN(g, 0x60, 32)) { OPB_Convert(&z, y->typ); } else { OPB_err(100); } break; case 6: - if (__IN(g, 0x70)) { + if (__IN(g, 0x70, 32)) { OPB_Convert(&y, z->typ); - } else if (__IN(g, 0x60)) { + } else if (__IN(g, 0x60, 32)) { OPB_Convert(&y, z->typ); } else { OPB_err(100); } break; case 9: - if (!__IN(g, 0x1800)) { + if (!__IN(g, 0x1800, 32)) { OPB_err(100); } break; @@ -1341,7 +1341,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) y->obj = NIL; } } - } else if (!__IN(f, 0xe1)) { + } else if (!__IN(f, 0xe1, 32)) { OPB_err(105); typ = OPT_undftyp; } @@ -1357,7 +1357,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) OPB_Convert(&z, OPT_realtyp); OPB_Convert(&y, OPT_realtyp); typ = OPT_realtyp; - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { if ((y->class == 7 && y->conval->realval == (LONGREAL)0)) { OPB_err(205); } @@ -1424,7 +1424,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) } break; case 6: - if (!__IN(f, 0xf1)) { + if (!__IN(f, 0xf1, 32)) { OPB_err(105); typ = OPT_undftyp; } @@ -1443,7 +1443,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) } break; case 7: - if (!__IN(f, 0xf1)) { + if (!__IN(f, 0xf1, 32)) { OPB_err(106); typ = OPT_undftyp; } @@ -1467,7 +1467,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) } break; case 9: case 10: - if (__IN(f, 0x1aff) || strings__41(&z, &y)) { + if (__IN(f, 0x1aff, 32) || strings__41(&z, &y)) { typ = OPT_booltyp; } else { OPB_err(107); @@ -1476,7 +1476,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) NewOp__39(op, typ, &z, y); break; case 11: case 12: case 13: case 14: - if (__IN(f, 0x79) || strings__41(&z, &y)) { + if (__IN(f, 0x79, 32) || strings__41(&z, &y)) { typ = OPT_booltyp; } else { OPM_LogWLn(); @@ -1518,10 +1518,10 @@ void OPB_SetRange (OPT_Node *x, OPT_Node y) } if (((*x)->class == 7 && y->class == 7)) { if (k <= l) { - (*x)->conval->setval = __SETRNG(k, l); + (*x)->conval->setval = __SETRNG(k, l, 32); } else { OPB_err(201); - (*x)->conval->setval = __SETRNG(l, k); + (*x)->conval->setval = __SETRNG(l, k, 32); } (*x)->obj = NIL; } else { @@ -1543,7 +1543,7 @@ void OPB_SetElem (OPT_Node *x) } else if ((*x)->class == 7) { k = (*x)->conval->intval; if ((0 <= k && k <= OPM_MaxSet)) { - (*x)->conval->setval = __SETOF(k); + (*x)->conval->setval = __SETOF(k,32); } else { OPB_err(202); } @@ -1588,7 +1588,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) case 0: case 8: break; case 1: - if (!((__IN(g, 0x1a) && y->size == 1))) { + if (!((__IN(g, 0x1a, 32) && y->size == 1))) { OPB_err(113); } break; @@ -1603,12 +1603,12 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) } break; case 5: - if (!__IN(g, 0x30)) { + if (!__IN(g, 0x30, 32)) { OPB_err(113); } break; case 6: - if (!__IN(g, 0x70)) { + if (!__IN(g, 0x70, 32)) { OPB_err(113); } break; @@ -1656,7 +1656,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) if (ynode->conval->intval2 > x->n) { OPB_err(114); } - } else if ((__IN(y->comp, 0x0c) && y->BaseTyp == OPT_chartyp)) { + } else if ((__IN(y->comp, 0x0c, 32) && y->BaseTyp == OPT_chartyp)) { } else { OPB_err(113); } @@ -1664,7 +1664,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) OPB_err(113); } } else if ((x->comp == 3 && x->BaseTyp == OPT_chartyp)) { - if ((__IN(y->comp, 0x0c) && y->BaseTyp == OPT_chartyp)) { + if ((__IN(y->comp, 0x0c, 32) && y->BaseTyp == OPT_chartyp)) { } else { OPB_err(113); } @@ -1691,7 +1691,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) OPM_LogWLn(); break; } - if ((((((ynode->class == 7 && g < f)) && __IN(g, 0x30))) && __IN(f, 0x70))) { + if ((((((ynode->class == 7 && g < f)) && __IN(g, 0x30, 32))) && __IN(f, 0x70, 32))) { OPB_Convert(&ynode, x); } } @@ -1729,7 +1729,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) OPB_err(76); } f = x->typ->BaseTyp->comp; - if (__IN(f, 0x1c)) { + if (__IN(f, 0x1c, 32)) { if (f == 3) { typ = x->typ->BaseTyp; } @@ -1762,7 +1762,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) case 5: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { OPB_Convert(&x, OPT_linttyp); } else { OPB_err(111); @@ -1837,7 +1837,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) case 9: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (__IN(f, 0x11)) { + } else if (__IN(f, 0x11, 32)) { OPB_Convert(&x, OPT_chartyp); } else { OPB_err(111); @@ -1898,7 +1898,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) } break; case 17: - if (!__IN(x->typ->comp, 0x0c)) { + if (!__IN(x->typ->comp, 0x0c, 32)) { OPB_err(131); } break; @@ -1909,7 +1909,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) } if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (((!__IN(x->typ->comp, 0x0c) || x->typ->BaseTyp->form != 3) && f != 8)) { + } else if (((!__IN(x->typ->comp, 0x0c, 32) || x->typ->BaseTyp->form != 3) && f != 8)) { OPB_err(111); } break; @@ -1933,7 +1933,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) if (x->class != 8) { OPB_err(110); x = OPB_NewIntConst(1); - } else if (__IN(f, 0x18fe) || __IN(x->typ->comp, 0x14)) { + } else if (__IN(f, 0x18fe, 32) || __IN(x->typ->comp, 0x14, 32)) { (*OPB_typSize)(x->typ); x->typ->pvused = 1; x = OPB_NewIntConst(x->typ->size); @@ -1948,7 +1948,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) case 22: case 23: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (!__IN(f, 0x9a)) { + } else if (!__IN(f, 0x9a, 32)) { OPB_err(111); } break; @@ -1957,7 +1957,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) OPB_err(126); } else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) { OPB_Convert(&x, OPT_linttyp); - } else if (!((__IN(x->typ->form, 0x0810) && x->typ->size == OPM_PointerSize))) { + } else if (!((__IN(x->typ->form, 0x0810, 32) && x->typ->size == OPM_PointerSize))) { OPB_err(111); x->typ = OPT_linttyp; } @@ -1974,7 +1974,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) case 29: if (x->class != 8) { OPB_err(110); - } else if (__IN(f, 0x0501) || x->typ->comp == 3) { + } else if (__IN(f, 0x0501, 32) || x->typ->comp == 3) { OPB_err(111); } break; @@ -2070,11 +2070,11 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) } else if (x->typ->size == 1) { L = (int16)x->conval->intval; typ = p->typ; - while ((L > 0 && __IN(typ->comp, 0x0c))) { + while ((L > 0 && __IN(typ->comp, 0x0c, 32))) { typ = typ->BaseTyp; L -= 1; } - if (L != 0 || !__IN(typ->comp, 0x0c)) { + if (L != 0 || !__IN(typ->comp, 0x0c, 32)) { OPB_err(132); } else { x->obj = NIL; @@ -2098,7 +2098,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) case 18: if (OPB_NotVar(x)) { OPB_err(112); - } else if ((__IN(x->typ->comp, 0x0c) && x->typ->BaseTyp->form == 3)) { + } else if ((__IN(x->typ->comp, 0x0c, 32) && x->typ->BaseTyp->form == 3)) { if (x->readonly) { OPB_err(76); } @@ -2172,7 +2172,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) case 24: case 25: case 26: case 27: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (__IN(f, 0x18ff)) { + } else if (__IN(f, 0x18ff, 32)) { if (fctno == 24 || fctno == 26) { if (OPB_NotVar(x)) { OPB_err(112); @@ -2198,7 +2198,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) p->typ = OPT_booltyp; break; case 29: - if (((x->class == 8 || x->class == 9) || __IN(f, 0x0501)) || x->typ->comp == 3) { + if (((x->class == 8 || x->class == 9) || __IN(f, 0x0501, 32)) || x->typ->comp == 3) { OPB_err(126); } if ((x->class != 7 && x->typ->size < p->typ->size)) { @@ -2230,7 +2230,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) OPB_err(126); } else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) { OPB_Convert(&x, OPT_linttyp); - } else if (!((__IN(x->typ->form, 0x0810) && x->typ->size == OPM_PointerSize))) { + } else if (!((__IN(x->typ->form, 0x0810, 32) && x->typ->size == OPM_PointerSize))) { OPB_err(111); x->typ = OPT_linttyp; } @@ -2384,12 +2384,12 @@ static void OPB_DynArrParCheck (OPT_Struct ftyp, OPT_Struct atyp, BOOLEAN fvarpa ftyp = ftyp->BaseTyp; atyp = atyp->BaseTyp; if ((fvarpar && ftyp == OPT_bytetyp)) { - if (!__IN(f, 0x0c) || !((__IN(atyp->form, 0x1e) && atyp->size == 1))) { - if (__IN(18, OPM_opt)) { + if (!__IN(f, 0x0c, 32) || !((__IN(atyp->form, 0x1e, 32) && atyp->size == 1))) { + if (__IN(18, OPM_opt, 32)) { OPB_err(-301); } } - } else if (__IN(f, 0x0c)) { + } else if (__IN(f, 0x0c, 32)) { if (ftyp->comp == 3) { OPB_DynArrParCheck(ftyp, atyp, fvarpar); } else if (ftyp != atyp) { @@ -2428,7 +2428,7 @@ static void OPB_CheckReceiver (OPT_Node *x, OPT_Object fp) void OPB_PrepCall (OPT_Node *x, OPT_Object *fpar) { - if (((*x)->obj != NIL && __IN((*x)->obj->mode, 0x22c0))) { + if (((*x)->obj != NIL && __IN((*x)->obj->mode, 0x22c0, 32))) { *fpar = (*x)->obj->link; if ((*x)->obj->mode == 13) { OPB_CheckReceiver(&(*x)->left, *fpar); @@ -2467,7 +2467,7 @@ void OPB_Param (OPT_Node ap, OPT_Object fp) OPB_err(111); } } else if ((fp->typ == OPT_sysptrtyp && ap->typ->form == 11)) { - } else if ((ap->typ != fp->typ && !((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e) && ap->typ->size == 1)))))) { + } else if ((ap->typ != fp->typ && !((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e, 32) && ap->typ->size == 1)))))) { OPB_err(123); } else if ((fp->typ->form == 11 && ap->class == 5)) { OPB_err(123); @@ -2494,7 +2494,7 @@ void OPB_StaticLink (int8 dlev) scope = OPT_topScope; while (dlev > 0) { dlev -= 1; - scope->link->conval->setval |= __SETOF(3); + scope->link->conval->setval |= __SETOF(3,32); scope = scope->left; } } @@ -2589,7 +2589,7 @@ void OPB_Assign (OPT_Node *x, OPT_Node y) y->conval->intval = 0; OPB_Index(&*x, OPB_NewIntConst(0)); } - if ((((((__IN((*x)->typ->comp, 0x0c) && (*x)->typ->BaseTyp == OPT_chartyp)) && __IN(y->typ->comp, 0x0c))) && y->typ->BaseTyp == OPT_chartyp)) { + if ((((((__IN((*x)->typ->comp, 0x0c, 32) && (*x)->typ->BaseTyp == OPT_chartyp)) && __IN(y->typ->comp, 0x0c, 32))) && y->typ->BaseTyp == OPT_chartyp)) { subcl = 18; } else { subcl = 0; diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 96866563..f9bf31fe 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-44/OPC.c b/bootstrap/unix-44/OPC.c index 452c85d2..1fecd152 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -93,9 +93,9 @@ static BOOLEAN OPC_Undefined (OPT_Object obj); void OPC_Init (void) { OPC_indentLevel = 0; - OPC_ptrinit = __IN(5, OPM_opt); + OPC_ptrinit = __IN(5, OPM_opt, 32); OPC_mainprog = OPM_mainProg || OPM_mainLinkStat; - OPC_ansi = __IN(6, OPM_opt); + OPC_ansi = __IN(6, OPM_opt, 32); if (OPC_ansi) { __MOVE("__init(void)", OPC_BodyNameExt, 13); } else { @@ -196,7 +196,7 @@ void OPC_Ident (OPT_Object obj) int16 mode, level, h; mode = obj->mode; level = obj->mnolev; - if ((__IN(mode, 0x62) && level > 0) || __IN(mode, 0x14)) { + if ((__IN(mode, 0x62, 32) && level > 0) || __IN(mode, 0x14, 32)) { OPM_WriteStringVar((void*)obj->name, 256); h = OPC_PerfectHash((void*)obj->name, 256); if (OPC_hashtab[__X(h, 105)] >= 0) { @@ -236,7 +236,7 @@ static void OPC_Stars (OPT_Struct typ, BOOLEAN *openClause) int16 pointers; *openClause = 0; if (((typ->strobj == NIL || typ->strobj->name[0] == 0x00) && typ->comp != 4)) { - if (__IN(typ->comp, 0x0c)) { + if (__IN(typ->comp, 0x0c, 32)) { OPC_Stars(typ->BaseTyp, &*openClause); *openClause = typ->comp == 2; } else if (typ->form == 12) { @@ -293,7 +293,7 @@ static void OPC_DeclareObj (OPT_Object dcl, BOOLEAN scopeDef) break; } else if ((form == 11 && typ->BaseTyp->comp != 3)) { openClause = 1; - } else if (form == 12 || __IN(comp, 0x0c)) { + } else if (form == 12 || __IN(comp, 0x0c, 32)) { if (openClause) { OPM_Write(')'); openClause = 0; @@ -708,7 +708,7 @@ static void OPC_DefineType (OPT_Struct str) if (str->BaseTyp->comp != 4) { OPC_DefineType(str->BaseTyp); } - } else if (__IN(str->comp, 0x0c)) { + } else if (__IN(str->comp, 0x0c, 32)) { OPC_DefineType(str->BaseTyp); } else if (str->form == 12) { if (str->BaseTyp != OPT_notyp) { @@ -1019,7 +1019,7 @@ static void OPC_IdentList (OPT_Object obj, int16 vis) base = NIL; first = 1; while ((obj != NIL && obj->mode != 13)) { - if ((__IN(vis, 0x05) || (vis == 1 && obj->vis != 0)) || (vis == 3 && !obj->leaf)) { + if ((__IN(vis, 0x05, 32) || (vis == 1 && obj->vis != 0)) || (vis == 3 && !obj->leaf)) { if (obj->typ != base || (int16)obj->vis != lastvis) { if (!first) { OPC_EndStat(); @@ -1144,7 +1144,7 @@ static void OPC_ProcPredefs (OPT_Object obj, int8 vis) { if (obj != NIL) { OPC_ProcPredefs(obj->left, vis); - if ((((__IN(obj->mode, 0xc0) && obj->vis >= vis)) && (obj->history != 4 || obj->mode == 6))) { + if ((((__IN(obj->mode, 0xc0, 32) && obj->vis >= vis)) && (obj->history != 4 || obj->mode == 6))) { if (vis == 1) { OPM_WriteString((CHAR*)"import ", 8); } else if (obj->vis == 0) { @@ -1238,7 +1238,7 @@ static void OPC_GenHeaderMsg (void) OPM_Write(' '); i = 0; while (i <= 31) { - if (__IN(i, OPM_glbopt)) { + if (__IN(i, OPM_glbopt, 32)) { switch (i) { case 0: OPM_Write('x'); @@ -1600,7 +1600,7 @@ void OPC_EnterProc (OPT_Object proc) } var = proc->link; while (var != NIL) { - if ((((__IN(var->typ->comp, 0x0c) && var->mode == 1)) && var->typ->sysflag == 0)) { + if ((((__IN(var->typ->comp, 0x0c, 32) && var->mode == 1)) && var->typ->sysflag == 0)) { OPC_BegStat(); if (var->typ->comp == 2) { OPM_WriteString((CHAR*)"__DUPARR(", 10); @@ -1648,7 +1648,7 @@ void OPC_EnterProc (OPT_Object proc) OPM_Write('.'); OPC_Ident(var); OPM_WriteString((CHAR*)" = ", 4); - if (__IN(var->typ->comp, 0x0c)) { + if (__IN(var->typ->comp, 0x0c, 32)) { OPM_WriteString((CHAR*)"(void*)", 8); } else if (var->mode != 2) { OPM_Write('&'); @@ -2006,7 +2006,7 @@ void OPC_Constant (OPT_Const con, int16 form) do { i -= 1; hex = __ASHL(hex, 1); - if (__IN(i, s)) { + if (__IN(i, s, 32)) { hex += 1; } } while (!(__MASK(i, -8) == 0)); diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 81e8362d..b8f44225 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-44/OPM.c b/bootstrap/unix-44/OPM.c index 671a9d8f..6af53f8c 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -288,15 +288,15 @@ void OPM_InitOptions (void) s[0] = 0x00; Platform_GetArg(OPM_S, (void*)s, 256); } - OPM_dontAsm = __IN(13, OPM_opt); - OPM_dontLink = __IN(14, OPM_opt); - OPM_mainProg = __IN(10, OPM_opt); - OPM_mainLinkStat = __IN(15, OPM_opt); - OPM_notColorOutput = __IN(16, OPM_opt); - OPM_forceNewSym = __IN(17, OPM_opt); - OPM_Verbose = __IN(18, OPM_opt); + OPM_dontAsm = __IN(13, OPM_opt, 32); + OPM_dontLink = __IN(14, OPM_opt, 32); + OPM_mainProg = __IN(10, OPM_opt, 32); + OPM_mainLinkStat = __IN(15, OPM_opt, 32); + OPM_notColorOutput = __IN(16, OPM_opt, 32); + OPM_forceNewSym = __IN(17, OPM_opt, 32); + OPM_Verbose = __IN(18, OPM_opt, 32); if (OPM_mainLinkStat) { - OPM_glbopt |= __SETOF(10); + OPM_glbopt |= __SETOF(10,32); } OPM_GetProperties(); } @@ -773,7 +773,7 @@ void OPM_SymWLReal (LONGREAL lr) void OPM_RegisterNewSym (void) { - if (__STRCMP(OPM_modName, "SYSTEM") != 0 || __IN(10, OPM_opt)) { + if (__STRCMP(OPM_modName, "SYSTEM") != 0 || __IN(10, OPM_opt, 32)) { Files_Register(OPM_newSFile); } } @@ -972,10 +972,10 @@ void OPM_CloseFiles (void) } if (OPM_noerr) { if (__STRCMP(OPM_modName, "SYSTEM") == 0) { - if (!__IN(10, OPM_opt)) { + if (!__IN(10, OPM_opt, 32)) { Files_Register(OPM_BFile); } - } else if (!__IN(10, OPM_opt)) { + } else if (!__IN(10, OPM_opt, 32)) { OPM_Append(&OPM_R[2], Files_Rider__typ, OPM_HFile); Files_Register(OPM_HIFile); Files_Register(OPM_BFile); diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 0d9bcdeb..67edafa5 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-44/OPP.c b/bootstrap/unix-44/OPP.c index de0afa51..d8dee08e 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -94,7 +94,7 @@ static void OPP_qualident (OPT_Object *id) obj->adr = 0; } else { lev = obj->mnolev; - if ((__IN(obj->mode, 0x06) && lev != OPP_level)) { + if ((__IN(obj->mode, 0x06, 32) && lev != OPP_level)) { obj->leaf = 0; if (lev > 0) { OPB_StaticLink(OPP_level - lev); @@ -325,7 +325,7 @@ static void OPP_PointerType (OPT_Struct *typ) } else { OPP_qualident(&id); if (id->mode == 5) { - if (__IN(id->typ->comp, 0x1c)) { + if (__IN(id->typ->comp, 0x1c, 32)) { (*typ)->BaseTyp = id->typ; } else { (*typ)->BaseTyp = OPT_undftyp; @@ -338,7 +338,7 @@ static void OPP_PointerType (OPT_Struct *typ) } } else { OPP_Type(&(*typ)->BaseTyp, &OPT_notyp); - if (!__IN((*typ)->BaseTyp->comp, 0x1c)) { + if (!__IN((*typ)->BaseTyp->comp, 0x1c, 32)) { (*typ)->BaseTyp = OPT_undftyp; OPP_err(57); } @@ -966,7 +966,7 @@ static void GetCode__19 (void) } } } - (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1); + (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1,32); } static void GetParams__21 (void) @@ -998,7 +998,7 @@ static void Body__17 (void) OPT_Node procdec = NIL, statseq = NIL; int32 c; c = OPM_errpos; - (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1); + (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1,32); OPP_CheckSym(39); OPP_Block(&procdec, &statseq); OPB_Enter(&procdec, statseq, *ProcedureDeclaration__16_s->proc); @@ -1041,7 +1041,7 @@ static void TProcDecl__23 (void) if ((*ProcedureDeclaration__16_s->fwd != NIL && (*ProcedureDeclaration__16_s->fwd)->mnolev != OPP_level)) { *ProcedureDeclaration__16_s->fwd = NIL; } - if ((((*ProcedureDeclaration__16_s->fwd != NIL && (*ProcedureDeclaration__16_s->fwd)->mode == 13)) && !__IN(1, (*ProcedureDeclaration__16_s->fwd)->conval->setval))) { + if ((((*ProcedureDeclaration__16_s->fwd != NIL && (*ProcedureDeclaration__16_s->fwd)->mode == 13)) && !__IN(1, (*ProcedureDeclaration__16_s->fwd)->conval->setval, 32))) { *ProcedureDeclaration__16_s->proc = OPT_NewObj(); (*ProcedureDeclaration__16_s->proc)->leaf = 1; if ((*ProcedureDeclaration__16_s->fwd)->vis != *ProcedureDeclaration__16_s->vis) { @@ -1075,7 +1075,7 @@ static void TProcDecl__23 (void) if ((((((baseProc->vis == 1 && (*ProcedureDeclaration__16_s->proc)->vis == 0)) && recTyp->strobj != NIL)) && recTyp->strobj->vis == 1)) { OPP_err(109); } - (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(2); + (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(2,32); } if (!*ProcedureDeclaration__16_s->forward) { Body__17(); @@ -1118,7 +1118,7 @@ static void OPP_ProcedureDeclaration (OPT_Node *x) } else { OPP_err(38); } - if ((__IN(mode, 0x0600) && !OPT_SYSimported)) { + if ((__IN(mode, 0x0600, 32) && !OPT_SYSimported)) { OPP_err(135); } OPS_Get(&OPP_sym); @@ -1135,7 +1135,7 @@ static void OPP_ProcedureDeclaration (OPT_Node *x) if ((fwd != NIL && (fwd->mnolev != OPP_level || fwd->mode == 8))) { fwd = NIL; } - if ((((fwd != NIL && __IN(fwd->mode, 0xc0))) && !__IN(1, fwd->conval->setval))) { + if ((((fwd != NIL && __IN(fwd->mode, 0xc0, 32))) && !__IN(1, fwd->conval->setval, 32))) { proc = OPT_NewObj(); proc->leaf = 1; if (fwd->vis != vis) { @@ -1178,7 +1178,7 @@ static void OPP_CaseLabelList (OPT_Node *lab, OPT_Struct LabelTyp, int16 *n, OPP for (;;) { OPP_ConstExpression(&x); f = x->typ->form; - if (__IN(f, 0x18)) { + if (__IN(f, 0x18, 32)) { xval = x->conval->intval; } else { OPP_err(61); @@ -1258,7 +1258,7 @@ static void CasePart__31 (OPT_Node *x) *StatSeq__30_s->pos = OPM_errpos; if ((*x)->class == 8 || (*x)->class == 9) { OPP_err(126); - } else if (!__IN((*x)->typ->form, 0x18)) { + } else if (!__IN((*x)->typ->form, 0x18, 32)) { OPP_err(125); } OPP_CheckSym(25); @@ -1675,7 +1675,7 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) if (obj->typ->strobj == NIL) { obj->typ->strobj = obj; } - if (__IN(obj->typ->comp, 0x1c)) { + if (__IN(obj->typ->comp, 0x1c, 32)) { i = 0; while (i < OPP_nofFwdPtr) { typ = OPP_FwdPtr[__X(i, 64)]; diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 2d3ebd77..9ddded2f 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-44/OPS.c b/bootstrap/unix-44/OPS.c index e6e99c02..cd51e788 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-44/OPS.h b/bootstrap/unix-44/OPS.h index 99448598..658c87db 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-44/OPT.c b/bootstrap/unix-44/OPT.c index 4a645e7a..ab44584b 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -274,9 +274,9 @@ void OPT_Init (OPS_Name name, SET opt) __COPY(name, OPT_topScope->name, 256); OPT_GlbMod[0] = OPT_topScope; OPT_nofGmod = 1; - OPT_newsf = __IN(4, opt); - OPT_findpc = __IN(8, opt); - OPT_extsf = OPT_newsf || __IN(9, opt); + OPT_newsf = __IN(4, opt, 32); + OPT_findpc = __IN(8, opt, 32); + OPT_extsf = OPT_newsf || __IN(9, opt, 32); OPT_sfpresent = 1; } @@ -609,7 +609,7 @@ void OPT_FPrintStr (OPT_Struct typ) pvfp = pbfp; } } else if (f == 12) { - } else if (__IN(c, 0x0c)) { + } else if (__IN(c, 0x0c, 32)) { OPT_FPrintStr(btyp); OPM_FPrint(&pbfp, btyp->pvfp); pvfp = pbfp; @@ -680,7 +680,7 @@ void OPT_FPrintObj (OPT_Object obj) OPM_FPrint(&fprint, obj->vis); OPT_FPrintStr(obj->typ); OPM_FPrint(&fprint, obj->typ->pbfp); - } else if (__IN(obj->mode, 0x0480)) { + } else if (__IN(obj->mode, 0x0480, 32)) { OPT_FPrintSign(&fprint, obj->typ, obj->link); } else if (obj->mode == 9) { OPT_FPrintSign(&fprint, obj->typ, obj->link); @@ -1573,7 +1573,7 @@ static void OPT_OutObj (OPT_Object obj) OPT_ConstExt ext = NIL; if (obj != NIL) { OPT_OutObj(obj->left); - if (__IN(obj->mode, 0x06ea)) { + if (__IN(obj->mode, 0x06ea, 32)) { if (obj->history == 4) { OPT_FPrintErr(obj, 250); } else if (obj->vis != 0) { diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index 93975ea1..978ae16b 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index b264d44e..c20aef90 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -130,10 +130,10 @@ void OPV_Init (void) OPV_stamp = 0; OPV_recno = 0; OPV_nofExitLabels = 0; - OPV_assert = __IN(7, OPM_opt); - OPV_inxchk = __IN(0, OPM_opt); - OPV_mainprog = __IN(10, OPM_opt); - OPV_ansi = __IN(6, OPM_opt); + OPV_assert = __IN(7, OPM_opt, 32); + OPV_inxchk = __IN(0, OPM_opt, 32); + OPV_mainprog = __IN(10, OPM_opt, 32); + OPV_ansi = __IN(6, OPM_opt, 32); } static void OPV_GetTProcNum (OPT_Object obj) @@ -150,7 +150,7 @@ static void OPV_GetTProcNum (OPT_Object obj) OPT_FindField(obj->name, typ->BaseTyp, &redef); if (redef != NIL) { obj->adr = __ASHL(__ASHR(redef->adr, 16), 16); - if (!__IN(2, obj->conval->setval)) { + if (!__IN(2, obj->conval->setval, 32)) { OPM_err(119); } } else { @@ -230,12 +230,12 @@ static void OPV_Traverse (OPT_Object obj, OPT_Object outerScope, BOOLEAN exporte OPV_TypSize(obj->typ); } if (!exported) { - if ((__IN(mode, 0x60) && obj->mnolev > 0)) { + if ((__IN(mode, 0x60, 32) && obj->mnolev > 0)) { OPV_Stamp(obj->name); } - if (__IN(mode, 0x26)) { + if (__IN(mode, 0x26, 32)) { obj->scope = outerScope; - } else if (__IN(mode, 0x26c0)) { + } else if (__IN(mode, 0x26c0, 32)) { if (obj->conval->setval == 0x0) { OPM_err(129); } @@ -289,7 +289,7 @@ static int16 OPV_Precedence (int16 class, int16 subclass, int16 form, int16 comp return _o_result; break; case 5: - if (__IN(3, OPM_opt)) { + if (__IN(3, OPM_opt, 32)) { _o_result = 10; return _o_result; } else { @@ -298,7 +298,7 @@ static int16 OPV_Precedence (int16 class, int16 subclass, int16 form, int16 comp } break; case 1: - if (__IN(comp, 0x0c)) { + if (__IN(comp, 0x0c, 32)) { _o_result = 10; return _o_result; } else { @@ -445,7 +445,7 @@ static BOOLEAN OPV_SideEffects (OPT_Node n) static void OPV_Entier (OPT_Node n, int16 prec) { - if (__IN(n->typ->form, 0x60)) { + if (__IN(n->typ->form, 0x60, 32)) { OPM_WriteString((CHAR*)"__ENTIER(", 10); OPV_expr(n, -1); OPM_Write(')'); @@ -471,9 +471,11 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, int16 prec) if (to == 7) { OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_Entier(n, -1); + OPM_WriteString((CHAR*)",", 2); + OPM_WriteInt(__ASHL(newtype->size, 3)); OPM_Write(')'); } else if (to == 4) { - if ((newtype->size < n->typ->size && __IN(2, OPM_opt))) { + if ((newtype->size < n->typ->size && __IN(2, OPM_opt, 32))) { OPM_WriteString((CHAR*)"__SHORT", 8); if (OPV_SideEffects(n)) { OPM_Write('F'); @@ -488,7 +490,7 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, int16 prec) OPV_Entier(n, 9); } } else if (to == 3) { - if (__IN(2, OPM_opt)) { + if (__IN(2, OPM_opt, 32)) { OPM_WriteString((CHAR*)"__CHR", 6); if (OPV_SideEffects(n)) { OPM_Write('F'); @@ -511,7 +513,7 @@ static void OPV_TypeOf (OPT_Node n) OPM_WriteString((CHAR*)"__TYPEOF(", 10); OPV_expr(n, -1); OPM_Write(')'); - } else if (__IN(n->class, 0x15)) { + } else if (__IN(n->class, 0x15, 32)) { OPC_Andent(n->typ); OPM_WriteString((CHAR*)"__typ", 6); } else if (n->class == 3) { @@ -572,7 +574,7 @@ static void OPV_design (OPT_Node n, int16 prec) OPC_CompleteIdent(n->obj); break; case 1: - if (!__IN(comp, 0x0c)) { + if (!__IN(comp, 0x0c, 32)) { OPM_Write('*'); } OPC_CompleteIdent(n->obj); @@ -651,7 +653,7 @@ static void OPV_design (OPT_Node n, int16 prec) case 5: typ = n->typ; obj = n->left->obj; - if (__IN(3, OPM_opt)) { + if (__IN(3, OPM_opt, 32)) { if (typ->comp == 4) { OPM_WriteString((CHAR*)"__GUARDR(", 10); if ((int16)obj->mnolev != OPM_level) { @@ -690,7 +692,7 @@ static void OPV_design (OPT_Node n, int16 prec) } break; case 6: - if (__IN(3, OPM_opt)) { + if (__IN(3, OPM_opt, 32)) { if (n->left->class == 1) { OPM_WriteString((CHAR*)"__GUARDEQR(", 12); OPC_CompleteIdent(n->left->obj); @@ -749,7 +751,7 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp) OPM_WriteString((CHAR*)"*)", 3); prec = 10; } - if (!__IN(n->typ->comp, 0x0c)) { + if (!__IN(n->typ->comp, 0x0c, 32)) { if (mode == 2) { if ((OPV_ansi && typ != n->typ)) { OPM_WriteString((CHAR*)"(void*)", 8); @@ -757,13 +759,13 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp) OPM_Write('&'); prec = 9; } else if (OPV_ansi) { - if ((__IN(comp, 0x0c) && n->class == 7)) { + if ((__IN(comp, 0x0c, 32) && n->class == 7)) { OPM_WriteString((CHAR*)"(CHAR*)", 8); } else if ((((form == 11 && typ != n->typ)) && n->typ != OPT_niltyp)) { OPM_WriteString((CHAR*)"(void*)", 8); } } else { - if ((__IN(form, 0x60) && n->typ->form == 4)) { + if ((__IN(form, 0x60, 32) && n->typ->form == 4)) { OPM_WriteString((CHAR*)"(double)", 9); prec = 9; } else if (form == 4) { @@ -846,7 +848,7 @@ static void OPV_expr (OPT_Node n, int16 prec) l = n->left; r = n->right; exprPrec = OPV_Precedence(class, subclass, form, n->typ->comp); - if ((exprPrec <= prec && __IN(class, 0x3ce0))) { + if ((exprPrec <= prec && __IN(class, 0x3ce0, 32))) { OPM_Write('('); } switch (class) { @@ -858,6 +860,8 @@ static void OPV_expr (OPT_Node n, int16 prec) OPV_expr(l, -1); OPM_WriteString((CHAR*)", ", 3); OPV_expr(r, -1); + OPM_WriteString((CHAR*)", ", 3); + OPM_WriteInt(__ASHL(n->typ->size, 3)); OPM_Write(')'); break; case 11: @@ -924,18 +928,18 @@ static void OPV_expr (OPT_Node n, int16 prec) if (l->class == 1) { OPC_CompleteIdent(l->obj); } else { - if ((l->typ->form != 8 && !__IN(l->typ->comp, 0x0c))) { + if ((l->typ->form != 8 && !__IN(l->typ->comp, 0x0c, 32))) { OPM_Write('&'); } OPV_expr(l, exprPrec); } break; case 29: - if (!__IN(l->class, 0x17) || (((__IN(n->typ->form, 0x1890) && __IN(l->typ->form, 0x1890))) && n->typ->size == l->typ->size)) { + if (!__IN(l->class, 0x17, 32) || (((__IN(n->typ->form, 0x1890, 32) && __IN(l->typ->form, 0x1890, 32))) && n->typ->size == l->typ->size)) { OPM_Write('('); OPC_Ident(n->typ->strobj); OPM_Write(')'); - if (__IN(n->typ->form, 0x1800) || __IN(l->typ->form, 0x1800)) { + if (__IN(n->typ->form, 0x1800, 32) || __IN(l->typ->form, 0x1800, 32)) { OPM_WriteString((CHAR*)"(address)", 10); } OPV_expr(l, exprPrec); @@ -1032,20 +1036,24 @@ static void OPV_expr (OPT_Node n, int16 prec) } OPV_expr(l, -1); OPM_WriteString((CHAR*)", ", 3); - if ((((__IN(subclass, 0x18020000) && r->class == 7)) && r->conval->intval < 0)) { + if ((((__IN(subclass, 0x18020000, 32) && r->class == 7)) && r->conval->intval < 0)) { OPM_WriteInt(-r->conval->intval); } else { OPV_expr(r, -1); } - if (__IN(subclass, 0x18000000)) { + if (__IN(subclass, 0x18008000, 32)) { OPM_WriteString((CHAR*)", ", 3); - OPM_WriteInt(__ASHL(l->typ->size, 3)); + if (subclass == 15) { + OPM_WriteInt(__ASHL(r->typ->size, 3)); + } else { + OPM_WriteInt(__ASHL(l->typ->size, 3)); + } } OPM_Write(')'); break; case 9: case 10: case 11: case 12: case 13: case 14: - if (__IN(l->typ->form, 0x2100)) { + if (__IN(l->typ->form, 0x2100, 32)) { OPM_WriteString((CHAR*)"__STRCMP(", 10); OPV_expr(l, -1); OPM_WriteString((CHAR*)", ", 3); @@ -1142,7 +1150,7 @@ static void OPV_expr (OPT_Node n, int16 prec) OPV_design(n, prec); break; } - if ((exprPrec <= prec && __IN(class, 0x3ca0))) { + if ((exprPrec <= prec && __IN(class, 0x3ca0, 32))) { OPM_Write(')'); } } @@ -1432,7 +1440,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteString((CHAR*)", ", 3); OPC_Andent(n->left->typ->BaseTyp); OPM_WriteString((CHAR*)")", 2); - } else if (__IN(n->left->typ->BaseTyp->comp, 0x0c)) { + } else if (__IN(n->left->typ->BaseTyp->comp, 0x0c, 32)) { OPV_NewArr(n->left, n->right); } break; @@ -1446,6 +1454,8 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPC_SetInclude(n->subcl == 16); OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_expr(n->right, -1); + OPM_WriteString((CHAR*)",", 2); + OPM_WriteInt(__ASHL(n->left->typ->size, 3)); OPM_Write(')'); break; case 18: @@ -1623,7 +1633,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_LogWLn(); break; } - if (!__IN(n->class, 0x09744000)) { + if (!__IN(n->class, 0x09744000, 32)) { OPC_EndStat(); } n = n->link; diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 3b43e61e..ea1f9aaa 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-44/Platform.c b/bootstrap/unix-44/Platform.c index 4842a8c4..1bf0628e 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-44/Platform.h b/bootstrap/unix-44/Platform.h index 295013cf..7c0b2d21 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-44/Reals.c b/bootstrap/unix-44/Reals.c index e209af08..a64c2d13 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-44/Reals.h b/bootstrap/unix-44/Reals.h index 2779fc88..d7981245 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-44/Strings.c b/bootstrap/unix-44/Strings.c index 387345ab..67c0f055 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-44/Strings.h b/bootstrap/unix-44/Strings.h index fe90bd09..6f4f1073 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-44/Texts.c b/bootstrap/unix-44/Texts.c index 1d7b5409..503c4e06 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -578,13 +578,13 @@ void Texts_ChangeLooks (Texts_Text T, int32 beg, int32 end, SET sel, Texts_Fonts T->cache = c; T->corg = co; while (un != vn) { - if ((__IN(0, sel) && fnt != NIL)) { + if ((__IN(0, sel, 32) && fnt != NIL)) { un->fnt = fnt; } - if (__IN(1, sel)) { + if (__IN(1, sel, 32)) { un->col = col; } - if (__IN(2, sel)) { + if (__IN(2, sel, 32)) { un->voff = voff; } Texts_Merge(T, u, &un); diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index d684a9c0..b5b22e1b 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-44/Vishap.c b/bootstrap/unix-44/Vishap.c index fb1c1662..2efce68f 100644 --- a/bootstrap/unix-44/Vishap.c +++ b/bootstrap/unix-44/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkamSf */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-44/errors.c b/bootstrap/unix-44/errors.c index 7feed8e7..6f8e3d33 100644 --- a/bootstrap/unix-44/errors.c +++ b/bootstrap/unix-44/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-44/errors.h b/bootstrap/unix-44/errors.h index 4fe434e1..58286fd8 100644 --- a/bootstrap/unix-44/errors.h +++ b/bootstrap/unix-44/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/unix-44/extTools.c b/bootstrap/unix-44/extTools.c index 0afff1f0..bbecb9f2 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-44/extTools.h b/bootstrap/unix-44/extTools.h index 5d996dae..8a0d60be 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-44/vt100.c b/bootstrap/unix-44/vt100.c index 8a5286ec..b5422c40 100644 --- a/bootstrap/unix-44/vt100.c +++ b/bootstrap/unix-44/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-44/vt100.h b/bootstrap/unix-44/vt100.h index c09b4c71..85494a63 100644 --- a/bootstrap/unix-44/vt100.h +++ b/bootstrap/unix-44/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/bootstrap/unix-48/Configuration.c b/bootstrap/unix-48/Configuration.c index cc4f7969..d8c934bf 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -18,6 +18,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/09/12] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/09/14] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index 3ce4467e..2b7bdf82 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-48/Console.c b/bootstrap/unix-48/Console.c index e33f3d7c..5a0b29a2 100644 --- a/bootstrap/unix-48/Console.c +++ b/bootstrap/unix-48/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-48/Console.h b/bootstrap/unix-48/Console.h index c6fe7fc4..0af02096 100644 --- a/bootstrap/unix-48/Console.h +++ b/bootstrap/unix-48/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/unix-48/Files.c b/bootstrap/unix-48/Files.c index ebdd14a9..58145066 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-48/Files.h b/bootstrap/unix-48/Files.h index 42e60467..521906c3 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-48/Heap.c b/bootstrap/unix-48/Heap.c index 4d96ea89..f03a4d7e 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tskSfF */ #define INTEGER int16 #define LONGINT int32 @@ -82,6 +82,7 @@ export LONGINT *Heap__1__typ; static void Heap_CheckFin (void); static void Heap_ExtendHeap (address blksz); export void Heap_FINALL (void); +static address Heap_FetchAddress (address pointer); static void Heap_Finalize (void); export void Heap_GC (BOOLEAN markStack); static void Heap_HeapSort (address n, address *a, LONGINT a__len); @@ -106,7 +107,6 @@ export void Heap_Unlock (void); extern void *Heap__init(); extern address Platform_MainStackFrame; extern address Platform_OSAllocate(address size); -#define Heap_FetchAddress(pointer) (address)(*((void**)((address)pointer))) #define Heap_HeapModuleInit() Heap__init() #define Heap_OSAllocate(size) Platform_OSAllocate(size) #define Heap_PlatformHalt(code) Platform_Halt(code) @@ -188,6 +188,15 @@ static address Heap_NewChunk (address blksz) return _o_result; } +static address Heap_FetchAddress (address pointer) +{ + address _o_result; + address r; + __GET(pointer, r, address); + _o_result = r; + return _o_result; +} + static void Heap_ExtendHeap (address blksz) { address size, chnk, j, next; diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 1a6c9e05..29b4cb26 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-48/Modules.c b/bootstrap/unix-48/Modules.c index 9834a814..a71d3e4d 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-48/Modules.h b/bootstrap/unix-48/Modules.h index e34e59ed..6a744f9b 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-48/OPB.c b/bootstrap/unix-48/OPB.c index 92c0af42..a905da35 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -345,7 +345,7 @@ void OPB_Index (OPT_Node *x, OPT_Node y) f = y->typ->form; if ((*x)->class >= 7) { OPB_err(79); - } else if (f != 4 || __IN(y->class, 0x0300)) { + } else if (f != 4 || __IN(y->class, 0x0300, 32)) { OPB_err(80); y->typ = OPT_inttyp; } @@ -372,7 +372,7 @@ void OPB_Field (OPT_Node *x, OPT_Object y) if ((*x)->class >= 7) { OPB_err(77); } - if ((y != NIL && __IN(y->mode, 0x2010))) { + if ((y != NIL && __IN(y->mode, 0x2010, 32))) { OPB_BindNodes(2, y->typ, &*x, NIL); (*x)->obj = y; (*x)->readonly = (*x)->left->readonly || (y->vis == 2 && y->mnolev < 0); @@ -476,7 +476,7 @@ void OPB_In (OPT_Node *x, OPT_Node y) if (k < 0 || k > OPM_MaxSet) { OPB_err(202); } else if (y->class == 7) { - (*x)->conval->intval = OPB_BoolToInt(__IN(k, y->conval->setval)); + (*x)->conval->intval = OPB_BoolToInt(__IN(k, y->conval->setval, 32)); (*x)->obj = NIL; } else { OPB_BindNodes(12, OPT_booltyp, &*x, y); @@ -572,12 +572,12 @@ void OPB_MOp (int8 op, OPT_Node *x) } break; case 6: - if (!__IN(f, 0x70)) { + if (!__IN(f, 0x70, 32)) { OPB_err(96); } break; case 7: - if (__IN(f, 0xf0)) { + if (__IN(f, 0xf0, 32)) { if (z->class == 7) { if (f == 4) { if (z->conval->intval == (-2147483647-1)) { @@ -586,7 +586,7 @@ void OPB_MOp (int8 op, OPT_Node *x) z->conval->intval = -z->conval->intval; OPB_SetIntType(z); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { z->conval->realval = -z->conval->realval; } else { z->conval->setval = ~z->conval->setval; @@ -600,7 +600,7 @@ void OPB_MOp (int8 op, OPT_Node *x) } break; case 21: - if (__IN(f, 0x70)) { + if (__IN(f, 0x70, 32)) { if (z->class == 7) { if (f == 4) { if (z->conval->intval == (-2147483647-1)) { @@ -747,7 +747,7 @@ void OPB_CheckParameters (OPT_Object fp, OPT_Object ap, BOOLEAN checkNames) static void OPB_CheckProc (OPT_Struct x, OPT_Object y) { - if (__IN(y->mode, 0x04c0)) { + if (__IN(y->mode, 0x04c0, 32)) { if (y->mode == 6) { if (y->mnolev == 0) { y->mode = 7; @@ -923,7 +923,7 @@ static void OPB_ConstOp (int16 op, OPT_Node x, OPT_Node y) } break; case 9: - if (!__IN(g, 0x1800)) { + if (!__IN(g, 0x1800, 32)) { OPB_err(100); } break; @@ -954,7 +954,7 @@ static void OPB_ConstOp (int16 op, OPT_Node x, OPT_Node y) } else { OPB_err(204); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { temp = __ABS(yval->realval) <= (LONGREAL)1; if (temp || __ABS(xval->realval) <= 1.79769296342094e+308 / (LONGREAL)__ABS(yval->realval)) { xval->realval = xval->realval * yval->realval; @@ -978,7 +978,7 @@ static void OPB_ConstOp (int16 op, OPT_Node x, OPT_Node y) xval->realval = (LONGREAL)1; } x->typ = OPT_realtyp; - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { temp = __ABS(yval->realval) >= (LONGREAL)1; if (temp || __ABS(xval->realval) <= 1.79769296342094e+308 * __ABS(yval->realval)) { xval->realval = xval->realval / yval->realval; @@ -1032,7 +1032,7 @@ static void OPB_ConstOp (int16 op, OPT_Node x, OPT_Node y) } else { OPB_err(206); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { temp = (yval->realval >= (LONGREAL)0 && xval->realval <= 1.79769296342094e+308 - yval->realval); if (temp || (yval->realval < (LONGREAL)0 && xval->realval >= -1.79769296342094e+308 - yval->realval)) { xval->realval = xval->realval + yval->realval; @@ -1054,7 +1054,7 @@ static void OPB_ConstOp (int16 op, OPT_Node x, OPT_Node y) } else { OPB_err(207); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { temp = (yval->realval >= (LONGREAL)0 && xval->realval >= -1.79769296342094e+308 + yval->realval); if (temp || (yval->realval < (LONGREAL)0 && xval->realval <= 1.79769296342094e+308 + yval->realval)) { xval->realval = xval->realval - yval->realval; @@ -1082,28 +1082,28 @@ static void OPB_ConstOp (int16 op, OPT_Node x, OPT_Node y) xval->intval = OPB_BoolToInt(ConstCmp__14() != 9); break; case 11: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 32)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() == 11); } break; case 12: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 32)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() != 13); } break; case 13: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 32)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() == 13); } break; case 14: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 32)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() != 11); @@ -1136,7 +1136,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) (*x)->conval->intval = 1; } } - } else if (__IN(g, 0x60)) { + } else if (__IN(g, 0x60, 32)) { (*x)->conval->realval = (*x)->conval->intval; (*x)->conval->intval = -1; } else { @@ -1145,8 +1145,8 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) OPB_err(220); } } - } else if (__IN(f, 0x60)) { - if (__IN(g, 0x60)) { + } else if (__IN(f, 0x60, 32)) { + if (__IN(g, 0x60, 32)) { OPB_CheckRealType(g, 203, (*x)->conval); } else { r = (*x)->conval->realval; @@ -1195,8 +1195,8 @@ static BOOLEAN strings__41 (OPT_Node *x, OPT_Node *y) { BOOLEAN _o_result; BOOLEAN ok, xCharArr, yCharArr; - xCharArr = (__IN((*x)->typ->comp, 0x0c) && (*x)->typ->BaseTyp->form == 3) || *Op__38_s->f == 8; - yCharArr = (__IN((*y)->typ->comp, 0x0c) && (*y)->typ->BaseTyp->form == 3) || *Op__38_s->g == 8; + xCharArr = (__IN((*x)->typ->comp, 0x0c, 32) && (*x)->typ->BaseTyp->form == 3) || *Op__38_s->f == 8; + yCharArr = (__IN((*y)->typ->comp, 0x0c, 32) && (*y)->typ->BaseTyp->form == 3) || *Op__38_s->g == 8; if ((((xCharArr && *Op__38_s->g == 3)) && (*y)->class == 7)) { OPB_CharToString(*y); *Op__38_s->g = 8; @@ -1255,7 +1255,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) case 4: if ((g == 4 && y->typ->size < z->typ->size)) { OPB_Convert(&y, z->typ); - } else if (__IN(g, 0x70)) { + } else if (__IN(g, 0x70, 32)) { OPB_Convert(&z, y->typ); } else { OPB_err(100); @@ -1264,23 +1264,23 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) case 5: if (g == 4) { OPB_Convert(&y, z->typ); - } else if (__IN(g, 0x60)) { + } else if (__IN(g, 0x60, 32)) { OPB_Convert(&z, y->typ); } else { OPB_err(100); } break; case 6: - if (__IN(g, 0x70)) { + if (__IN(g, 0x70, 32)) { OPB_Convert(&y, z->typ); - } else if (__IN(g, 0x60)) { + } else if (__IN(g, 0x60, 32)) { OPB_Convert(&y, z->typ); } else { OPB_err(100); } break; case 9: - if (!__IN(g, 0x1800)) { + if (!__IN(g, 0x1800, 32)) { OPB_err(100); } break; @@ -1341,7 +1341,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) y->obj = NIL; } } - } else if (!__IN(f, 0xe1)) { + } else if (!__IN(f, 0xe1, 32)) { OPB_err(105); typ = OPT_undftyp; } @@ -1357,7 +1357,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) OPB_Convert(&z, OPT_realtyp); OPB_Convert(&y, OPT_realtyp); typ = OPT_realtyp; - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { if ((y->class == 7 && y->conval->realval == (LONGREAL)0)) { OPB_err(205); } @@ -1424,7 +1424,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) } break; case 6: - if (!__IN(f, 0xf1)) { + if (!__IN(f, 0xf1, 32)) { OPB_err(105); typ = OPT_undftyp; } @@ -1443,7 +1443,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) } break; case 7: - if (!__IN(f, 0xf1)) { + if (!__IN(f, 0xf1, 32)) { OPB_err(106); typ = OPT_undftyp; } @@ -1467,7 +1467,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) } break; case 9: case 10: - if (__IN(f, 0x1aff) || strings__41(&z, &y)) { + if (__IN(f, 0x1aff, 32) || strings__41(&z, &y)) { typ = OPT_booltyp; } else { OPB_err(107); @@ -1476,7 +1476,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) NewOp__39(op, typ, &z, y); break; case 11: case 12: case 13: case 14: - if (__IN(f, 0x79) || strings__41(&z, &y)) { + if (__IN(f, 0x79, 32) || strings__41(&z, &y)) { typ = OPT_booltyp; } else { OPM_LogWLn(); @@ -1518,10 +1518,10 @@ void OPB_SetRange (OPT_Node *x, OPT_Node y) } if (((*x)->class == 7 && y->class == 7)) { if (k <= l) { - (*x)->conval->setval = __SETRNG(k, l); + (*x)->conval->setval = __SETRNG(k, l, 32); } else { OPB_err(201); - (*x)->conval->setval = __SETRNG(l, k); + (*x)->conval->setval = __SETRNG(l, k, 32); } (*x)->obj = NIL; } else { @@ -1543,7 +1543,7 @@ void OPB_SetElem (OPT_Node *x) } else if ((*x)->class == 7) { k = (*x)->conval->intval; if ((0 <= k && k <= OPM_MaxSet)) { - (*x)->conval->setval = __SETOF(k); + (*x)->conval->setval = __SETOF(k,32); } else { OPB_err(202); } @@ -1588,7 +1588,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) case 0: case 8: break; case 1: - if (!((__IN(g, 0x1a) && y->size == 1))) { + if (!((__IN(g, 0x1a, 32) && y->size == 1))) { OPB_err(113); } break; @@ -1603,12 +1603,12 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) } break; case 5: - if (!__IN(g, 0x30)) { + if (!__IN(g, 0x30, 32)) { OPB_err(113); } break; case 6: - if (!__IN(g, 0x70)) { + if (!__IN(g, 0x70, 32)) { OPB_err(113); } break; @@ -1656,7 +1656,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) if (ynode->conval->intval2 > x->n) { OPB_err(114); } - } else if ((__IN(y->comp, 0x0c) && y->BaseTyp == OPT_chartyp)) { + } else if ((__IN(y->comp, 0x0c, 32) && y->BaseTyp == OPT_chartyp)) { } else { OPB_err(113); } @@ -1664,7 +1664,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) OPB_err(113); } } else if ((x->comp == 3 && x->BaseTyp == OPT_chartyp)) { - if ((__IN(y->comp, 0x0c) && y->BaseTyp == OPT_chartyp)) { + if ((__IN(y->comp, 0x0c, 32) && y->BaseTyp == OPT_chartyp)) { } else { OPB_err(113); } @@ -1691,7 +1691,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) OPM_LogWLn(); break; } - if ((((((ynode->class == 7 && g < f)) && __IN(g, 0x30))) && __IN(f, 0x70))) { + if ((((((ynode->class == 7 && g < f)) && __IN(g, 0x30, 32))) && __IN(f, 0x70, 32))) { OPB_Convert(&ynode, x); } } @@ -1729,7 +1729,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) OPB_err(76); } f = x->typ->BaseTyp->comp; - if (__IN(f, 0x1c)) { + if (__IN(f, 0x1c, 32)) { if (f == 3) { typ = x->typ->BaseTyp; } @@ -1762,7 +1762,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) case 5: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { OPB_Convert(&x, OPT_linttyp); } else { OPB_err(111); @@ -1837,7 +1837,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) case 9: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (__IN(f, 0x11)) { + } else if (__IN(f, 0x11, 32)) { OPB_Convert(&x, OPT_chartyp); } else { OPB_err(111); @@ -1898,7 +1898,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) } break; case 17: - if (!__IN(x->typ->comp, 0x0c)) { + if (!__IN(x->typ->comp, 0x0c, 32)) { OPB_err(131); } break; @@ -1909,7 +1909,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) } if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (((!__IN(x->typ->comp, 0x0c) || x->typ->BaseTyp->form != 3) && f != 8)) { + } else if (((!__IN(x->typ->comp, 0x0c, 32) || x->typ->BaseTyp->form != 3) && f != 8)) { OPB_err(111); } break; @@ -1933,7 +1933,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) if (x->class != 8) { OPB_err(110); x = OPB_NewIntConst(1); - } else if (__IN(f, 0x18fe) || __IN(x->typ->comp, 0x14)) { + } else if (__IN(f, 0x18fe, 32) || __IN(x->typ->comp, 0x14, 32)) { (*OPB_typSize)(x->typ); x->typ->pvused = 1; x = OPB_NewIntConst(x->typ->size); @@ -1948,7 +1948,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) case 22: case 23: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (!__IN(f, 0x9a)) { + } else if (!__IN(f, 0x9a, 32)) { OPB_err(111); } break; @@ -1957,7 +1957,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) OPB_err(126); } else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) { OPB_Convert(&x, OPT_linttyp); - } else if (!((__IN(x->typ->form, 0x0810) && x->typ->size == OPM_PointerSize))) { + } else if (!((__IN(x->typ->form, 0x0810, 32) && x->typ->size == OPM_PointerSize))) { OPB_err(111); x->typ = OPT_linttyp; } @@ -1974,7 +1974,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) case 29: if (x->class != 8) { OPB_err(110); - } else if (__IN(f, 0x0501) || x->typ->comp == 3) { + } else if (__IN(f, 0x0501, 32) || x->typ->comp == 3) { OPB_err(111); } break; @@ -2070,11 +2070,11 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) } else if (x->typ->size == 1) { L = (int16)x->conval->intval; typ = p->typ; - while ((L > 0 && __IN(typ->comp, 0x0c))) { + while ((L > 0 && __IN(typ->comp, 0x0c, 32))) { typ = typ->BaseTyp; L -= 1; } - if (L != 0 || !__IN(typ->comp, 0x0c)) { + if (L != 0 || !__IN(typ->comp, 0x0c, 32)) { OPB_err(132); } else { x->obj = NIL; @@ -2098,7 +2098,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) case 18: if (OPB_NotVar(x)) { OPB_err(112); - } else if ((__IN(x->typ->comp, 0x0c) && x->typ->BaseTyp->form == 3)) { + } else if ((__IN(x->typ->comp, 0x0c, 32) && x->typ->BaseTyp->form == 3)) { if (x->readonly) { OPB_err(76); } @@ -2172,7 +2172,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) case 24: case 25: case 26: case 27: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (__IN(f, 0x18ff)) { + } else if (__IN(f, 0x18ff, 32)) { if (fctno == 24 || fctno == 26) { if (OPB_NotVar(x)) { OPB_err(112); @@ -2198,7 +2198,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) p->typ = OPT_booltyp; break; case 29: - if (((x->class == 8 || x->class == 9) || __IN(f, 0x0501)) || x->typ->comp == 3) { + if (((x->class == 8 || x->class == 9) || __IN(f, 0x0501, 32)) || x->typ->comp == 3) { OPB_err(126); } if ((x->class != 7 && x->typ->size < p->typ->size)) { @@ -2230,7 +2230,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) OPB_err(126); } else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) { OPB_Convert(&x, OPT_linttyp); - } else if (!((__IN(x->typ->form, 0x0810) && x->typ->size == OPM_PointerSize))) { + } else if (!((__IN(x->typ->form, 0x0810, 32) && x->typ->size == OPM_PointerSize))) { OPB_err(111); x->typ = OPT_linttyp; } @@ -2384,12 +2384,12 @@ static void OPB_DynArrParCheck (OPT_Struct ftyp, OPT_Struct atyp, BOOLEAN fvarpa ftyp = ftyp->BaseTyp; atyp = atyp->BaseTyp; if ((fvarpar && ftyp == OPT_bytetyp)) { - if (!__IN(f, 0x0c) || !((__IN(atyp->form, 0x1e) && atyp->size == 1))) { - if (__IN(18, OPM_opt)) { + if (!__IN(f, 0x0c, 32) || !((__IN(atyp->form, 0x1e, 32) && atyp->size == 1))) { + if (__IN(18, OPM_opt, 32)) { OPB_err(-301); } } - } else if (__IN(f, 0x0c)) { + } else if (__IN(f, 0x0c, 32)) { if (ftyp->comp == 3) { OPB_DynArrParCheck(ftyp, atyp, fvarpar); } else if (ftyp != atyp) { @@ -2428,7 +2428,7 @@ static void OPB_CheckReceiver (OPT_Node *x, OPT_Object fp) void OPB_PrepCall (OPT_Node *x, OPT_Object *fpar) { - if (((*x)->obj != NIL && __IN((*x)->obj->mode, 0x22c0))) { + if (((*x)->obj != NIL && __IN((*x)->obj->mode, 0x22c0, 32))) { *fpar = (*x)->obj->link; if ((*x)->obj->mode == 13) { OPB_CheckReceiver(&(*x)->left, *fpar); @@ -2467,7 +2467,7 @@ void OPB_Param (OPT_Node ap, OPT_Object fp) OPB_err(111); } } else if ((fp->typ == OPT_sysptrtyp && ap->typ->form == 11)) { - } else if ((ap->typ != fp->typ && !((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e) && ap->typ->size == 1)))))) { + } else if ((ap->typ != fp->typ && !((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e, 32) && ap->typ->size == 1)))))) { OPB_err(123); } else if ((fp->typ->form == 11 && ap->class == 5)) { OPB_err(123); @@ -2494,7 +2494,7 @@ void OPB_StaticLink (int8 dlev) scope = OPT_topScope; while (dlev > 0) { dlev -= 1; - scope->link->conval->setval |= __SETOF(3); + scope->link->conval->setval |= __SETOF(3,32); scope = scope->left; } } @@ -2589,7 +2589,7 @@ void OPB_Assign (OPT_Node *x, OPT_Node y) y->conval->intval = 0; OPB_Index(&*x, OPB_NewIntConst(0)); } - if ((((((__IN((*x)->typ->comp, 0x0c) && (*x)->typ->BaseTyp == OPT_chartyp)) && __IN(y->typ->comp, 0x0c))) && y->typ->BaseTyp == OPT_chartyp)) { + if ((((((__IN((*x)->typ->comp, 0x0c, 32) && (*x)->typ->BaseTyp == OPT_chartyp)) && __IN(y->typ->comp, 0x0c, 32))) && y->typ->BaseTyp == OPT_chartyp)) { subcl = 18; } else { subcl = 0; diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 96866563..f9bf31fe 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-48/OPC.c b/bootstrap/unix-48/OPC.c index 452c85d2..1fecd152 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -93,9 +93,9 @@ static BOOLEAN OPC_Undefined (OPT_Object obj); void OPC_Init (void) { OPC_indentLevel = 0; - OPC_ptrinit = __IN(5, OPM_opt); + OPC_ptrinit = __IN(5, OPM_opt, 32); OPC_mainprog = OPM_mainProg || OPM_mainLinkStat; - OPC_ansi = __IN(6, OPM_opt); + OPC_ansi = __IN(6, OPM_opt, 32); if (OPC_ansi) { __MOVE("__init(void)", OPC_BodyNameExt, 13); } else { @@ -196,7 +196,7 @@ void OPC_Ident (OPT_Object obj) int16 mode, level, h; mode = obj->mode; level = obj->mnolev; - if ((__IN(mode, 0x62) && level > 0) || __IN(mode, 0x14)) { + if ((__IN(mode, 0x62, 32) && level > 0) || __IN(mode, 0x14, 32)) { OPM_WriteStringVar((void*)obj->name, 256); h = OPC_PerfectHash((void*)obj->name, 256); if (OPC_hashtab[__X(h, 105)] >= 0) { @@ -236,7 +236,7 @@ static void OPC_Stars (OPT_Struct typ, BOOLEAN *openClause) int16 pointers; *openClause = 0; if (((typ->strobj == NIL || typ->strobj->name[0] == 0x00) && typ->comp != 4)) { - if (__IN(typ->comp, 0x0c)) { + if (__IN(typ->comp, 0x0c, 32)) { OPC_Stars(typ->BaseTyp, &*openClause); *openClause = typ->comp == 2; } else if (typ->form == 12) { @@ -293,7 +293,7 @@ static void OPC_DeclareObj (OPT_Object dcl, BOOLEAN scopeDef) break; } else if ((form == 11 && typ->BaseTyp->comp != 3)) { openClause = 1; - } else if (form == 12 || __IN(comp, 0x0c)) { + } else if (form == 12 || __IN(comp, 0x0c, 32)) { if (openClause) { OPM_Write(')'); openClause = 0; @@ -708,7 +708,7 @@ static void OPC_DefineType (OPT_Struct str) if (str->BaseTyp->comp != 4) { OPC_DefineType(str->BaseTyp); } - } else if (__IN(str->comp, 0x0c)) { + } else if (__IN(str->comp, 0x0c, 32)) { OPC_DefineType(str->BaseTyp); } else if (str->form == 12) { if (str->BaseTyp != OPT_notyp) { @@ -1019,7 +1019,7 @@ static void OPC_IdentList (OPT_Object obj, int16 vis) base = NIL; first = 1; while ((obj != NIL && obj->mode != 13)) { - if ((__IN(vis, 0x05) || (vis == 1 && obj->vis != 0)) || (vis == 3 && !obj->leaf)) { + if ((__IN(vis, 0x05, 32) || (vis == 1 && obj->vis != 0)) || (vis == 3 && !obj->leaf)) { if (obj->typ != base || (int16)obj->vis != lastvis) { if (!first) { OPC_EndStat(); @@ -1144,7 +1144,7 @@ static void OPC_ProcPredefs (OPT_Object obj, int8 vis) { if (obj != NIL) { OPC_ProcPredefs(obj->left, vis); - if ((((__IN(obj->mode, 0xc0) && obj->vis >= vis)) && (obj->history != 4 || obj->mode == 6))) { + if ((((__IN(obj->mode, 0xc0, 32) && obj->vis >= vis)) && (obj->history != 4 || obj->mode == 6))) { if (vis == 1) { OPM_WriteString((CHAR*)"import ", 8); } else if (obj->vis == 0) { @@ -1238,7 +1238,7 @@ static void OPC_GenHeaderMsg (void) OPM_Write(' '); i = 0; while (i <= 31) { - if (__IN(i, OPM_glbopt)) { + if (__IN(i, OPM_glbopt, 32)) { switch (i) { case 0: OPM_Write('x'); @@ -1600,7 +1600,7 @@ void OPC_EnterProc (OPT_Object proc) } var = proc->link; while (var != NIL) { - if ((((__IN(var->typ->comp, 0x0c) && var->mode == 1)) && var->typ->sysflag == 0)) { + if ((((__IN(var->typ->comp, 0x0c, 32) && var->mode == 1)) && var->typ->sysflag == 0)) { OPC_BegStat(); if (var->typ->comp == 2) { OPM_WriteString((CHAR*)"__DUPARR(", 10); @@ -1648,7 +1648,7 @@ void OPC_EnterProc (OPT_Object proc) OPM_Write('.'); OPC_Ident(var); OPM_WriteString((CHAR*)" = ", 4); - if (__IN(var->typ->comp, 0x0c)) { + if (__IN(var->typ->comp, 0x0c, 32)) { OPM_WriteString((CHAR*)"(void*)", 8); } else if (var->mode != 2) { OPM_Write('&'); @@ -2006,7 +2006,7 @@ void OPC_Constant (OPT_Const con, int16 form) do { i -= 1; hex = __ASHL(hex, 1); - if (__IN(i, s)) { + if (__IN(i, s, 32)) { hex += 1; } } while (!(__MASK(i, -8) == 0)); diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 81e8362d..b8f44225 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-48/OPM.c b/bootstrap/unix-48/OPM.c index 671a9d8f..6af53f8c 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -288,15 +288,15 @@ void OPM_InitOptions (void) s[0] = 0x00; Platform_GetArg(OPM_S, (void*)s, 256); } - OPM_dontAsm = __IN(13, OPM_opt); - OPM_dontLink = __IN(14, OPM_opt); - OPM_mainProg = __IN(10, OPM_opt); - OPM_mainLinkStat = __IN(15, OPM_opt); - OPM_notColorOutput = __IN(16, OPM_opt); - OPM_forceNewSym = __IN(17, OPM_opt); - OPM_Verbose = __IN(18, OPM_opt); + OPM_dontAsm = __IN(13, OPM_opt, 32); + OPM_dontLink = __IN(14, OPM_opt, 32); + OPM_mainProg = __IN(10, OPM_opt, 32); + OPM_mainLinkStat = __IN(15, OPM_opt, 32); + OPM_notColorOutput = __IN(16, OPM_opt, 32); + OPM_forceNewSym = __IN(17, OPM_opt, 32); + OPM_Verbose = __IN(18, OPM_opt, 32); if (OPM_mainLinkStat) { - OPM_glbopt |= __SETOF(10); + OPM_glbopt |= __SETOF(10,32); } OPM_GetProperties(); } @@ -773,7 +773,7 @@ void OPM_SymWLReal (LONGREAL lr) void OPM_RegisterNewSym (void) { - if (__STRCMP(OPM_modName, "SYSTEM") != 0 || __IN(10, OPM_opt)) { + if (__STRCMP(OPM_modName, "SYSTEM") != 0 || __IN(10, OPM_opt, 32)) { Files_Register(OPM_newSFile); } } @@ -972,10 +972,10 @@ void OPM_CloseFiles (void) } if (OPM_noerr) { if (__STRCMP(OPM_modName, "SYSTEM") == 0) { - if (!__IN(10, OPM_opt)) { + if (!__IN(10, OPM_opt, 32)) { Files_Register(OPM_BFile); } - } else if (!__IN(10, OPM_opt)) { + } else if (!__IN(10, OPM_opt, 32)) { OPM_Append(&OPM_R[2], Files_Rider__typ, OPM_HFile); Files_Register(OPM_HIFile); Files_Register(OPM_BFile); diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 0d9bcdeb..67edafa5 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-48/OPP.c b/bootstrap/unix-48/OPP.c index de0afa51..d8dee08e 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -94,7 +94,7 @@ static void OPP_qualident (OPT_Object *id) obj->adr = 0; } else { lev = obj->mnolev; - if ((__IN(obj->mode, 0x06) && lev != OPP_level)) { + if ((__IN(obj->mode, 0x06, 32) && lev != OPP_level)) { obj->leaf = 0; if (lev > 0) { OPB_StaticLink(OPP_level - lev); @@ -325,7 +325,7 @@ static void OPP_PointerType (OPT_Struct *typ) } else { OPP_qualident(&id); if (id->mode == 5) { - if (__IN(id->typ->comp, 0x1c)) { + if (__IN(id->typ->comp, 0x1c, 32)) { (*typ)->BaseTyp = id->typ; } else { (*typ)->BaseTyp = OPT_undftyp; @@ -338,7 +338,7 @@ static void OPP_PointerType (OPT_Struct *typ) } } else { OPP_Type(&(*typ)->BaseTyp, &OPT_notyp); - if (!__IN((*typ)->BaseTyp->comp, 0x1c)) { + if (!__IN((*typ)->BaseTyp->comp, 0x1c, 32)) { (*typ)->BaseTyp = OPT_undftyp; OPP_err(57); } @@ -966,7 +966,7 @@ static void GetCode__19 (void) } } } - (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1); + (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1,32); } static void GetParams__21 (void) @@ -998,7 +998,7 @@ static void Body__17 (void) OPT_Node procdec = NIL, statseq = NIL; int32 c; c = OPM_errpos; - (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1); + (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1,32); OPP_CheckSym(39); OPP_Block(&procdec, &statseq); OPB_Enter(&procdec, statseq, *ProcedureDeclaration__16_s->proc); @@ -1041,7 +1041,7 @@ static void TProcDecl__23 (void) if ((*ProcedureDeclaration__16_s->fwd != NIL && (*ProcedureDeclaration__16_s->fwd)->mnolev != OPP_level)) { *ProcedureDeclaration__16_s->fwd = NIL; } - if ((((*ProcedureDeclaration__16_s->fwd != NIL && (*ProcedureDeclaration__16_s->fwd)->mode == 13)) && !__IN(1, (*ProcedureDeclaration__16_s->fwd)->conval->setval))) { + if ((((*ProcedureDeclaration__16_s->fwd != NIL && (*ProcedureDeclaration__16_s->fwd)->mode == 13)) && !__IN(1, (*ProcedureDeclaration__16_s->fwd)->conval->setval, 32))) { *ProcedureDeclaration__16_s->proc = OPT_NewObj(); (*ProcedureDeclaration__16_s->proc)->leaf = 1; if ((*ProcedureDeclaration__16_s->fwd)->vis != *ProcedureDeclaration__16_s->vis) { @@ -1075,7 +1075,7 @@ static void TProcDecl__23 (void) if ((((((baseProc->vis == 1 && (*ProcedureDeclaration__16_s->proc)->vis == 0)) && recTyp->strobj != NIL)) && recTyp->strobj->vis == 1)) { OPP_err(109); } - (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(2); + (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(2,32); } if (!*ProcedureDeclaration__16_s->forward) { Body__17(); @@ -1118,7 +1118,7 @@ static void OPP_ProcedureDeclaration (OPT_Node *x) } else { OPP_err(38); } - if ((__IN(mode, 0x0600) && !OPT_SYSimported)) { + if ((__IN(mode, 0x0600, 32) && !OPT_SYSimported)) { OPP_err(135); } OPS_Get(&OPP_sym); @@ -1135,7 +1135,7 @@ static void OPP_ProcedureDeclaration (OPT_Node *x) if ((fwd != NIL && (fwd->mnolev != OPP_level || fwd->mode == 8))) { fwd = NIL; } - if ((((fwd != NIL && __IN(fwd->mode, 0xc0))) && !__IN(1, fwd->conval->setval))) { + if ((((fwd != NIL && __IN(fwd->mode, 0xc0, 32))) && !__IN(1, fwd->conval->setval, 32))) { proc = OPT_NewObj(); proc->leaf = 1; if (fwd->vis != vis) { @@ -1178,7 +1178,7 @@ static void OPP_CaseLabelList (OPT_Node *lab, OPT_Struct LabelTyp, int16 *n, OPP for (;;) { OPP_ConstExpression(&x); f = x->typ->form; - if (__IN(f, 0x18)) { + if (__IN(f, 0x18, 32)) { xval = x->conval->intval; } else { OPP_err(61); @@ -1258,7 +1258,7 @@ static void CasePart__31 (OPT_Node *x) *StatSeq__30_s->pos = OPM_errpos; if ((*x)->class == 8 || (*x)->class == 9) { OPP_err(126); - } else if (!__IN((*x)->typ->form, 0x18)) { + } else if (!__IN((*x)->typ->form, 0x18, 32)) { OPP_err(125); } OPP_CheckSym(25); @@ -1675,7 +1675,7 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) if (obj->typ->strobj == NIL) { obj->typ->strobj = obj; } - if (__IN(obj->typ->comp, 0x1c)) { + if (__IN(obj->typ->comp, 0x1c, 32)) { i = 0; while (i < OPP_nofFwdPtr) { typ = OPP_FwdPtr[__X(i, 64)]; diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 2d3ebd77..9ddded2f 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-48/OPS.c b/bootstrap/unix-48/OPS.c index e6e99c02..cd51e788 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-48/OPS.h b/bootstrap/unix-48/OPS.h index 99448598..658c87db 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-48/OPT.c b/bootstrap/unix-48/OPT.c index 4a645e7a..ab44584b 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -274,9 +274,9 @@ void OPT_Init (OPS_Name name, SET opt) __COPY(name, OPT_topScope->name, 256); OPT_GlbMod[0] = OPT_topScope; OPT_nofGmod = 1; - OPT_newsf = __IN(4, opt); - OPT_findpc = __IN(8, opt); - OPT_extsf = OPT_newsf || __IN(9, opt); + OPT_newsf = __IN(4, opt, 32); + OPT_findpc = __IN(8, opt, 32); + OPT_extsf = OPT_newsf || __IN(9, opt, 32); OPT_sfpresent = 1; } @@ -609,7 +609,7 @@ void OPT_FPrintStr (OPT_Struct typ) pvfp = pbfp; } } else if (f == 12) { - } else if (__IN(c, 0x0c)) { + } else if (__IN(c, 0x0c, 32)) { OPT_FPrintStr(btyp); OPM_FPrint(&pbfp, btyp->pvfp); pvfp = pbfp; @@ -680,7 +680,7 @@ void OPT_FPrintObj (OPT_Object obj) OPM_FPrint(&fprint, obj->vis); OPT_FPrintStr(obj->typ); OPM_FPrint(&fprint, obj->typ->pbfp); - } else if (__IN(obj->mode, 0x0480)) { + } else if (__IN(obj->mode, 0x0480, 32)) { OPT_FPrintSign(&fprint, obj->typ, obj->link); } else if (obj->mode == 9) { OPT_FPrintSign(&fprint, obj->typ, obj->link); @@ -1573,7 +1573,7 @@ static void OPT_OutObj (OPT_Object obj) OPT_ConstExt ext = NIL; if (obj != NIL) { OPT_OutObj(obj->left); - if (__IN(obj->mode, 0x06ea)) { + if (__IN(obj->mode, 0x06ea, 32)) { if (obj->history == 4) { OPT_FPrintErr(obj, 250); } else if (obj->vis != 0) { diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index 93975ea1..978ae16b 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index b264d44e..c20aef90 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -130,10 +130,10 @@ void OPV_Init (void) OPV_stamp = 0; OPV_recno = 0; OPV_nofExitLabels = 0; - OPV_assert = __IN(7, OPM_opt); - OPV_inxchk = __IN(0, OPM_opt); - OPV_mainprog = __IN(10, OPM_opt); - OPV_ansi = __IN(6, OPM_opt); + OPV_assert = __IN(7, OPM_opt, 32); + OPV_inxchk = __IN(0, OPM_opt, 32); + OPV_mainprog = __IN(10, OPM_opt, 32); + OPV_ansi = __IN(6, OPM_opt, 32); } static void OPV_GetTProcNum (OPT_Object obj) @@ -150,7 +150,7 @@ static void OPV_GetTProcNum (OPT_Object obj) OPT_FindField(obj->name, typ->BaseTyp, &redef); if (redef != NIL) { obj->adr = __ASHL(__ASHR(redef->adr, 16), 16); - if (!__IN(2, obj->conval->setval)) { + if (!__IN(2, obj->conval->setval, 32)) { OPM_err(119); } } else { @@ -230,12 +230,12 @@ static void OPV_Traverse (OPT_Object obj, OPT_Object outerScope, BOOLEAN exporte OPV_TypSize(obj->typ); } if (!exported) { - if ((__IN(mode, 0x60) && obj->mnolev > 0)) { + if ((__IN(mode, 0x60, 32) && obj->mnolev > 0)) { OPV_Stamp(obj->name); } - if (__IN(mode, 0x26)) { + if (__IN(mode, 0x26, 32)) { obj->scope = outerScope; - } else if (__IN(mode, 0x26c0)) { + } else if (__IN(mode, 0x26c0, 32)) { if (obj->conval->setval == 0x0) { OPM_err(129); } @@ -289,7 +289,7 @@ static int16 OPV_Precedence (int16 class, int16 subclass, int16 form, int16 comp return _o_result; break; case 5: - if (__IN(3, OPM_opt)) { + if (__IN(3, OPM_opt, 32)) { _o_result = 10; return _o_result; } else { @@ -298,7 +298,7 @@ static int16 OPV_Precedence (int16 class, int16 subclass, int16 form, int16 comp } break; case 1: - if (__IN(comp, 0x0c)) { + if (__IN(comp, 0x0c, 32)) { _o_result = 10; return _o_result; } else { @@ -445,7 +445,7 @@ static BOOLEAN OPV_SideEffects (OPT_Node n) static void OPV_Entier (OPT_Node n, int16 prec) { - if (__IN(n->typ->form, 0x60)) { + if (__IN(n->typ->form, 0x60, 32)) { OPM_WriteString((CHAR*)"__ENTIER(", 10); OPV_expr(n, -1); OPM_Write(')'); @@ -471,9 +471,11 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, int16 prec) if (to == 7) { OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_Entier(n, -1); + OPM_WriteString((CHAR*)",", 2); + OPM_WriteInt(__ASHL(newtype->size, 3)); OPM_Write(')'); } else if (to == 4) { - if ((newtype->size < n->typ->size && __IN(2, OPM_opt))) { + if ((newtype->size < n->typ->size && __IN(2, OPM_opt, 32))) { OPM_WriteString((CHAR*)"__SHORT", 8); if (OPV_SideEffects(n)) { OPM_Write('F'); @@ -488,7 +490,7 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, int16 prec) OPV_Entier(n, 9); } } else if (to == 3) { - if (__IN(2, OPM_opt)) { + if (__IN(2, OPM_opt, 32)) { OPM_WriteString((CHAR*)"__CHR", 6); if (OPV_SideEffects(n)) { OPM_Write('F'); @@ -511,7 +513,7 @@ static void OPV_TypeOf (OPT_Node n) OPM_WriteString((CHAR*)"__TYPEOF(", 10); OPV_expr(n, -1); OPM_Write(')'); - } else if (__IN(n->class, 0x15)) { + } else if (__IN(n->class, 0x15, 32)) { OPC_Andent(n->typ); OPM_WriteString((CHAR*)"__typ", 6); } else if (n->class == 3) { @@ -572,7 +574,7 @@ static void OPV_design (OPT_Node n, int16 prec) OPC_CompleteIdent(n->obj); break; case 1: - if (!__IN(comp, 0x0c)) { + if (!__IN(comp, 0x0c, 32)) { OPM_Write('*'); } OPC_CompleteIdent(n->obj); @@ -651,7 +653,7 @@ static void OPV_design (OPT_Node n, int16 prec) case 5: typ = n->typ; obj = n->left->obj; - if (__IN(3, OPM_opt)) { + if (__IN(3, OPM_opt, 32)) { if (typ->comp == 4) { OPM_WriteString((CHAR*)"__GUARDR(", 10); if ((int16)obj->mnolev != OPM_level) { @@ -690,7 +692,7 @@ static void OPV_design (OPT_Node n, int16 prec) } break; case 6: - if (__IN(3, OPM_opt)) { + if (__IN(3, OPM_opt, 32)) { if (n->left->class == 1) { OPM_WriteString((CHAR*)"__GUARDEQR(", 12); OPC_CompleteIdent(n->left->obj); @@ -749,7 +751,7 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp) OPM_WriteString((CHAR*)"*)", 3); prec = 10; } - if (!__IN(n->typ->comp, 0x0c)) { + if (!__IN(n->typ->comp, 0x0c, 32)) { if (mode == 2) { if ((OPV_ansi && typ != n->typ)) { OPM_WriteString((CHAR*)"(void*)", 8); @@ -757,13 +759,13 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp) OPM_Write('&'); prec = 9; } else if (OPV_ansi) { - if ((__IN(comp, 0x0c) && n->class == 7)) { + if ((__IN(comp, 0x0c, 32) && n->class == 7)) { OPM_WriteString((CHAR*)"(CHAR*)", 8); } else if ((((form == 11 && typ != n->typ)) && n->typ != OPT_niltyp)) { OPM_WriteString((CHAR*)"(void*)", 8); } } else { - if ((__IN(form, 0x60) && n->typ->form == 4)) { + if ((__IN(form, 0x60, 32) && n->typ->form == 4)) { OPM_WriteString((CHAR*)"(double)", 9); prec = 9; } else if (form == 4) { @@ -846,7 +848,7 @@ static void OPV_expr (OPT_Node n, int16 prec) l = n->left; r = n->right; exprPrec = OPV_Precedence(class, subclass, form, n->typ->comp); - if ((exprPrec <= prec && __IN(class, 0x3ce0))) { + if ((exprPrec <= prec && __IN(class, 0x3ce0, 32))) { OPM_Write('('); } switch (class) { @@ -858,6 +860,8 @@ static void OPV_expr (OPT_Node n, int16 prec) OPV_expr(l, -1); OPM_WriteString((CHAR*)", ", 3); OPV_expr(r, -1); + OPM_WriteString((CHAR*)", ", 3); + OPM_WriteInt(__ASHL(n->typ->size, 3)); OPM_Write(')'); break; case 11: @@ -924,18 +928,18 @@ static void OPV_expr (OPT_Node n, int16 prec) if (l->class == 1) { OPC_CompleteIdent(l->obj); } else { - if ((l->typ->form != 8 && !__IN(l->typ->comp, 0x0c))) { + if ((l->typ->form != 8 && !__IN(l->typ->comp, 0x0c, 32))) { OPM_Write('&'); } OPV_expr(l, exprPrec); } break; case 29: - if (!__IN(l->class, 0x17) || (((__IN(n->typ->form, 0x1890) && __IN(l->typ->form, 0x1890))) && n->typ->size == l->typ->size)) { + if (!__IN(l->class, 0x17, 32) || (((__IN(n->typ->form, 0x1890, 32) && __IN(l->typ->form, 0x1890, 32))) && n->typ->size == l->typ->size)) { OPM_Write('('); OPC_Ident(n->typ->strobj); OPM_Write(')'); - if (__IN(n->typ->form, 0x1800) || __IN(l->typ->form, 0x1800)) { + if (__IN(n->typ->form, 0x1800, 32) || __IN(l->typ->form, 0x1800, 32)) { OPM_WriteString((CHAR*)"(address)", 10); } OPV_expr(l, exprPrec); @@ -1032,20 +1036,24 @@ static void OPV_expr (OPT_Node n, int16 prec) } OPV_expr(l, -1); OPM_WriteString((CHAR*)", ", 3); - if ((((__IN(subclass, 0x18020000) && r->class == 7)) && r->conval->intval < 0)) { + if ((((__IN(subclass, 0x18020000, 32) && r->class == 7)) && r->conval->intval < 0)) { OPM_WriteInt(-r->conval->intval); } else { OPV_expr(r, -1); } - if (__IN(subclass, 0x18000000)) { + if (__IN(subclass, 0x18008000, 32)) { OPM_WriteString((CHAR*)", ", 3); - OPM_WriteInt(__ASHL(l->typ->size, 3)); + if (subclass == 15) { + OPM_WriteInt(__ASHL(r->typ->size, 3)); + } else { + OPM_WriteInt(__ASHL(l->typ->size, 3)); + } } OPM_Write(')'); break; case 9: case 10: case 11: case 12: case 13: case 14: - if (__IN(l->typ->form, 0x2100)) { + if (__IN(l->typ->form, 0x2100, 32)) { OPM_WriteString((CHAR*)"__STRCMP(", 10); OPV_expr(l, -1); OPM_WriteString((CHAR*)", ", 3); @@ -1142,7 +1150,7 @@ static void OPV_expr (OPT_Node n, int16 prec) OPV_design(n, prec); break; } - if ((exprPrec <= prec && __IN(class, 0x3ca0))) { + if ((exprPrec <= prec && __IN(class, 0x3ca0, 32))) { OPM_Write(')'); } } @@ -1432,7 +1440,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteString((CHAR*)", ", 3); OPC_Andent(n->left->typ->BaseTyp); OPM_WriteString((CHAR*)")", 2); - } else if (__IN(n->left->typ->BaseTyp->comp, 0x0c)) { + } else if (__IN(n->left->typ->BaseTyp->comp, 0x0c, 32)) { OPV_NewArr(n->left, n->right); } break; @@ -1446,6 +1454,8 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPC_SetInclude(n->subcl == 16); OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_expr(n->right, -1); + OPM_WriteString((CHAR*)",", 2); + OPM_WriteInt(__ASHL(n->left->typ->size, 3)); OPM_Write(')'); break; case 18: @@ -1623,7 +1633,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_LogWLn(); break; } - if (!__IN(n->class, 0x09744000)) { + if (!__IN(n->class, 0x09744000, 32)) { OPC_EndStat(); } n = n->link; diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 3b43e61e..ea1f9aaa 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-48/Platform.c b/bootstrap/unix-48/Platform.c index 4842a8c4..1bf0628e 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-48/Platform.h b/bootstrap/unix-48/Platform.h index 295013cf..7c0b2d21 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-48/Reals.c b/bootstrap/unix-48/Reals.c index e209af08..a64c2d13 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-48/Reals.h b/bootstrap/unix-48/Reals.h index 2779fc88..d7981245 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-48/Strings.c b/bootstrap/unix-48/Strings.c index 387345ab..67c0f055 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-48/Strings.h b/bootstrap/unix-48/Strings.h index fe90bd09..6f4f1073 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-48/Texts.c b/bootstrap/unix-48/Texts.c index c37a4a2c..4d12f6cb 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -578,13 +578,13 @@ void Texts_ChangeLooks (Texts_Text T, int32 beg, int32 end, SET sel, Texts_Fonts T->cache = c; T->corg = co; while (un != vn) { - if ((__IN(0, sel) && fnt != NIL)) { + if ((__IN(0, sel, 32) && fnt != NIL)) { un->fnt = fnt; } - if (__IN(1, sel)) { + if (__IN(1, sel, 32)) { un->col = col; } - if (__IN(2, sel)) { + if (__IN(2, sel, 32)) { un->voff = voff; } Texts_Merge(T, u, &un); diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index c6ee484f..2b694f6c 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-48/Vishap.c b/bootstrap/unix-48/Vishap.c index fb1c1662..2efce68f 100644 --- a/bootstrap/unix-48/Vishap.c +++ b/bootstrap/unix-48/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkamSf */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-48/errors.c b/bootstrap/unix-48/errors.c index 7feed8e7..6f8e3d33 100644 --- a/bootstrap/unix-48/errors.c +++ b/bootstrap/unix-48/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-48/errors.h b/bootstrap/unix-48/errors.h index 4fe434e1..58286fd8 100644 --- a/bootstrap/unix-48/errors.h +++ b/bootstrap/unix-48/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/unix-48/extTools.c b/bootstrap/unix-48/extTools.c index 0afff1f0..bbecb9f2 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-48/extTools.h b/bootstrap/unix-48/extTools.h index 5d996dae..8a0d60be 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-48/vt100.c b/bootstrap/unix-48/vt100.c index 8a5286ec..b5422c40 100644 --- a/bootstrap/unix-48/vt100.c +++ b/bootstrap/unix-48/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-48/vt100.h b/bootstrap/unix-48/vt100.h index c09b4c71..85494a63 100644 --- a/bootstrap/unix-48/vt100.h +++ b/bootstrap/unix-48/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/bootstrap/unix-88/Configuration.c b/bootstrap/unix-88/Configuration.c index b023c21b..f3f2e52d 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -18,6 +18,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/09/12] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/09/14] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index 3ce4467e..2b7bdf82 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/unix-88/Console.c b/bootstrap/unix-88/Console.c index 3677dd09..5039dae6 100644 --- a/bootstrap/unix-88/Console.c +++ b/bootstrap/unix-88/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/unix-88/Console.h b/bootstrap/unix-88/Console.h index 27d906ad..8336a3d0 100644 --- a/bootstrap/unix-88/Console.h +++ b/bootstrap/unix-88/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/unix-88/Files.c b/bootstrap/unix-88/Files.c index acdf5f8a..1f4e38bf 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/unix-88/Files.h b/bootstrap/unix-88/Files.h index 7fb2cb03..b1a16504 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/unix-88/Heap.c b/bootstrap/unix-88/Heap.c index 67044d79..626812cb 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tskSfF */ #define INTEGER int32 #define LONGINT int64 @@ -82,6 +82,7 @@ export LONGINT *Heap__1__typ; static void Heap_CheckFin (void); static void Heap_ExtendHeap (address blksz); export void Heap_FINALL (void); +static address Heap_FetchAddress (address pointer); static void Heap_Finalize (void); export void Heap_GC (BOOLEAN markStack); static void Heap_HeapSort (address n, address *a, LONGINT a__len); @@ -106,7 +107,6 @@ export void Heap_Unlock (void); extern void *Heap__init(); extern address Platform_MainStackFrame; extern address Platform_OSAllocate(address size); -#define Heap_FetchAddress(pointer) (address)(*((void**)((address)pointer))) #define Heap_HeapModuleInit() Heap__init() #define Heap_OSAllocate(size) Platform_OSAllocate(size) #define Heap_PlatformHalt(code) Platform_Halt(code) @@ -188,6 +188,15 @@ static address Heap_NewChunk (address blksz) return _o_result; } +static address Heap_FetchAddress (address pointer) +{ + address _o_result; + address r; + __GET(pointer, r, address); + _o_result = r; + return _o_result; +} + static void Heap_ExtendHeap (address blksz) { address size, chnk, j, next; diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index 584661bc..08afe43e 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/unix-88/Modules.c b/bootstrap/unix-88/Modules.c index 547909bb..3a48e24a 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/unix-88/Modules.h b/bootstrap/unix-88/Modules.h index 2666971d..3ebde4f3 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/unix-88/OPB.c b/bootstrap/unix-88/OPB.c index f048dc85..883d2559 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -345,7 +345,7 @@ void OPB_Index (OPT_Node *x, OPT_Node y) f = y->typ->form; if ((*x)->class >= 7) { OPB_err(79); - } else if (f != 4 || __IN(y->class, 0x0300)) { + } else if (f != 4 || __IN(y->class, 0x0300, 64)) { OPB_err(80); y->typ = OPT_inttyp; } @@ -372,7 +372,7 @@ void OPB_Field (OPT_Node *x, OPT_Object y) if ((*x)->class >= 7) { OPB_err(77); } - if ((y != NIL && __IN(y->mode, 0x2010))) { + if ((y != NIL && __IN(y->mode, 0x2010, 64))) { OPB_BindNodes(2, y->typ, &*x, NIL); (*x)->obj = y; (*x)->readonly = (*x)->left->readonly || (y->vis == 2 && y->mnolev < 0); @@ -476,7 +476,7 @@ void OPB_In (OPT_Node *x, OPT_Node y) if (k < 0 || k > (int64)OPM_MaxSet) { OPB_err(202); } else if (y->class == 7) { - (*x)->conval->intval = OPB_BoolToInt(__IN(k, y->conval->setval)); + (*x)->conval->intval = OPB_BoolToInt(__IN(k, y->conval->setval, 64)); (*x)->obj = NIL; } else { OPB_BindNodes(12, OPT_booltyp, &*x, y); @@ -572,12 +572,12 @@ void OPB_MOp (int8 op, OPT_Node *x) } break; case 6: - if (!__IN(f, 0x70)) { + if (!__IN(f, 0x70, 64)) { OPB_err(96); } break; case 7: - if (__IN(f, 0xf0)) { + if (__IN(f, 0xf0, 64)) { if (z->class == 7) { if (f == 4) { if (z->conval->intval == (-9223372036854775807-1)) { @@ -586,7 +586,7 @@ void OPB_MOp (int8 op, OPT_Node *x) z->conval->intval = -z->conval->intval; OPB_SetIntType(z); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 64)) { z->conval->realval = -z->conval->realval; } else { z->conval->setval = ~z->conval->setval; @@ -600,7 +600,7 @@ void OPB_MOp (int8 op, OPT_Node *x) } break; case 21: - if (__IN(f, 0x70)) { + if (__IN(f, 0x70, 64)) { if (z->class == 7) { if (f == 4) { if (z->conval->intval == (-9223372036854775807-1)) { @@ -747,7 +747,7 @@ void OPB_CheckParameters (OPT_Object fp, OPT_Object ap, BOOLEAN checkNames) static void OPB_CheckProc (OPT_Struct x, OPT_Object y) { - if (__IN(y->mode, 0x04c0)) { + if (__IN(y->mode, 0x04c0, 64)) { if (y->mode == 6) { if (y->mnolev == 0) { y->mode = 7; @@ -923,7 +923,7 @@ static void OPB_ConstOp (int32 op, OPT_Node x, OPT_Node y) } break; case 9: - if (!__IN(g, 0x1800)) { + if (!__IN(g, 0x1800, 64)) { OPB_err(100); } break; @@ -954,7 +954,7 @@ static void OPB_ConstOp (int32 op, OPT_Node x, OPT_Node y) } else { OPB_err(204); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 64)) { temp = __ABS(yval->realval) <= (LONGREAL)1; if (temp || __ABS(xval->realval) <= 1.79769296342094e+308 / (LONGREAL)__ABS(yval->realval)) { xval->realval = xval->realval * yval->realval; @@ -978,7 +978,7 @@ static void OPB_ConstOp (int32 op, OPT_Node x, OPT_Node y) xval->realval = (LONGREAL)1; } x->typ = OPT_realtyp; - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 64)) { temp = __ABS(yval->realval) >= (LONGREAL)1; if (temp || __ABS(xval->realval) <= 1.79769296342094e+308 * __ABS(yval->realval)) { xval->realval = xval->realval / yval->realval; @@ -1032,7 +1032,7 @@ static void OPB_ConstOp (int32 op, OPT_Node x, OPT_Node y) } else { OPB_err(206); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 64)) { temp = (yval->realval >= (LONGREAL)0 && xval->realval <= 1.79769296342094e+308 - yval->realval); if (temp || (yval->realval < (LONGREAL)0 && xval->realval >= -1.79769296342094e+308 - yval->realval)) { xval->realval = xval->realval + yval->realval; @@ -1054,7 +1054,7 @@ static void OPB_ConstOp (int32 op, OPT_Node x, OPT_Node y) } else { OPB_err(207); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 64)) { temp = (yval->realval >= (LONGREAL)0 && xval->realval >= -1.79769296342094e+308 + yval->realval); if (temp || (yval->realval < (LONGREAL)0 && xval->realval <= 1.79769296342094e+308 + yval->realval)) { xval->realval = xval->realval - yval->realval; @@ -1082,28 +1082,28 @@ static void OPB_ConstOp (int32 op, OPT_Node x, OPT_Node y) xval->intval = OPB_BoolToInt(ConstCmp__14() != 9); break; case 11: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 64)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() == 11); } break; case 12: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 64)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() != 13); } break; case 13: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 64)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() == 13); } break; case 14: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 64)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() != 11); @@ -1136,7 +1136,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) (*x)->conval->intval = 1; } } - } else if (__IN(g, 0x60)) { + } else if (__IN(g, 0x60, 64)) { (*x)->conval->realval = (*x)->conval->intval; (*x)->conval->intval = -1; } else { @@ -1145,8 +1145,8 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) OPB_err(220); } } - } else if (__IN(f, 0x60)) { - if (__IN(g, 0x60)) { + } else if (__IN(f, 0x60, 64)) { + if (__IN(g, 0x60, 64)) { OPB_CheckRealType(g, 203, (*x)->conval); } else { r = (*x)->conval->realval; @@ -1195,8 +1195,8 @@ static BOOLEAN strings__41 (OPT_Node *x, OPT_Node *y) { BOOLEAN _o_result; BOOLEAN ok, xCharArr, yCharArr; - xCharArr = (__IN((*x)->typ->comp, 0x0c) && (*x)->typ->BaseTyp->form == 3) || *Op__38_s->f == 8; - yCharArr = (__IN((*y)->typ->comp, 0x0c) && (*y)->typ->BaseTyp->form == 3) || *Op__38_s->g == 8; + xCharArr = (__IN((*x)->typ->comp, 0x0c, 64) && (*x)->typ->BaseTyp->form == 3) || *Op__38_s->f == 8; + yCharArr = (__IN((*y)->typ->comp, 0x0c, 64) && (*y)->typ->BaseTyp->form == 3) || *Op__38_s->g == 8; if ((((xCharArr && *Op__38_s->g == 3)) && (*y)->class == 7)) { OPB_CharToString(*y); *Op__38_s->g = 8; @@ -1255,7 +1255,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) case 4: if ((g == 4 && y->typ->size < z->typ->size)) { OPB_Convert(&y, z->typ); - } else if (__IN(g, 0x70)) { + } else if (__IN(g, 0x70, 64)) { OPB_Convert(&z, y->typ); } else { OPB_err(100); @@ -1264,23 +1264,23 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) case 5: if (g == 4) { OPB_Convert(&y, z->typ); - } else if (__IN(g, 0x60)) { + } else if (__IN(g, 0x60, 64)) { OPB_Convert(&z, y->typ); } else { OPB_err(100); } break; case 6: - if (__IN(g, 0x70)) { + if (__IN(g, 0x70, 64)) { OPB_Convert(&y, z->typ); - } else if (__IN(g, 0x60)) { + } else if (__IN(g, 0x60, 64)) { OPB_Convert(&y, z->typ); } else { OPB_err(100); } break; case 9: - if (!__IN(g, 0x1800)) { + if (!__IN(g, 0x1800, 64)) { OPB_err(100); } break; @@ -1341,7 +1341,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) y->obj = NIL; } } - } else if (!__IN(f, 0xe1)) { + } else if (!__IN(f, 0xe1, 64)) { OPB_err(105); typ = OPT_undftyp; } @@ -1357,7 +1357,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) OPB_Convert(&z, OPT_realtyp); OPB_Convert(&y, OPT_realtyp); typ = OPT_realtyp; - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 64)) { if ((y->class == 7 && y->conval->realval == (LONGREAL)0)) { OPB_err(205); } @@ -1424,7 +1424,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) } break; case 6: - if (!__IN(f, 0xf1)) { + if (!__IN(f, 0xf1, 64)) { OPB_err(105); typ = OPT_undftyp; } @@ -1443,7 +1443,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) } break; case 7: - if (!__IN(f, 0xf1)) { + if (!__IN(f, 0xf1, 64)) { OPB_err(106); typ = OPT_undftyp; } @@ -1467,7 +1467,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) } break; case 9: case 10: - if (__IN(f, 0x1aff) || strings__41(&z, &y)) { + if (__IN(f, 0x1aff, 64) || strings__41(&z, &y)) { typ = OPT_booltyp; } else { OPB_err(107); @@ -1476,7 +1476,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) NewOp__39(op, typ, &z, y); break; case 11: case 12: case 13: case 14: - if (__IN(f, 0x79) || strings__41(&z, &y)) { + if (__IN(f, 0x79, 64) || strings__41(&z, &y)) { typ = OPT_booltyp; } else { OPM_LogWLn(); @@ -1518,10 +1518,10 @@ void OPB_SetRange (OPT_Node *x, OPT_Node y) } if (((*x)->class == 7 && y->class == 7)) { if (k <= l) { - (*x)->conval->setval = __SETRNG(k, l); + (*x)->conval->setval = __SETRNG(k, l, 64); } else { OPB_err(201); - (*x)->conval->setval = __SETRNG(l, k); + (*x)->conval->setval = __SETRNG(l, k, 64); } (*x)->obj = NIL; } else { @@ -1543,7 +1543,7 @@ void OPB_SetElem (OPT_Node *x) } else if ((*x)->class == 7) { k = (*x)->conval->intval; if ((0 <= k && k <= (int64)OPM_MaxSet)) { - (*x)->conval->setval = __SETOF(k); + (*x)->conval->setval = __SETOF(k,64); } else { OPB_err(202); } @@ -1588,7 +1588,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) case 0: case 8: break; case 1: - if (!((__IN(g, 0x1a) && y->size == 1))) { + if (!((__IN(g, 0x1a, 64) && y->size == 1))) { OPB_err(113); } break; @@ -1603,12 +1603,12 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) } break; case 5: - if (!__IN(g, 0x30)) { + if (!__IN(g, 0x30, 64)) { OPB_err(113); } break; case 6: - if (!__IN(g, 0x70)) { + if (!__IN(g, 0x70, 64)) { OPB_err(113); } break; @@ -1656,7 +1656,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) if (ynode->conval->intval2 > x->n) { OPB_err(114); } - } else if ((__IN(y->comp, 0x0c) && y->BaseTyp == OPT_chartyp)) { + } else if ((__IN(y->comp, 0x0c, 64) && y->BaseTyp == OPT_chartyp)) { } else { OPB_err(113); } @@ -1664,7 +1664,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) OPB_err(113); } } else if ((x->comp == 3 && x->BaseTyp == OPT_chartyp)) { - if ((__IN(y->comp, 0x0c) && y->BaseTyp == OPT_chartyp)) { + if ((__IN(y->comp, 0x0c, 64) && y->BaseTyp == OPT_chartyp)) { } else { OPB_err(113); } @@ -1691,7 +1691,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) OPM_LogWLn(); break; } - if ((((((ynode->class == 7 && g < f)) && __IN(g, 0x30))) && __IN(f, 0x70))) { + if ((((((ynode->class == 7 && g < f)) && __IN(g, 0x30, 64))) && __IN(f, 0x70, 64))) { OPB_Convert(&ynode, x); } } @@ -1729,7 +1729,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno) OPB_err(76); } f = x->typ->BaseTyp->comp; - if (__IN(f, 0x1c)) { + if (__IN(f, 0x1c, 64)) { if (f == 3) { typ = x->typ->BaseTyp; } @@ -1762,7 +1762,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno) case 5: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 64)) { OPB_Convert(&x, OPT_linttyp); } else { OPB_err(111); @@ -1837,7 +1837,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno) case 9: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (__IN(f, 0x11)) { + } else if (__IN(f, 0x11, 64)) { OPB_Convert(&x, OPT_chartyp); } else { OPB_err(111); @@ -1898,7 +1898,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno) } break; case 17: - if (!__IN(x->typ->comp, 0x0c)) { + if (!__IN(x->typ->comp, 0x0c, 64)) { OPB_err(131); } break; @@ -1909,7 +1909,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno) } if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (((!__IN(x->typ->comp, 0x0c) || x->typ->BaseTyp->form != 3) && f != 8)) { + } else if (((!__IN(x->typ->comp, 0x0c, 64) || x->typ->BaseTyp->form != 3) && f != 8)) { OPB_err(111); } break; @@ -1933,7 +1933,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno) if (x->class != 8) { OPB_err(110); x = OPB_NewIntConst(1); - } else if (__IN(f, 0x18fe) || __IN(x->typ->comp, 0x14)) { + } else if (__IN(f, 0x18fe, 64) || __IN(x->typ->comp, 0x14, 64)) { (*OPB_typSize)(x->typ); x->typ->pvused = 1; x = OPB_NewIntConst(x->typ->size); @@ -1948,7 +1948,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno) case 22: case 23: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (!__IN(f, 0x9a)) { + } else if (!__IN(f, 0x9a, 64)) { OPB_err(111); } break; @@ -1957,7 +1957,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno) OPB_err(126); } else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) { OPB_Convert(&x, OPT_linttyp); - } else if (!((__IN(x->typ->form, 0x0810) && x->typ->size == (int64)OPM_PointerSize))) { + } else if (!((__IN(x->typ->form, 0x0810, 64) && x->typ->size == (int64)OPM_PointerSize))) { OPB_err(111); x->typ = OPT_linttyp; } @@ -1974,7 +1974,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno) case 29: if (x->class != 8) { OPB_err(110); - } else if (__IN(f, 0x0501) || x->typ->comp == 3) { + } else if (__IN(f, 0x0501, 64) || x->typ->comp == 3) { OPB_err(111); } break; @@ -2070,11 +2070,11 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) } else if (x->typ->size == 1) { L = (int32)x->conval->intval; typ = p->typ; - while ((L > 0 && __IN(typ->comp, 0x0c))) { + while ((L > 0 && __IN(typ->comp, 0x0c, 64))) { typ = typ->BaseTyp; L -= 1; } - if (L != 0 || !__IN(typ->comp, 0x0c)) { + if (L != 0 || !__IN(typ->comp, 0x0c, 64)) { OPB_err(132); } else { x->obj = NIL; @@ -2098,7 +2098,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) case 18: if (OPB_NotVar(x)) { OPB_err(112); - } else if ((__IN(x->typ->comp, 0x0c) && x->typ->BaseTyp->form == 3)) { + } else if ((__IN(x->typ->comp, 0x0c, 64) && x->typ->BaseTyp->form == 3)) { if (x->readonly) { OPB_err(76); } @@ -2172,7 +2172,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) case 24: case 25: case 26: case 27: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (__IN(f, 0x18ff)) { + } else if (__IN(f, 0x18ff, 64)) { if (fctno == 24 || fctno == 26) { if (OPB_NotVar(x)) { OPB_err(112); @@ -2198,7 +2198,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) p->typ = OPT_booltyp; break; case 29: - if (((x->class == 8 || x->class == 9) || __IN(f, 0x0501)) || x->typ->comp == 3) { + if (((x->class == 8 || x->class == 9) || __IN(f, 0x0501, 64)) || x->typ->comp == 3) { OPB_err(126); } if ((x->class != 7 && x->typ->size < p->typ->size)) { @@ -2230,7 +2230,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) OPB_err(126); } else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) { OPB_Convert(&x, OPT_linttyp); - } else if (!((__IN(x->typ->form, 0x0810) && x->typ->size == (int64)OPM_PointerSize))) { + } else if (!((__IN(x->typ->form, 0x0810, 64) && x->typ->size == (int64)OPM_PointerSize))) { OPB_err(111); x->typ = OPT_linttyp; } @@ -2384,12 +2384,12 @@ static void OPB_DynArrParCheck (OPT_Struct ftyp, OPT_Struct atyp, BOOLEAN fvarpa ftyp = ftyp->BaseTyp; atyp = atyp->BaseTyp; if ((fvarpar && ftyp == OPT_bytetyp)) { - if (!__IN(f, 0x0c) || !((__IN(atyp->form, 0x1e) && atyp->size == 1))) { - if (__IN(18, OPM_opt)) { + if (!__IN(f, 0x0c, 64) || !((__IN(atyp->form, 0x1e, 64) && atyp->size == 1))) { + if (__IN(18, OPM_opt, 64)) { OPB_err(-301); } } - } else if (__IN(f, 0x0c)) { + } else if (__IN(f, 0x0c, 64)) { if (ftyp->comp == 3) { OPB_DynArrParCheck(ftyp, atyp, fvarpar); } else if (ftyp != atyp) { @@ -2428,7 +2428,7 @@ static void OPB_CheckReceiver (OPT_Node *x, OPT_Object fp) void OPB_PrepCall (OPT_Node *x, OPT_Object *fpar) { - if (((*x)->obj != NIL && __IN((*x)->obj->mode, 0x22c0))) { + if (((*x)->obj != NIL && __IN((*x)->obj->mode, 0x22c0, 64))) { *fpar = (*x)->obj->link; if ((*x)->obj->mode == 13) { OPB_CheckReceiver(&(*x)->left, *fpar); @@ -2467,7 +2467,7 @@ void OPB_Param (OPT_Node ap, OPT_Object fp) OPB_err(111); } } else if ((fp->typ == OPT_sysptrtyp && ap->typ->form == 11)) { - } else if ((ap->typ != fp->typ && !((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e) && ap->typ->size == 1)))))) { + } else if ((ap->typ != fp->typ && !((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e, 64) && ap->typ->size == 1)))))) { OPB_err(123); } else if ((fp->typ->form == 11 && ap->class == 5)) { OPB_err(123); @@ -2494,7 +2494,7 @@ void OPB_StaticLink (int8 dlev) scope = OPT_topScope; while (dlev > 0) { dlev -= 1; - scope->link->conval->setval |= __SETOF(3); + scope->link->conval->setval |= __SETOF(3,64); scope = scope->left; } } @@ -2589,7 +2589,7 @@ void OPB_Assign (OPT_Node *x, OPT_Node y) y->conval->intval = 0; OPB_Index(&*x, OPB_NewIntConst(0)); } - if ((((((__IN((*x)->typ->comp, 0x0c) && (*x)->typ->BaseTyp == OPT_chartyp)) && __IN(y->typ->comp, 0x0c))) && y->typ->BaseTyp == OPT_chartyp)) { + if ((((((__IN((*x)->typ->comp, 0x0c, 64) && (*x)->typ->BaseTyp == OPT_chartyp)) && __IN(y->typ->comp, 0x0c, 64))) && y->typ->BaseTyp == OPT_chartyp)) { subcl = 18; } else { subcl = 0; diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index adefb869..35fb2186 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/unix-88/OPC.c b/bootstrap/unix-88/OPC.c index aee5581c..ef8f41a1 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -93,9 +93,9 @@ static BOOLEAN OPC_Undefined (OPT_Object obj); void OPC_Init (void) { OPC_indentLevel = 0; - OPC_ptrinit = __IN(5, OPM_opt); + OPC_ptrinit = __IN(5, OPM_opt, 64); OPC_mainprog = OPM_mainProg || OPM_mainLinkStat; - OPC_ansi = __IN(6, OPM_opt); + OPC_ansi = __IN(6, OPM_opt, 64); if (OPC_ansi) { __MOVE("__init(void)", OPC_BodyNameExt, 13); } else { @@ -196,7 +196,7 @@ void OPC_Ident (OPT_Object obj) int32 mode, level, h; mode = obj->mode; level = obj->mnolev; - if ((__IN(mode, 0x62) && level > 0) || __IN(mode, 0x14)) { + if ((__IN(mode, 0x62, 64) && level > 0) || __IN(mode, 0x14, 64)) { OPM_WriteStringVar((void*)obj->name, 256); h = OPC_PerfectHash((void*)obj->name, 256); if (OPC_hashtab[__X(h, 105)] >= 0) { @@ -236,7 +236,7 @@ static void OPC_Stars (OPT_Struct typ, BOOLEAN *openClause) int32 pointers; *openClause = 0; if (((typ->strobj == NIL || typ->strobj->name[0] == 0x00) && typ->comp != 4)) { - if (__IN(typ->comp, 0x0c)) { + if (__IN(typ->comp, 0x0c, 64)) { OPC_Stars(typ->BaseTyp, &*openClause); *openClause = typ->comp == 2; } else if (typ->form == 12) { @@ -293,7 +293,7 @@ static void OPC_DeclareObj (OPT_Object dcl, BOOLEAN scopeDef) break; } else if ((form == 11 && typ->BaseTyp->comp != 3)) { openClause = 1; - } else if (form == 12 || __IN(comp, 0x0c)) { + } else if (form == 12 || __IN(comp, 0x0c, 64)) { if (openClause) { OPM_Write(')'); openClause = 0; @@ -708,7 +708,7 @@ static void OPC_DefineType (OPT_Struct str) if (str->BaseTyp->comp != 4) { OPC_DefineType(str->BaseTyp); } - } else if (__IN(str->comp, 0x0c)) { + } else if (__IN(str->comp, 0x0c, 64)) { OPC_DefineType(str->BaseTyp); } else if (str->form == 12) { if (str->BaseTyp != OPT_notyp) { @@ -1019,7 +1019,7 @@ static void OPC_IdentList (OPT_Object obj, int32 vis) base = NIL; first = 1; while ((obj != NIL && obj->mode != 13)) { - if ((__IN(vis, 0x05) || (vis == 1 && obj->vis != 0)) || (vis == 3 && !obj->leaf)) { + if ((__IN(vis, 0x05, 64) || (vis == 1 && obj->vis != 0)) || (vis == 3 && !obj->leaf)) { if (obj->typ != base || obj->vis != lastvis) { if (!first) { OPC_EndStat(); @@ -1144,7 +1144,7 @@ static void OPC_ProcPredefs (OPT_Object obj, int8 vis) { if (obj != NIL) { OPC_ProcPredefs(obj->left, vis); - if ((((__IN(obj->mode, 0xc0) && obj->vis >= vis)) && (obj->history != 4 || obj->mode == 6))) { + if ((((__IN(obj->mode, 0xc0, 64) && obj->vis >= vis)) && (obj->history != 4 || obj->mode == 6))) { if (vis == 1) { OPM_WriteString((CHAR*)"import ", 8); } else if (obj->vis == 0) { @@ -1238,7 +1238,7 @@ static void OPC_GenHeaderMsg (void) OPM_Write(' '); i = 0; while (i <= 63) { - if (__IN(i, OPM_glbopt)) { + if (__IN(i, OPM_glbopt, 64)) { switch (i) { case 0: OPM_Write('x'); @@ -1600,7 +1600,7 @@ void OPC_EnterProc (OPT_Object proc) } var = proc->link; while (var != NIL) { - if ((((__IN(var->typ->comp, 0x0c) && var->mode == 1)) && var->typ->sysflag == 0)) { + if ((((__IN(var->typ->comp, 0x0c, 64) && var->mode == 1)) && var->typ->sysflag == 0)) { OPC_BegStat(); if (var->typ->comp == 2) { OPM_WriteString((CHAR*)"__DUPARR(", 10); @@ -1648,7 +1648,7 @@ void OPC_EnterProc (OPT_Object proc) OPM_Write('.'); OPC_Ident(var); OPM_WriteString((CHAR*)" = ", 4); - if (__IN(var->typ->comp, 0x0c)) { + if (__IN(var->typ->comp, 0x0c, 64)) { OPM_WriteString((CHAR*)"(void*)", 8); } else if (var->mode != 2) { OPM_Write('&'); @@ -2006,7 +2006,7 @@ void OPC_Constant (OPT_Const con, int32 form) do { i -= 1; hex = __ASHL(hex, 1); - if (__IN(i, s)) { + if (__IN(i, s, 64)) { hex += 1; } } while (!(__MASK(i, -8) == 0)); diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index aba4bdbb..646d0151 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/unix-88/OPM.c b/bootstrap/unix-88/OPM.c index 55420864..96868200 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -288,15 +288,15 @@ void OPM_InitOptions (void) s[0] = 0x00; Platform_GetArg(OPM_S, (void*)s, 256); } - OPM_dontAsm = __IN(13, OPM_opt); - OPM_dontLink = __IN(14, OPM_opt); - OPM_mainProg = __IN(10, OPM_opt); - OPM_mainLinkStat = __IN(15, OPM_opt); - OPM_notColorOutput = __IN(16, OPM_opt); - OPM_forceNewSym = __IN(17, OPM_opt); - OPM_Verbose = __IN(18, OPM_opt); + OPM_dontAsm = __IN(13, OPM_opt, 64); + OPM_dontLink = __IN(14, OPM_opt, 64); + OPM_mainProg = __IN(10, OPM_opt, 64); + OPM_mainLinkStat = __IN(15, OPM_opt, 64); + OPM_notColorOutput = __IN(16, OPM_opt, 64); + OPM_forceNewSym = __IN(17, OPM_opt, 64); + OPM_Verbose = __IN(18, OPM_opt, 64); if (OPM_mainLinkStat) { - OPM_glbopt |= __SETOF(10); + OPM_glbopt |= __SETOF(10,64); } OPM_GetProperties(); } @@ -771,7 +771,7 @@ void OPM_SymWLReal (LONGREAL lr) void OPM_RegisterNewSym (void) { - if (__STRCMP(OPM_modName, "SYSTEM") != 0 || __IN(10, OPM_opt)) { + if (__STRCMP(OPM_modName, "SYSTEM") != 0 || __IN(10, OPM_opt, 64)) { Files_Register(OPM_newSFile); } } @@ -970,10 +970,10 @@ void OPM_CloseFiles (void) } if (OPM_noerr) { if (__STRCMP(OPM_modName, "SYSTEM") == 0) { - if (!__IN(10, OPM_opt)) { + if (!__IN(10, OPM_opt, 64)) { Files_Register(OPM_BFile); } - } else if (!__IN(10, OPM_opt)) { + } else if (!__IN(10, OPM_opt, 64)) { OPM_Append(&OPM_R[2], Files_Rider__typ, OPM_HFile); Files_Register(OPM_HIFile); Files_Register(OPM_BFile); diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 1e5c3e72..d4b77c79 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/unix-88/OPP.c b/bootstrap/unix-88/OPP.c index f175938c..7e958472 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -94,7 +94,7 @@ static void OPP_qualident (OPT_Object *id) obj->adr = 0; } else { lev = obj->mnolev; - if ((__IN(obj->mode, 0x06) && lev != OPP_level)) { + if ((__IN(obj->mode, 0x06, 64) && lev != OPP_level)) { obj->leaf = 0; if (lev > 0) { OPB_StaticLink(OPP_level - lev); @@ -325,7 +325,7 @@ static void OPP_PointerType (OPT_Struct *typ) } else { OPP_qualident(&id); if (id->mode == 5) { - if (__IN(id->typ->comp, 0x1c)) { + if (__IN(id->typ->comp, 0x1c, 64)) { (*typ)->BaseTyp = id->typ; } else { (*typ)->BaseTyp = OPT_undftyp; @@ -338,7 +338,7 @@ static void OPP_PointerType (OPT_Struct *typ) } } else { OPP_Type(&(*typ)->BaseTyp, &OPT_notyp); - if (!__IN((*typ)->BaseTyp->comp, 0x1c)) { + if (!__IN((*typ)->BaseTyp->comp, 0x1c, 64)) { (*typ)->BaseTyp = OPT_undftyp; OPP_err(57); } @@ -966,7 +966,7 @@ static void GetCode__19 (void) } } } - (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1); + (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1,64); } static void GetParams__21 (void) @@ -998,7 +998,7 @@ static void Body__17 (void) OPT_Node procdec = NIL, statseq = NIL; int64 c; c = OPM_errpos; - (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1); + (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1,64); OPP_CheckSym(39); OPP_Block(&procdec, &statseq); OPB_Enter(&procdec, statseq, *ProcedureDeclaration__16_s->proc); @@ -1041,7 +1041,7 @@ static void TProcDecl__23 (void) if ((*ProcedureDeclaration__16_s->fwd != NIL && (*ProcedureDeclaration__16_s->fwd)->mnolev != OPP_level)) { *ProcedureDeclaration__16_s->fwd = NIL; } - if ((((*ProcedureDeclaration__16_s->fwd != NIL && (*ProcedureDeclaration__16_s->fwd)->mode == 13)) && !__IN(1, (*ProcedureDeclaration__16_s->fwd)->conval->setval))) { + if ((((*ProcedureDeclaration__16_s->fwd != NIL && (*ProcedureDeclaration__16_s->fwd)->mode == 13)) && !__IN(1, (*ProcedureDeclaration__16_s->fwd)->conval->setval, 64))) { *ProcedureDeclaration__16_s->proc = OPT_NewObj(); (*ProcedureDeclaration__16_s->proc)->leaf = 1; if ((*ProcedureDeclaration__16_s->fwd)->vis != *ProcedureDeclaration__16_s->vis) { @@ -1075,7 +1075,7 @@ static void TProcDecl__23 (void) if ((((((baseProc->vis == 1 && (*ProcedureDeclaration__16_s->proc)->vis == 0)) && recTyp->strobj != NIL)) && recTyp->strobj->vis == 1)) { OPP_err(109); } - (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(2); + (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(2,64); } if (!*ProcedureDeclaration__16_s->forward) { Body__17(); @@ -1118,7 +1118,7 @@ static void OPP_ProcedureDeclaration (OPT_Node *x) } else { OPP_err(38); } - if ((__IN(mode, 0x0600) && !OPT_SYSimported)) { + if ((__IN(mode, 0x0600, 64) && !OPT_SYSimported)) { OPP_err(135); } OPS_Get(&OPP_sym); @@ -1135,7 +1135,7 @@ static void OPP_ProcedureDeclaration (OPT_Node *x) if ((fwd != NIL && (fwd->mnolev != OPP_level || fwd->mode == 8))) { fwd = NIL; } - if ((((fwd != NIL && __IN(fwd->mode, 0xc0))) && !__IN(1, fwd->conval->setval))) { + if ((((fwd != NIL && __IN(fwd->mode, 0xc0, 64))) && !__IN(1, fwd->conval->setval, 64))) { proc = OPT_NewObj(); proc->leaf = 1; if (fwd->vis != vis) { @@ -1178,7 +1178,7 @@ static void OPP_CaseLabelList (OPT_Node *lab, OPT_Struct LabelTyp, int32 *n, OPP for (;;) { OPP_ConstExpression(&x); f = x->typ->form; - if (__IN(f, 0x18)) { + if (__IN(f, 0x18, 64)) { xval = x->conval->intval; } else { OPP_err(61); @@ -1258,7 +1258,7 @@ static void CasePart__31 (OPT_Node *x) *StatSeq__30_s->pos = OPM_errpos; if ((*x)->class == 8 || (*x)->class == 9) { OPP_err(126); - } else if (!__IN((*x)->typ->form, 0x18)) { + } else if (!__IN((*x)->typ->form, 0x18, 64)) { OPP_err(125); } OPP_CheckSym(25); @@ -1675,7 +1675,7 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) if (obj->typ->strobj == NIL) { obj->typ->strobj = obj; } - if (__IN(obj->typ->comp, 0x1c)) { + if (__IN(obj->typ->comp, 0x1c, 64)) { i = 0; while (i < OPP_nofFwdPtr) { typ = OPP_FwdPtr[__X(i, 64)]; diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 2d3ebd77..9ddded2f 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/unix-88/OPS.c b/bootstrap/unix-88/OPS.c index 0c36910a..208f4934 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/unix-88/OPS.h b/bootstrap/unix-88/OPS.h index a16c2ce8..bb045fe9 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/unix-88/OPT.c b/bootstrap/unix-88/OPT.c index 3006ea90..afc5a8b6 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -274,9 +274,9 @@ void OPT_Init (OPS_Name name, SET opt) __COPY(name, OPT_topScope->name, 256); OPT_GlbMod[0] = OPT_topScope; OPT_nofGmod = 1; - OPT_newsf = __IN(4, opt); - OPT_findpc = __IN(8, opt); - OPT_extsf = OPT_newsf || __IN(9, opt); + OPT_newsf = __IN(4, opt, 64); + OPT_findpc = __IN(8, opt, 64); + OPT_extsf = OPT_newsf || __IN(9, opt, 64); OPT_sfpresent = 1; } @@ -609,7 +609,7 @@ void OPT_FPrintStr (OPT_Struct typ) pvfp = pbfp; } } else if (f == 12) { - } else if (__IN(c, 0x0c)) { + } else if (__IN(c, 0x0c, 64)) { OPT_FPrintStr(btyp); OPM_FPrint(&pbfp, btyp->pvfp); pvfp = pbfp; @@ -680,7 +680,7 @@ void OPT_FPrintObj (OPT_Object obj) OPM_FPrint(&fprint, obj->vis); OPT_FPrintStr(obj->typ); OPM_FPrint(&fprint, obj->typ->pbfp); - } else if (__IN(obj->mode, 0x0480)) { + } else if (__IN(obj->mode, 0x0480, 64)) { OPT_FPrintSign(&fprint, obj->typ, obj->link); } else if (obj->mode == 9) { OPT_FPrintSign(&fprint, obj->typ, obj->link); @@ -1573,7 +1573,7 @@ static void OPT_OutObj (OPT_Object obj) OPT_ConstExt ext = NIL; if (obj != NIL) { OPT_OutObj(obj->left); - if (__IN(obj->mode, 0x06ea)) { + if (__IN(obj->mode, 0x06ea, 64)) { if (obj->history == 4) { OPT_FPrintErr(obj, 250); } else if (obj->vis != 0) { diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 5f466ec4..090d9111 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 082797f1..098463c4 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -130,10 +130,10 @@ void OPV_Init (void) OPV_stamp = 0; OPV_recno = 0; OPV_nofExitLabels = 0; - OPV_assert = __IN(7, OPM_opt); - OPV_inxchk = __IN(0, OPM_opt); - OPV_mainprog = __IN(10, OPM_opt); - OPV_ansi = __IN(6, OPM_opt); + OPV_assert = __IN(7, OPM_opt, 64); + OPV_inxchk = __IN(0, OPM_opt, 64); + OPV_mainprog = __IN(10, OPM_opt, 64); + OPV_ansi = __IN(6, OPM_opt, 64); } static void OPV_GetTProcNum (OPT_Object obj) @@ -150,7 +150,7 @@ static void OPV_GetTProcNum (OPT_Object obj) OPT_FindField(obj->name, typ->BaseTyp, &redef); if (redef != NIL) { obj->adr = __ASHL(__ASHR(redef->adr, 16), 16); - if (!__IN(2, obj->conval->setval)) { + if (!__IN(2, obj->conval->setval, 64)) { OPM_err(119); } } else { @@ -230,12 +230,12 @@ static void OPV_Traverse (OPT_Object obj, OPT_Object outerScope, BOOLEAN exporte OPV_TypSize(obj->typ); } if (!exported) { - if ((__IN(mode, 0x60) && obj->mnolev > 0)) { + if ((__IN(mode, 0x60, 64) && obj->mnolev > 0)) { OPV_Stamp(obj->name); } - if (__IN(mode, 0x26)) { + if (__IN(mode, 0x26, 64)) { obj->scope = outerScope; - } else if (__IN(mode, 0x26c0)) { + } else if (__IN(mode, 0x26c0, 64)) { if (obj->conval->setval == 0x0) { OPM_err(129); } @@ -289,7 +289,7 @@ static int32 OPV_Precedence (int32 class, int32 subclass, int32 form, int32 comp return _o_result; break; case 5: - if (__IN(3, OPM_opt)) { + if (__IN(3, OPM_opt, 64)) { _o_result = 10; return _o_result; } else { @@ -298,7 +298,7 @@ static int32 OPV_Precedence (int32 class, int32 subclass, int32 form, int32 comp } break; case 1: - if (__IN(comp, 0x0c)) { + if (__IN(comp, 0x0c, 64)) { _o_result = 10; return _o_result; } else { @@ -445,7 +445,7 @@ static BOOLEAN OPV_SideEffects (OPT_Node n) static void OPV_Entier (OPT_Node n, int32 prec) { - if (__IN(n->typ->form, 0x60)) { + if (__IN(n->typ->form, 0x60, 64)) { OPM_WriteString((CHAR*)"__ENTIER(", 10); OPV_expr(n, -1); OPM_Write(')'); @@ -471,9 +471,11 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, int32 prec) if (to == 7) { OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_Entier(n, -1); + OPM_WriteString((CHAR*)",", 2); + OPM_WriteInt(__ASHL(newtype->size, 3)); OPM_Write(')'); } else if (to == 4) { - if ((newtype->size < n->typ->size && __IN(2, OPM_opt))) { + if ((newtype->size < n->typ->size && __IN(2, OPM_opt, 64))) { OPM_WriteString((CHAR*)"__SHORT", 8); if (OPV_SideEffects(n)) { OPM_Write('F'); @@ -488,7 +490,7 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, int32 prec) OPV_Entier(n, 9); } } else if (to == 3) { - if (__IN(2, OPM_opt)) { + if (__IN(2, OPM_opt, 64)) { OPM_WriteString((CHAR*)"__CHR", 6); if (OPV_SideEffects(n)) { OPM_Write('F'); @@ -511,7 +513,7 @@ static void OPV_TypeOf (OPT_Node n) OPM_WriteString((CHAR*)"__TYPEOF(", 10); OPV_expr(n, -1); OPM_Write(')'); - } else if (__IN(n->class, 0x15)) { + } else if (__IN(n->class, 0x15, 64)) { OPC_Andent(n->typ); OPM_WriteString((CHAR*)"__typ", 6); } else if (n->class == 3) { @@ -572,7 +574,7 @@ static void OPV_design (OPT_Node n, int32 prec) OPC_CompleteIdent(n->obj); break; case 1: - if (!__IN(comp, 0x0c)) { + if (!__IN(comp, 0x0c, 64)) { OPM_Write('*'); } OPC_CompleteIdent(n->obj); @@ -651,7 +653,7 @@ static void OPV_design (OPT_Node n, int32 prec) case 5: typ = n->typ; obj = n->left->obj; - if (__IN(3, OPM_opt)) { + if (__IN(3, OPM_opt, 64)) { if (typ->comp == 4) { OPM_WriteString((CHAR*)"__GUARDR(", 10); if (obj->mnolev != OPM_level) { @@ -690,7 +692,7 @@ static void OPV_design (OPT_Node n, int32 prec) } break; case 6: - if (__IN(3, OPM_opt)) { + if (__IN(3, OPM_opt, 64)) { if (n->left->class == 1) { OPM_WriteString((CHAR*)"__GUARDEQR(", 12); OPC_CompleteIdent(n->left->obj); @@ -749,7 +751,7 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp) OPM_WriteString((CHAR*)"*)", 3); prec = 10; } - if (!__IN(n->typ->comp, 0x0c)) { + if (!__IN(n->typ->comp, 0x0c, 64)) { if (mode == 2) { if ((OPV_ansi && typ != n->typ)) { OPM_WriteString((CHAR*)"(void*)", 8); @@ -757,13 +759,13 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp) OPM_Write('&'); prec = 9; } else if (OPV_ansi) { - if ((__IN(comp, 0x0c) && n->class == 7)) { + if ((__IN(comp, 0x0c, 64) && n->class == 7)) { OPM_WriteString((CHAR*)"(CHAR*)", 8); } else if ((((form == 11 && typ != n->typ)) && n->typ != OPT_niltyp)) { OPM_WriteString((CHAR*)"(void*)", 8); } } else { - if ((__IN(form, 0x60) && n->typ->form == 4)) { + if ((__IN(form, 0x60, 64) && n->typ->form == 4)) { OPM_WriteString((CHAR*)"(double)", 9); prec = 9; } else if (form == 4) { @@ -846,7 +848,7 @@ static void OPV_expr (OPT_Node n, int32 prec) l = n->left; r = n->right; exprPrec = OPV_Precedence(class, subclass, form, n->typ->comp); - if ((exprPrec <= prec && __IN(class, 0x3ce0))) { + if ((exprPrec <= prec && __IN(class, 0x3ce0, 64))) { OPM_Write('('); } switch (class) { @@ -858,6 +860,8 @@ static void OPV_expr (OPT_Node n, int32 prec) OPV_expr(l, -1); OPM_WriteString((CHAR*)", ", 3); OPV_expr(r, -1); + OPM_WriteString((CHAR*)", ", 3); + OPM_WriteInt(__ASHL(n->typ->size, 3)); OPM_Write(')'); break; case 11: @@ -924,18 +928,18 @@ static void OPV_expr (OPT_Node n, int32 prec) if (l->class == 1) { OPC_CompleteIdent(l->obj); } else { - if ((l->typ->form != 8 && !__IN(l->typ->comp, 0x0c))) { + if ((l->typ->form != 8 && !__IN(l->typ->comp, 0x0c, 64))) { OPM_Write('&'); } OPV_expr(l, exprPrec); } break; case 29: - if (!__IN(l->class, 0x17) || (((__IN(n->typ->form, 0x1890) && __IN(l->typ->form, 0x1890))) && n->typ->size == l->typ->size)) { + if (!__IN(l->class, 0x17, 64) || (((__IN(n->typ->form, 0x1890, 64) && __IN(l->typ->form, 0x1890, 64))) && n->typ->size == l->typ->size)) { OPM_Write('('); OPC_Ident(n->typ->strobj); OPM_Write(')'); - if (__IN(n->typ->form, 0x1800) || __IN(l->typ->form, 0x1800)) { + if (__IN(n->typ->form, 0x1800, 64) || __IN(l->typ->form, 0x1800, 64)) { OPM_WriteString((CHAR*)"(address)", 10); } OPV_expr(l, exprPrec); @@ -1032,20 +1036,24 @@ static void OPV_expr (OPT_Node n, int32 prec) } OPV_expr(l, -1); OPM_WriteString((CHAR*)", ", 3); - if ((((__IN(subclass, 0x18020000) && r->class == 7)) && r->conval->intval < 0)) { + if ((((__IN(subclass, 0x18020000, 64) && r->class == 7)) && r->conval->intval < 0)) { OPM_WriteInt(-r->conval->intval); } else { OPV_expr(r, -1); } - if (__IN(subclass, 0x18000000)) { + if (__IN(subclass, 0x18008000, 64)) { OPM_WriteString((CHAR*)", ", 3); - OPM_WriteInt(__ASHL(l->typ->size, 3)); + if (subclass == 15) { + OPM_WriteInt(__ASHL(r->typ->size, 3)); + } else { + OPM_WriteInt(__ASHL(l->typ->size, 3)); + } } OPM_Write(')'); break; case 9: case 10: case 11: case 12: case 13: case 14: - if (__IN(l->typ->form, 0x2100)) { + if (__IN(l->typ->form, 0x2100, 64)) { OPM_WriteString((CHAR*)"__STRCMP(", 10); OPV_expr(l, -1); OPM_WriteString((CHAR*)", ", 3); @@ -1142,7 +1150,7 @@ static void OPV_expr (OPT_Node n, int32 prec) OPV_design(n, prec); break; } - if ((exprPrec <= prec && __IN(class, 0x3ca0))) { + if ((exprPrec <= prec && __IN(class, 0x3ca0, 64))) { OPM_Write(')'); } } @@ -1432,7 +1440,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteString((CHAR*)", ", 3); OPC_Andent(n->left->typ->BaseTyp); OPM_WriteString((CHAR*)")", 2); - } else if (__IN(n->left->typ->BaseTyp->comp, 0x0c)) { + } else if (__IN(n->left->typ->BaseTyp->comp, 0x0c, 64)) { OPV_NewArr(n->left, n->right); } break; @@ -1446,6 +1454,8 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPC_SetInclude(n->subcl == 16); OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_expr(n->right, -1); + OPM_WriteString((CHAR*)",", 2); + OPM_WriteInt(__ASHL(n->left->typ->size, 3)); OPM_Write(')'); break; case 18: @@ -1623,7 +1633,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_LogWLn(); break; } - if (!__IN(n->class, 0x09744000)) { + if (!__IN(n->class, 0x09744000, 64)) { OPC_EndStat(); } n = n->link; diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 3b43e61e..ea1f9aaa 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/unix-88/Platform.c b/bootstrap/unix-88/Platform.c index cf8dfa9f..f428c2b1 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/unix-88/Platform.h b/bootstrap/unix-88/Platform.h index 708e58d7..d9212710 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/unix-88/Reals.c b/bootstrap/unix-88/Reals.c index 2a753b7a..b3e89e04 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/unix-88/Reals.h b/bootstrap/unix-88/Reals.h index c3cac05a..3892d49c 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/unix-88/Strings.c b/bootstrap/unix-88/Strings.c index d8c606d3..1eef261b 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/unix-88/Strings.h b/bootstrap/unix-88/Strings.h index 130e1d06..8145aa00 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/unix-88/Texts.c b/bootstrap/unix-88/Texts.c index 056c54e0..d8710e54 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -578,13 +578,13 @@ void Texts_ChangeLooks (Texts_Text T, int64 beg, int64 end, SET sel, Texts_Fonts T->cache = c; T->corg = co; while (un != vn) { - if ((__IN(0, sel) && fnt != NIL)) { + if ((__IN(0, sel, 64) && fnt != NIL)) { un->fnt = fnt; } - if (__IN(1, sel)) { + if (__IN(1, sel, 64)) { un->col = col; } - if (__IN(2, sel)) { + if (__IN(2, sel, 64)) { un->voff = voff; } Texts_Merge(T, u, &un); diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index 1e734f9d..8389bc47 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/unix-88/Vishap.c b/bootstrap/unix-88/Vishap.c index 08b89b00..3972af10 100644 --- a/bootstrap/unix-88/Vishap.c +++ b/bootstrap/unix-88/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkamSf */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/unix-88/errors.c b/bootstrap/unix-88/errors.c index 84d35faf..8864c777 100644 --- a/bootstrap/unix-88/errors.c +++ b/bootstrap/unix-88/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/unix-88/errors.h b/bootstrap/unix-88/errors.h index 4fe434e1..58286fd8 100644 --- a/bootstrap/unix-88/errors.h +++ b/bootstrap/unix-88/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/unix-88/extTools.c b/bootstrap/unix-88/extTools.c index 7651bcf8..bb60848a 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/unix-88/extTools.h b/bootstrap/unix-88/extTools.h index 5d996dae..8a0d60be 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/unix-88/vt100.c b/bootstrap/unix-88/vt100.c index b7524886..c143a6b3 100644 --- a/bootstrap/unix-88/vt100.c +++ b/bootstrap/unix-88/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/unix-88/vt100.h b/bootstrap/unix-88/vt100.h index ef3afa5a..11a9c941 100644 --- a/bootstrap/unix-88/vt100.h +++ b/bootstrap/unix-88/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/bootstrap/windows-48/Configuration.c b/bootstrap/windows-48/Configuration.c index cc4f7969..d8c934bf 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -18,6 +18,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/09/12] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/09/14] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index 3ce4467e..2b7bdf82 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-48/Console.c b/bootstrap/windows-48/Console.c index 6ad2295c..359bad0a 100644 --- a/bootstrap/windows-48/Console.c +++ b/bootstrap/windows-48/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/windows-48/Console.h b/bootstrap/windows-48/Console.h index c6fe7fc4..0af02096 100644 --- a/bootstrap/windows-48/Console.h +++ b/bootstrap/windows-48/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/windows-48/Files.c b/bootstrap/windows-48/Files.c index 1e560865..01218f26 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/windows-48/Files.h b/bootstrap/windows-48/Files.h index b082c461..ffdc05f6 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-48/Heap.c b/bootstrap/windows-48/Heap.c index 4d96ea89..f03a4d7e 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tskSfF */ #define INTEGER int16 #define LONGINT int32 @@ -82,6 +82,7 @@ export LONGINT *Heap__1__typ; static void Heap_CheckFin (void); static void Heap_ExtendHeap (address blksz); export void Heap_FINALL (void); +static address Heap_FetchAddress (address pointer); static void Heap_Finalize (void); export void Heap_GC (BOOLEAN markStack); static void Heap_HeapSort (address n, address *a, LONGINT a__len); @@ -106,7 +107,6 @@ export void Heap_Unlock (void); extern void *Heap__init(); extern address Platform_MainStackFrame; extern address Platform_OSAllocate(address size); -#define Heap_FetchAddress(pointer) (address)(*((void**)((address)pointer))) #define Heap_HeapModuleInit() Heap__init() #define Heap_OSAllocate(size) Platform_OSAllocate(size) #define Heap_PlatformHalt(code) Platform_Halt(code) @@ -188,6 +188,15 @@ static address Heap_NewChunk (address blksz) return _o_result; } +static address Heap_FetchAddress (address pointer) +{ + address _o_result; + address r; + __GET(pointer, r, address); + _o_result = r; + return _o_result; +} + static void Heap_ExtendHeap (address blksz) { address size, chnk, j, next; diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 1a6c9e05..29b4cb26 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-48/Modules.c b/bootstrap/windows-48/Modules.c index 9834a814..a71d3e4d 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/windows-48/Modules.h b/bootstrap/windows-48/Modules.h index e34e59ed..6a744f9b 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-48/OPB.c b/bootstrap/windows-48/OPB.c index 92c0af42..a905da35 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -345,7 +345,7 @@ void OPB_Index (OPT_Node *x, OPT_Node y) f = y->typ->form; if ((*x)->class >= 7) { OPB_err(79); - } else if (f != 4 || __IN(y->class, 0x0300)) { + } else if (f != 4 || __IN(y->class, 0x0300, 32)) { OPB_err(80); y->typ = OPT_inttyp; } @@ -372,7 +372,7 @@ void OPB_Field (OPT_Node *x, OPT_Object y) if ((*x)->class >= 7) { OPB_err(77); } - if ((y != NIL && __IN(y->mode, 0x2010))) { + if ((y != NIL && __IN(y->mode, 0x2010, 32))) { OPB_BindNodes(2, y->typ, &*x, NIL); (*x)->obj = y; (*x)->readonly = (*x)->left->readonly || (y->vis == 2 && y->mnolev < 0); @@ -476,7 +476,7 @@ void OPB_In (OPT_Node *x, OPT_Node y) if (k < 0 || k > OPM_MaxSet) { OPB_err(202); } else if (y->class == 7) { - (*x)->conval->intval = OPB_BoolToInt(__IN(k, y->conval->setval)); + (*x)->conval->intval = OPB_BoolToInt(__IN(k, y->conval->setval, 32)); (*x)->obj = NIL; } else { OPB_BindNodes(12, OPT_booltyp, &*x, y); @@ -572,12 +572,12 @@ void OPB_MOp (int8 op, OPT_Node *x) } break; case 6: - if (!__IN(f, 0x70)) { + if (!__IN(f, 0x70, 32)) { OPB_err(96); } break; case 7: - if (__IN(f, 0xf0)) { + if (__IN(f, 0xf0, 32)) { if (z->class == 7) { if (f == 4) { if (z->conval->intval == (-2147483647-1)) { @@ -586,7 +586,7 @@ void OPB_MOp (int8 op, OPT_Node *x) z->conval->intval = -z->conval->intval; OPB_SetIntType(z); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { z->conval->realval = -z->conval->realval; } else { z->conval->setval = ~z->conval->setval; @@ -600,7 +600,7 @@ void OPB_MOp (int8 op, OPT_Node *x) } break; case 21: - if (__IN(f, 0x70)) { + if (__IN(f, 0x70, 32)) { if (z->class == 7) { if (f == 4) { if (z->conval->intval == (-2147483647-1)) { @@ -747,7 +747,7 @@ void OPB_CheckParameters (OPT_Object fp, OPT_Object ap, BOOLEAN checkNames) static void OPB_CheckProc (OPT_Struct x, OPT_Object y) { - if (__IN(y->mode, 0x04c0)) { + if (__IN(y->mode, 0x04c0, 32)) { if (y->mode == 6) { if (y->mnolev == 0) { y->mode = 7; @@ -923,7 +923,7 @@ static void OPB_ConstOp (int16 op, OPT_Node x, OPT_Node y) } break; case 9: - if (!__IN(g, 0x1800)) { + if (!__IN(g, 0x1800, 32)) { OPB_err(100); } break; @@ -954,7 +954,7 @@ static void OPB_ConstOp (int16 op, OPT_Node x, OPT_Node y) } else { OPB_err(204); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { temp = __ABS(yval->realval) <= (LONGREAL)1; if (temp || __ABS(xval->realval) <= 1.79769296342094e+308 / (LONGREAL)__ABS(yval->realval)) { xval->realval = xval->realval * yval->realval; @@ -978,7 +978,7 @@ static void OPB_ConstOp (int16 op, OPT_Node x, OPT_Node y) xval->realval = (LONGREAL)1; } x->typ = OPT_realtyp; - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { temp = __ABS(yval->realval) >= (LONGREAL)1; if (temp || __ABS(xval->realval) <= 1.79769296342094e+308 * __ABS(yval->realval)) { xval->realval = xval->realval / yval->realval; @@ -1032,7 +1032,7 @@ static void OPB_ConstOp (int16 op, OPT_Node x, OPT_Node y) } else { OPB_err(206); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { temp = (yval->realval >= (LONGREAL)0 && xval->realval <= 1.79769296342094e+308 - yval->realval); if (temp || (yval->realval < (LONGREAL)0 && xval->realval >= -1.79769296342094e+308 - yval->realval)) { xval->realval = xval->realval + yval->realval; @@ -1054,7 +1054,7 @@ static void OPB_ConstOp (int16 op, OPT_Node x, OPT_Node y) } else { OPB_err(207); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { temp = (yval->realval >= (LONGREAL)0 && xval->realval >= -1.79769296342094e+308 + yval->realval); if (temp || (yval->realval < (LONGREAL)0 && xval->realval <= 1.79769296342094e+308 + yval->realval)) { xval->realval = xval->realval - yval->realval; @@ -1082,28 +1082,28 @@ static void OPB_ConstOp (int16 op, OPT_Node x, OPT_Node y) xval->intval = OPB_BoolToInt(ConstCmp__14() != 9); break; case 11: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 32)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() == 11); } break; case 12: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 32)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() != 13); } break; case 13: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 32)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() == 13); } break; case 14: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 32)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() != 11); @@ -1136,7 +1136,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) (*x)->conval->intval = 1; } } - } else if (__IN(g, 0x60)) { + } else if (__IN(g, 0x60, 32)) { (*x)->conval->realval = (*x)->conval->intval; (*x)->conval->intval = -1; } else { @@ -1145,8 +1145,8 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) OPB_err(220); } } - } else if (__IN(f, 0x60)) { - if (__IN(g, 0x60)) { + } else if (__IN(f, 0x60, 32)) { + if (__IN(g, 0x60, 32)) { OPB_CheckRealType(g, 203, (*x)->conval); } else { r = (*x)->conval->realval; @@ -1195,8 +1195,8 @@ static BOOLEAN strings__41 (OPT_Node *x, OPT_Node *y) { BOOLEAN _o_result; BOOLEAN ok, xCharArr, yCharArr; - xCharArr = (__IN((*x)->typ->comp, 0x0c) && (*x)->typ->BaseTyp->form == 3) || *Op__38_s->f == 8; - yCharArr = (__IN((*y)->typ->comp, 0x0c) && (*y)->typ->BaseTyp->form == 3) || *Op__38_s->g == 8; + xCharArr = (__IN((*x)->typ->comp, 0x0c, 32) && (*x)->typ->BaseTyp->form == 3) || *Op__38_s->f == 8; + yCharArr = (__IN((*y)->typ->comp, 0x0c, 32) && (*y)->typ->BaseTyp->form == 3) || *Op__38_s->g == 8; if ((((xCharArr && *Op__38_s->g == 3)) && (*y)->class == 7)) { OPB_CharToString(*y); *Op__38_s->g = 8; @@ -1255,7 +1255,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) case 4: if ((g == 4 && y->typ->size < z->typ->size)) { OPB_Convert(&y, z->typ); - } else if (__IN(g, 0x70)) { + } else if (__IN(g, 0x70, 32)) { OPB_Convert(&z, y->typ); } else { OPB_err(100); @@ -1264,23 +1264,23 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) case 5: if (g == 4) { OPB_Convert(&y, z->typ); - } else if (__IN(g, 0x60)) { + } else if (__IN(g, 0x60, 32)) { OPB_Convert(&z, y->typ); } else { OPB_err(100); } break; case 6: - if (__IN(g, 0x70)) { + if (__IN(g, 0x70, 32)) { OPB_Convert(&y, z->typ); - } else if (__IN(g, 0x60)) { + } else if (__IN(g, 0x60, 32)) { OPB_Convert(&y, z->typ); } else { OPB_err(100); } break; case 9: - if (!__IN(g, 0x1800)) { + if (!__IN(g, 0x1800, 32)) { OPB_err(100); } break; @@ -1341,7 +1341,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) y->obj = NIL; } } - } else if (!__IN(f, 0xe1)) { + } else if (!__IN(f, 0xe1, 32)) { OPB_err(105); typ = OPT_undftyp; } @@ -1357,7 +1357,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) OPB_Convert(&z, OPT_realtyp); OPB_Convert(&y, OPT_realtyp); typ = OPT_realtyp; - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { if ((y->class == 7 && y->conval->realval == (LONGREAL)0)) { OPB_err(205); } @@ -1424,7 +1424,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) } break; case 6: - if (!__IN(f, 0xf1)) { + if (!__IN(f, 0xf1, 32)) { OPB_err(105); typ = OPT_undftyp; } @@ -1443,7 +1443,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) } break; case 7: - if (!__IN(f, 0xf1)) { + if (!__IN(f, 0xf1, 32)) { OPB_err(106); typ = OPT_undftyp; } @@ -1467,7 +1467,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) } break; case 9: case 10: - if (__IN(f, 0x1aff) || strings__41(&z, &y)) { + if (__IN(f, 0x1aff, 32) || strings__41(&z, &y)) { typ = OPT_booltyp; } else { OPB_err(107); @@ -1476,7 +1476,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) NewOp__39(op, typ, &z, y); break; case 11: case 12: case 13: case 14: - if (__IN(f, 0x79) || strings__41(&z, &y)) { + if (__IN(f, 0x79, 32) || strings__41(&z, &y)) { typ = OPT_booltyp; } else { OPM_LogWLn(); @@ -1518,10 +1518,10 @@ void OPB_SetRange (OPT_Node *x, OPT_Node y) } if (((*x)->class == 7 && y->class == 7)) { if (k <= l) { - (*x)->conval->setval = __SETRNG(k, l); + (*x)->conval->setval = __SETRNG(k, l, 32); } else { OPB_err(201); - (*x)->conval->setval = __SETRNG(l, k); + (*x)->conval->setval = __SETRNG(l, k, 32); } (*x)->obj = NIL; } else { @@ -1543,7 +1543,7 @@ void OPB_SetElem (OPT_Node *x) } else if ((*x)->class == 7) { k = (*x)->conval->intval; if ((0 <= k && k <= OPM_MaxSet)) { - (*x)->conval->setval = __SETOF(k); + (*x)->conval->setval = __SETOF(k,32); } else { OPB_err(202); } @@ -1588,7 +1588,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) case 0: case 8: break; case 1: - if (!((__IN(g, 0x1a) && y->size == 1))) { + if (!((__IN(g, 0x1a, 32) && y->size == 1))) { OPB_err(113); } break; @@ -1603,12 +1603,12 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) } break; case 5: - if (!__IN(g, 0x30)) { + if (!__IN(g, 0x30, 32)) { OPB_err(113); } break; case 6: - if (!__IN(g, 0x70)) { + if (!__IN(g, 0x70, 32)) { OPB_err(113); } break; @@ -1656,7 +1656,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) if (ynode->conval->intval2 > x->n) { OPB_err(114); } - } else if ((__IN(y->comp, 0x0c) && y->BaseTyp == OPT_chartyp)) { + } else if ((__IN(y->comp, 0x0c, 32) && y->BaseTyp == OPT_chartyp)) { } else { OPB_err(113); } @@ -1664,7 +1664,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) OPB_err(113); } } else if ((x->comp == 3 && x->BaseTyp == OPT_chartyp)) { - if ((__IN(y->comp, 0x0c) && y->BaseTyp == OPT_chartyp)) { + if ((__IN(y->comp, 0x0c, 32) && y->BaseTyp == OPT_chartyp)) { } else { OPB_err(113); } @@ -1691,7 +1691,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) OPM_LogWLn(); break; } - if ((((((ynode->class == 7 && g < f)) && __IN(g, 0x30))) && __IN(f, 0x70))) { + if ((((((ynode->class == 7 && g < f)) && __IN(g, 0x30, 32))) && __IN(f, 0x70, 32))) { OPB_Convert(&ynode, x); } } @@ -1729,7 +1729,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) OPB_err(76); } f = x->typ->BaseTyp->comp; - if (__IN(f, 0x1c)) { + if (__IN(f, 0x1c, 32)) { if (f == 3) { typ = x->typ->BaseTyp; } @@ -1762,7 +1762,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) case 5: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 32)) { OPB_Convert(&x, OPT_linttyp); } else { OPB_err(111); @@ -1837,7 +1837,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) case 9: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (__IN(f, 0x11)) { + } else if (__IN(f, 0x11, 32)) { OPB_Convert(&x, OPT_chartyp); } else { OPB_err(111); @@ -1898,7 +1898,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) } break; case 17: - if (!__IN(x->typ->comp, 0x0c)) { + if (!__IN(x->typ->comp, 0x0c, 32)) { OPB_err(131); } break; @@ -1909,7 +1909,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) } if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (((!__IN(x->typ->comp, 0x0c) || x->typ->BaseTyp->form != 3) && f != 8)) { + } else if (((!__IN(x->typ->comp, 0x0c, 32) || x->typ->BaseTyp->form != 3) && f != 8)) { OPB_err(111); } break; @@ -1933,7 +1933,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) if (x->class != 8) { OPB_err(110); x = OPB_NewIntConst(1); - } else if (__IN(f, 0x18fe) || __IN(x->typ->comp, 0x14)) { + } else if (__IN(f, 0x18fe, 32) || __IN(x->typ->comp, 0x14, 32)) { (*OPB_typSize)(x->typ); x->typ->pvused = 1; x = OPB_NewIntConst(x->typ->size); @@ -1948,7 +1948,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) case 22: case 23: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (!__IN(f, 0x9a)) { + } else if (!__IN(f, 0x9a, 32)) { OPB_err(111); } break; @@ -1957,7 +1957,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) OPB_err(126); } else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) { OPB_Convert(&x, OPT_linttyp); - } else if (!((__IN(x->typ->form, 0x0810) && x->typ->size == OPM_PointerSize))) { + } else if (!((__IN(x->typ->form, 0x0810, 32) && x->typ->size == OPM_PointerSize))) { OPB_err(111); x->typ = OPT_linttyp; } @@ -1974,7 +1974,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno) case 29: if (x->class != 8) { OPB_err(110); - } else if (__IN(f, 0x0501) || x->typ->comp == 3) { + } else if (__IN(f, 0x0501, 32) || x->typ->comp == 3) { OPB_err(111); } break; @@ -2070,11 +2070,11 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) } else if (x->typ->size == 1) { L = (int16)x->conval->intval; typ = p->typ; - while ((L > 0 && __IN(typ->comp, 0x0c))) { + while ((L > 0 && __IN(typ->comp, 0x0c, 32))) { typ = typ->BaseTyp; L -= 1; } - if (L != 0 || !__IN(typ->comp, 0x0c)) { + if (L != 0 || !__IN(typ->comp, 0x0c, 32)) { OPB_err(132); } else { x->obj = NIL; @@ -2098,7 +2098,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) case 18: if (OPB_NotVar(x)) { OPB_err(112); - } else if ((__IN(x->typ->comp, 0x0c) && x->typ->BaseTyp->form == 3)) { + } else if ((__IN(x->typ->comp, 0x0c, 32) && x->typ->BaseTyp->form == 3)) { if (x->readonly) { OPB_err(76); } @@ -2172,7 +2172,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) case 24: case 25: case 26: case 27: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (__IN(f, 0x18ff)) { + } else if (__IN(f, 0x18ff, 32)) { if (fctno == 24 || fctno == 26) { if (OPB_NotVar(x)) { OPB_err(112); @@ -2198,7 +2198,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) p->typ = OPT_booltyp; break; case 29: - if (((x->class == 8 || x->class == 9) || __IN(f, 0x0501)) || x->typ->comp == 3) { + if (((x->class == 8 || x->class == 9) || __IN(f, 0x0501, 32)) || x->typ->comp == 3) { OPB_err(126); } if ((x->class != 7 && x->typ->size < p->typ->size)) { @@ -2230,7 +2230,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) OPB_err(126); } else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) { OPB_Convert(&x, OPT_linttyp); - } else if (!((__IN(x->typ->form, 0x0810) && x->typ->size == OPM_PointerSize))) { + } else if (!((__IN(x->typ->form, 0x0810, 32) && x->typ->size == OPM_PointerSize))) { OPB_err(111); x->typ = OPT_linttyp; } @@ -2384,12 +2384,12 @@ static void OPB_DynArrParCheck (OPT_Struct ftyp, OPT_Struct atyp, BOOLEAN fvarpa ftyp = ftyp->BaseTyp; atyp = atyp->BaseTyp; if ((fvarpar && ftyp == OPT_bytetyp)) { - if (!__IN(f, 0x0c) || !((__IN(atyp->form, 0x1e) && atyp->size == 1))) { - if (__IN(18, OPM_opt)) { + if (!__IN(f, 0x0c, 32) || !((__IN(atyp->form, 0x1e, 32) && atyp->size == 1))) { + if (__IN(18, OPM_opt, 32)) { OPB_err(-301); } } - } else if (__IN(f, 0x0c)) { + } else if (__IN(f, 0x0c, 32)) { if (ftyp->comp == 3) { OPB_DynArrParCheck(ftyp, atyp, fvarpar); } else if (ftyp != atyp) { @@ -2428,7 +2428,7 @@ static void OPB_CheckReceiver (OPT_Node *x, OPT_Object fp) void OPB_PrepCall (OPT_Node *x, OPT_Object *fpar) { - if (((*x)->obj != NIL && __IN((*x)->obj->mode, 0x22c0))) { + if (((*x)->obj != NIL && __IN((*x)->obj->mode, 0x22c0, 32))) { *fpar = (*x)->obj->link; if ((*x)->obj->mode == 13) { OPB_CheckReceiver(&(*x)->left, *fpar); @@ -2467,7 +2467,7 @@ void OPB_Param (OPT_Node ap, OPT_Object fp) OPB_err(111); } } else if ((fp->typ == OPT_sysptrtyp && ap->typ->form == 11)) { - } else if ((ap->typ != fp->typ && !((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e) && ap->typ->size == 1)))))) { + } else if ((ap->typ != fp->typ && !((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e, 32) && ap->typ->size == 1)))))) { OPB_err(123); } else if ((fp->typ->form == 11 && ap->class == 5)) { OPB_err(123); @@ -2494,7 +2494,7 @@ void OPB_StaticLink (int8 dlev) scope = OPT_topScope; while (dlev > 0) { dlev -= 1; - scope->link->conval->setval |= __SETOF(3); + scope->link->conval->setval |= __SETOF(3,32); scope = scope->left; } } @@ -2589,7 +2589,7 @@ void OPB_Assign (OPT_Node *x, OPT_Node y) y->conval->intval = 0; OPB_Index(&*x, OPB_NewIntConst(0)); } - if ((((((__IN((*x)->typ->comp, 0x0c) && (*x)->typ->BaseTyp == OPT_chartyp)) && __IN(y->typ->comp, 0x0c))) && y->typ->BaseTyp == OPT_chartyp)) { + if ((((((__IN((*x)->typ->comp, 0x0c, 32) && (*x)->typ->BaseTyp == OPT_chartyp)) && __IN(y->typ->comp, 0x0c, 32))) && y->typ->BaseTyp == OPT_chartyp)) { subcl = 18; } else { subcl = 0; diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 96866563..f9bf31fe 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-48/OPC.c b/bootstrap/windows-48/OPC.c index 452c85d2..1fecd152 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -93,9 +93,9 @@ static BOOLEAN OPC_Undefined (OPT_Object obj); void OPC_Init (void) { OPC_indentLevel = 0; - OPC_ptrinit = __IN(5, OPM_opt); + OPC_ptrinit = __IN(5, OPM_opt, 32); OPC_mainprog = OPM_mainProg || OPM_mainLinkStat; - OPC_ansi = __IN(6, OPM_opt); + OPC_ansi = __IN(6, OPM_opt, 32); if (OPC_ansi) { __MOVE("__init(void)", OPC_BodyNameExt, 13); } else { @@ -196,7 +196,7 @@ void OPC_Ident (OPT_Object obj) int16 mode, level, h; mode = obj->mode; level = obj->mnolev; - if ((__IN(mode, 0x62) && level > 0) || __IN(mode, 0x14)) { + if ((__IN(mode, 0x62, 32) && level > 0) || __IN(mode, 0x14, 32)) { OPM_WriteStringVar((void*)obj->name, 256); h = OPC_PerfectHash((void*)obj->name, 256); if (OPC_hashtab[__X(h, 105)] >= 0) { @@ -236,7 +236,7 @@ static void OPC_Stars (OPT_Struct typ, BOOLEAN *openClause) int16 pointers; *openClause = 0; if (((typ->strobj == NIL || typ->strobj->name[0] == 0x00) && typ->comp != 4)) { - if (__IN(typ->comp, 0x0c)) { + if (__IN(typ->comp, 0x0c, 32)) { OPC_Stars(typ->BaseTyp, &*openClause); *openClause = typ->comp == 2; } else if (typ->form == 12) { @@ -293,7 +293,7 @@ static void OPC_DeclareObj (OPT_Object dcl, BOOLEAN scopeDef) break; } else if ((form == 11 && typ->BaseTyp->comp != 3)) { openClause = 1; - } else if (form == 12 || __IN(comp, 0x0c)) { + } else if (form == 12 || __IN(comp, 0x0c, 32)) { if (openClause) { OPM_Write(')'); openClause = 0; @@ -708,7 +708,7 @@ static void OPC_DefineType (OPT_Struct str) if (str->BaseTyp->comp != 4) { OPC_DefineType(str->BaseTyp); } - } else if (__IN(str->comp, 0x0c)) { + } else if (__IN(str->comp, 0x0c, 32)) { OPC_DefineType(str->BaseTyp); } else if (str->form == 12) { if (str->BaseTyp != OPT_notyp) { @@ -1019,7 +1019,7 @@ static void OPC_IdentList (OPT_Object obj, int16 vis) base = NIL; first = 1; while ((obj != NIL && obj->mode != 13)) { - if ((__IN(vis, 0x05) || (vis == 1 && obj->vis != 0)) || (vis == 3 && !obj->leaf)) { + if ((__IN(vis, 0x05, 32) || (vis == 1 && obj->vis != 0)) || (vis == 3 && !obj->leaf)) { if (obj->typ != base || (int16)obj->vis != lastvis) { if (!first) { OPC_EndStat(); @@ -1144,7 +1144,7 @@ static void OPC_ProcPredefs (OPT_Object obj, int8 vis) { if (obj != NIL) { OPC_ProcPredefs(obj->left, vis); - if ((((__IN(obj->mode, 0xc0) && obj->vis >= vis)) && (obj->history != 4 || obj->mode == 6))) { + if ((((__IN(obj->mode, 0xc0, 32) && obj->vis >= vis)) && (obj->history != 4 || obj->mode == 6))) { if (vis == 1) { OPM_WriteString((CHAR*)"import ", 8); } else if (obj->vis == 0) { @@ -1238,7 +1238,7 @@ static void OPC_GenHeaderMsg (void) OPM_Write(' '); i = 0; while (i <= 31) { - if (__IN(i, OPM_glbopt)) { + if (__IN(i, OPM_glbopt, 32)) { switch (i) { case 0: OPM_Write('x'); @@ -1600,7 +1600,7 @@ void OPC_EnterProc (OPT_Object proc) } var = proc->link; while (var != NIL) { - if ((((__IN(var->typ->comp, 0x0c) && var->mode == 1)) && var->typ->sysflag == 0)) { + if ((((__IN(var->typ->comp, 0x0c, 32) && var->mode == 1)) && var->typ->sysflag == 0)) { OPC_BegStat(); if (var->typ->comp == 2) { OPM_WriteString((CHAR*)"__DUPARR(", 10); @@ -1648,7 +1648,7 @@ void OPC_EnterProc (OPT_Object proc) OPM_Write('.'); OPC_Ident(var); OPM_WriteString((CHAR*)" = ", 4); - if (__IN(var->typ->comp, 0x0c)) { + if (__IN(var->typ->comp, 0x0c, 32)) { OPM_WriteString((CHAR*)"(void*)", 8); } else if (var->mode != 2) { OPM_Write('&'); @@ -2006,7 +2006,7 @@ void OPC_Constant (OPT_Const con, int16 form) do { i -= 1; hex = __ASHL(hex, 1); - if (__IN(i, s)) { + if (__IN(i, s, 32)) { hex += 1; } } while (!(__MASK(i, -8) == 0)); diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 81e8362d..b8f44225 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-48/OPM.c b/bootstrap/windows-48/OPM.c index 671a9d8f..6af53f8c 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -288,15 +288,15 @@ void OPM_InitOptions (void) s[0] = 0x00; Platform_GetArg(OPM_S, (void*)s, 256); } - OPM_dontAsm = __IN(13, OPM_opt); - OPM_dontLink = __IN(14, OPM_opt); - OPM_mainProg = __IN(10, OPM_opt); - OPM_mainLinkStat = __IN(15, OPM_opt); - OPM_notColorOutput = __IN(16, OPM_opt); - OPM_forceNewSym = __IN(17, OPM_opt); - OPM_Verbose = __IN(18, OPM_opt); + OPM_dontAsm = __IN(13, OPM_opt, 32); + OPM_dontLink = __IN(14, OPM_opt, 32); + OPM_mainProg = __IN(10, OPM_opt, 32); + OPM_mainLinkStat = __IN(15, OPM_opt, 32); + OPM_notColorOutput = __IN(16, OPM_opt, 32); + OPM_forceNewSym = __IN(17, OPM_opt, 32); + OPM_Verbose = __IN(18, OPM_opt, 32); if (OPM_mainLinkStat) { - OPM_glbopt |= __SETOF(10); + OPM_glbopt |= __SETOF(10,32); } OPM_GetProperties(); } @@ -773,7 +773,7 @@ void OPM_SymWLReal (LONGREAL lr) void OPM_RegisterNewSym (void) { - if (__STRCMP(OPM_modName, "SYSTEM") != 0 || __IN(10, OPM_opt)) { + if (__STRCMP(OPM_modName, "SYSTEM") != 0 || __IN(10, OPM_opt, 32)) { Files_Register(OPM_newSFile); } } @@ -972,10 +972,10 @@ void OPM_CloseFiles (void) } if (OPM_noerr) { if (__STRCMP(OPM_modName, "SYSTEM") == 0) { - if (!__IN(10, OPM_opt)) { + if (!__IN(10, OPM_opt, 32)) { Files_Register(OPM_BFile); } - } else if (!__IN(10, OPM_opt)) { + } else if (!__IN(10, OPM_opt, 32)) { OPM_Append(&OPM_R[2], Files_Rider__typ, OPM_HFile); Files_Register(OPM_HIFile); Files_Register(OPM_BFile); diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 0d9bcdeb..67edafa5 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-48/OPP.c b/bootstrap/windows-48/OPP.c index de0afa51..d8dee08e 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -94,7 +94,7 @@ static void OPP_qualident (OPT_Object *id) obj->adr = 0; } else { lev = obj->mnolev; - if ((__IN(obj->mode, 0x06) && lev != OPP_level)) { + if ((__IN(obj->mode, 0x06, 32) && lev != OPP_level)) { obj->leaf = 0; if (lev > 0) { OPB_StaticLink(OPP_level - lev); @@ -325,7 +325,7 @@ static void OPP_PointerType (OPT_Struct *typ) } else { OPP_qualident(&id); if (id->mode == 5) { - if (__IN(id->typ->comp, 0x1c)) { + if (__IN(id->typ->comp, 0x1c, 32)) { (*typ)->BaseTyp = id->typ; } else { (*typ)->BaseTyp = OPT_undftyp; @@ -338,7 +338,7 @@ static void OPP_PointerType (OPT_Struct *typ) } } else { OPP_Type(&(*typ)->BaseTyp, &OPT_notyp); - if (!__IN((*typ)->BaseTyp->comp, 0x1c)) { + if (!__IN((*typ)->BaseTyp->comp, 0x1c, 32)) { (*typ)->BaseTyp = OPT_undftyp; OPP_err(57); } @@ -966,7 +966,7 @@ static void GetCode__19 (void) } } } - (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1); + (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1,32); } static void GetParams__21 (void) @@ -998,7 +998,7 @@ static void Body__17 (void) OPT_Node procdec = NIL, statseq = NIL; int32 c; c = OPM_errpos; - (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1); + (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1,32); OPP_CheckSym(39); OPP_Block(&procdec, &statseq); OPB_Enter(&procdec, statseq, *ProcedureDeclaration__16_s->proc); @@ -1041,7 +1041,7 @@ static void TProcDecl__23 (void) if ((*ProcedureDeclaration__16_s->fwd != NIL && (*ProcedureDeclaration__16_s->fwd)->mnolev != OPP_level)) { *ProcedureDeclaration__16_s->fwd = NIL; } - if ((((*ProcedureDeclaration__16_s->fwd != NIL && (*ProcedureDeclaration__16_s->fwd)->mode == 13)) && !__IN(1, (*ProcedureDeclaration__16_s->fwd)->conval->setval))) { + if ((((*ProcedureDeclaration__16_s->fwd != NIL && (*ProcedureDeclaration__16_s->fwd)->mode == 13)) && !__IN(1, (*ProcedureDeclaration__16_s->fwd)->conval->setval, 32))) { *ProcedureDeclaration__16_s->proc = OPT_NewObj(); (*ProcedureDeclaration__16_s->proc)->leaf = 1; if ((*ProcedureDeclaration__16_s->fwd)->vis != *ProcedureDeclaration__16_s->vis) { @@ -1075,7 +1075,7 @@ static void TProcDecl__23 (void) if ((((((baseProc->vis == 1 && (*ProcedureDeclaration__16_s->proc)->vis == 0)) && recTyp->strobj != NIL)) && recTyp->strobj->vis == 1)) { OPP_err(109); } - (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(2); + (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(2,32); } if (!*ProcedureDeclaration__16_s->forward) { Body__17(); @@ -1118,7 +1118,7 @@ static void OPP_ProcedureDeclaration (OPT_Node *x) } else { OPP_err(38); } - if ((__IN(mode, 0x0600) && !OPT_SYSimported)) { + if ((__IN(mode, 0x0600, 32) && !OPT_SYSimported)) { OPP_err(135); } OPS_Get(&OPP_sym); @@ -1135,7 +1135,7 @@ static void OPP_ProcedureDeclaration (OPT_Node *x) if ((fwd != NIL && (fwd->mnolev != OPP_level || fwd->mode == 8))) { fwd = NIL; } - if ((((fwd != NIL && __IN(fwd->mode, 0xc0))) && !__IN(1, fwd->conval->setval))) { + if ((((fwd != NIL && __IN(fwd->mode, 0xc0, 32))) && !__IN(1, fwd->conval->setval, 32))) { proc = OPT_NewObj(); proc->leaf = 1; if (fwd->vis != vis) { @@ -1178,7 +1178,7 @@ static void OPP_CaseLabelList (OPT_Node *lab, OPT_Struct LabelTyp, int16 *n, OPP for (;;) { OPP_ConstExpression(&x); f = x->typ->form; - if (__IN(f, 0x18)) { + if (__IN(f, 0x18, 32)) { xval = x->conval->intval; } else { OPP_err(61); @@ -1258,7 +1258,7 @@ static void CasePart__31 (OPT_Node *x) *StatSeq__30_s->pos = OPM_errpos; if ((*x)->class == 8 || (*x)->class == 9) { OPP_err(126); - } else if (!__IN((*x)->typ->form, 0x18)) { + } else if (!__IN((*x)->typ->form, 0x18, 32)) { OPP_err(125); } OPP_CheckSym(25); @@ -1675,7 +1675,7 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) if (obj->typ->strobj == NIL) { obj->typ->strobj = obj; } - if (__IN(obj->typ->comp, 0x1c)) { + if (__IN(obj->typ->comp, 0x1c, 32)) { i = 0; while (i < OPP_nofFwdPtr) { typ = OPP_FwdPtr[__X(i, 64)]; diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 2d3ebd77..9ddded2f 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-48/OPS.c b/bootstrap/windows-48/OPS.c index e6e99c02..cd51e788 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/windows-48/OPS.h b/bootstrap/windows-48/OPS.h index 99448598..658c87db 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-48/OPT.c b/bootstrap/windows-48/OPT.c index 4a645e7a..ab44584b 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -274,9 +274,9 @@ void OPT_Init (OPS_Name name, SET opt) __COPY(name, OPT_topScope->name, 256); OPT_GlbMod[0] = OPT_topScope; OPT_nofGmod = 1; - OPT_newsf = __IN(4, opt); - OPT_findpc = __IN(8, opt); - OPT_extsf = OPT_newsf || __IN(9, opt); + OPT_newsf = __IN(4, opt, 32); + OPT_findpc = __IN(8, opt, 32); + OPT_extsf = OPT_newsf || __IN(9, opt, 32); OPT_sfpresent = 1; } @@ -609,7 +609,7 @@ void OPT_FPrintStr (OPT_Struct typ) pvfp = pbfp; } } else if (f == 12) { - } else if (__IN(c, 0x0c)) { + } else if (__IN(c, 0x0c, 32)) { OPT_FPrintStr(btyp); OPM_FPrint(&pbfp, btyp->pvfp); pvfp = pbfp; @@ -680,7 +680,7 @@ void OPT_FPrintObj (OPT_Object obj) OPM_FPrint(&fprint, obj->vis); OPT_FPrintStr(obj->typ); OPM_FPrint(&fprint, obj->typ->pbfp); - } else if (__IN(obj->mode, 0x0480)) { + } else if (__IN(obj->mode, 0x0480, 32)) { OPT_FPrintSign(&fprint, obj->typ, obj->link); } else if (obj->mode == 9) { OPT_FPrintSign(&fprint, obj->typ, obj->link); @@ -1573,7 +1573,7 @@ static void OPT_OutObj (OPT_Object obj) OPT_ConstExt ext = NIL; if (obj != NIL) { OPT_OutObj(obj->left); - if (__IN(obj->mode, 0x06ea)) { + if (__IN(obj->mode, 0x06ea, 32)) { if (obj->history == 4) { OPT_FPrintErr(obj, 250); } else if (obj->vis != 0) { diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index 93975ea1..978ae16b 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index b264d44e..c20aef90 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -130,10 +130,10 @@ void OPV_Init (void) OPV_stamp = 0; OPV_recno = 0; OPV_nofExitLabels = 0; - OPV_assert = __IN(7, OPM_opt); - OPV_inxchk = __IN(0, OPM_opt); - OPV_mainprog = __IN(10, OPM_opt); - OPV_ansi = __IN(6, OPM_opt); + OPV_assert = __IN(7, OPM_opt, 32); + OPV_inxchk = __IN(0, OPM_opt, 32); + OPV_mainprog = __IN(10, OPM_opt, 32); + OPV_ansi = __IN(6, OPM_opt, 32); } static void OPV_GetTProcNum (OPT_Object obj) @@ -150,7 +150,7 @@ static void OPV_GetTProcNum (OPT_Object obj) OPT_FindField(obj->name, typ->BaseTyp, &redef); if (redef != NIL) { obj->adr = __ASHL(__ASHR(redef->adr, 16), 16); - if (!__IN(2, obj->conval->setval)) { + if (!__IN(2, obj->conval->setval, 32)) { OPM_err(119); } } else { @@ -230,12 +230,12 @@ static void OPV_Traverse (OPT_Object obj, OPT_Object outerScope, BOOLEAN exporte OPV_TypSize(obj->typ); } if (!exported) { - if ((__IN(mode, 0x60) && obj->mnolev > 0)) { + if ((__IN(mode, 0x60, 32) && obj->mnolev > 0)) { OPV_Stamp(obj->name); } - if (__IN(mode, 0x26)) { + if (__IN(mode, 0x26, 32)) { obj->scope = outerScope; - } else if (__IN(mode, 0x26c0)) { + } else if (__IN(mode, 0x26c0, 32)) { if (obj->conval->setval == 0x0) { OPM_err(129); } @@ -289,7 +289,7 @@ static int16 OPV_Precedence (int16 class, int16 subclass, int16 form, int16 comp return _o_result; break; case 5: - if (__IN(3, OPM_opt)) { + if (__IN(3, OPM_opt, 32)) { _o_result = 10; return _o_result; } else { @@ -298,7 +298,7 @@ static int16 OPV_Precedence (int16 class, int16 subclass, int16 form, int16 comp } break; case 1: - if (__IN(comp, 0x0c)) { + if (__IN(comp, 0x0c, 32)) { _o_result = 10; return _o_result; } else { @@ -445,7 +445,7 @@ static BOOLEAN OPV_SideEffects (OPT_Node n) static void OPV_Entier (OPT_Node n, int16 prec) { - if (__IN(n->typ->form, 0x60)) { + if (__IN(n->typ->form, 0x60, 32)) { OPM_WriteString((CHAR*)"__ENTIER(", 10); OPV_expr(n, -1); OPM_Write(')'); @@ -471,9 +471,11 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, int16 prec) if (to == 7) { OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_Entier(n, -1); + OPM_WriteString((CHAR*)",", 2); + OPM_WriteInt(__ASHL(newtype->size, 3)); OPM_Write(')'); } else if (to == 4) { - if ((newtype->size < n->typ->size && __IN(2, OPM_opt))) { + if ((newtype->size < n->typ->size && __IN(2, OPM_opt, 32))) { OPM_WriteString((CHAR*)"__SHORT", 8); if (OPV_SideEffects(n)) { OPM_Write('F'); @@ -488,7 +490,7 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, int16 prec) OPV_Entier(n, 9); } } else if (to == 3) { - if (__IN(2, OPM_opt)) { + if (__IN(2, OPM_opt, 32)) { OPM_WriteString((CHAR*)"__CHR", 6); if (OPV_SideEffects(n)) { OPM_Write('F'); @@ -511,7 +513,7 @@ static void OPV_TypeOf (OPT_Node n) OPM_WriteString((CHAR*)"__TYPEOF(", 10); OPV_expr(n, -1); OPM_Write(')'); - } else if (__IN(n->class, 0x15)) { + } else if (__IN(n->class, 0x15, 32)) { OPC_Andent(n->typ); OPM_WriteString((CHAR*)"__typ", 6); } else if (n->class == 3) { @@ -572,7 +574,7 @@ static void OPV_design (OPT_Node n, int16 prec) OPC_CompleteIdent(n->obj); break; case 1: - if (!__IN(comp, 0x0c)) { + if (!__IN(comp, 0x0c, 32)) { OPM_Write('*'); } OPC_CompleteIdent(n->obj); @@ -651,7 +653,7 @@ static void OPV_design (OPT_Node n, int16 prec) case 5: typ = n->typ; obj = n->left->obj; - if (__IN(3, OPM_opt)) { + if (__IN(3, OPM_opt, 32)) { if (typ->comp == 4) { OPM_WriteString((CHAR*)"__GUARDR(", 10); if ((int16)obj->mnolev != OPM_level) { @@ -690,7 +692,7 @@ static void OPV_design (OPT_Node n, int16 prec) } break; case 6: - if (__IN(3, OPM_opt)) { + if (__IN(3, OPM_opt, 32)) { if (n->left->class == 1) { OPM_WriteString((CHAR*)"__GUARDEQR(", 12); OPC_CompleteIdent(n->left->obj); @@ -749,7 +751,7 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp) OPM_WriteString((CHAR*)"*)", 3); prec = 10; } - if (!__IN(n->typ->comp, 0x0c)) { + if (!__IN(n->typ->comp, 0x0c, 32)) { if (mode == 2) { if ((OPV_ansi && typ != n->typ)) { OPM_WriteString((CHAR*)"(void*)", 8); @@ -757,13 +759,13 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp) OPM_Write('&'); prec = 9; } else if (OPV_ansi) { - if ((__IN(comp, 0x0c) && n->class == 7)) { + if ((__IN(comp, 0x0c, 32) && n->class == 7)) { OPM_WriteString((CHAR*)"(CHAR*)", 8); } else if ((((form == 11 && typ != n->typ)) && n->typ != OPT_niltyp)) { OPM_WriteString((CHAR*)"(void*)", 8); } } else { - if ((__IN(form, 0x60) && n->typ->form == 4)) { + if ((__IN(form, 0x60, 32) && n->typ->form == 4)) { OPM_WriteString((CHAR*)"(double)", 9); prec = 9; } else if (form == 4) { @@ -846,7 +848,7 @@ static void OPV_expr (OPT_Node n, int16 prec) l = n->left; r = n->right; exprPrec = OPV_Precedence(class, subclass, form, n->typ->comp); - if ((exprPrec <= prec && __IN(class, 0x3ce0))) { + if ((exprPrec <= prec && __IN(class, 0x3ce0, 32))) { OPM_Write('('); } switch (class) { @@ -858,6 +860,8 @@ static void OPV_expr (OPT_Node n, int16 prec) OPV_expr(l, -1); OPM_WriteString((CHAR*)", ", 3); OPV_expr(r, -1); + OPM_WriteString((CHAR*)", ", 3); + OPM_WriteInt(__ASHL(n->typ->size, 3)); OPM_Write(')'); break; case 11: @@ -924,18 +928,18 @@ static void OPV_expr (OPT_Node n, int16 prec) if (l->class == 1) { OPC_CompleteIdent(l->obj); } else { - if ((l->typ->form != 8 && !__IN(l->typ->comp, 0x0c))) { + if ((l->typ->form != 8 && !__IN(l->typ->comp, 0x0c, 32))) { OPM_Write('&'); } OPV_expr(l, exprPrec); } break; case 29: - if (!__IN(l->class, 0x17) || (((__IN(n->typ->form, 0x1890) && __IN(l->typ->form, 0x1890))) && n->typ->size == l->typ->size)) { + if (!__IN(l->class, 0x17, 32) || (((__IN(n->typ->form, 0x1890, 32) && __IN(l->typ->form, 0x1890, 32))) && n->typ->size == l->typ->size)) { OPM_Write('('); OPC_Ident(n->typ->strobj); OPM_Write(')'); - if (__IN(n->typ->form, 0x1800) || __IN(l->typ->form, 0x1800)) { + if (__IN(n->typ->form, 0x1800, 32) || __IN(l->typ->form, 0x1800, 32)) { OPM_WriteString((CHAR*)"(address)", 10); } OPV_expr(l, exprPrec); @@ -1032,20 +1036,24 @@ static void OPV_expr (OPT_Node n, int16 prec) } OPV_expr(l, -1); OPM_WriteString((CHAR*)", ", 3); - if ((((__IN(subclass, 0x18020000) && r->class == 7)) && r->conval->intval < 0)) { + if ((((__IN(subclass, 0x18020000, 32) && r->class == 7)) && r->conval->intval < 0)) { OPM_WriteInt(-r->conval->intval); } else { OPV_expr(r, -1); } - if (__IN(subclass, 0x18000000)) { + if (__IN(subclass, 0x18008000, 32)) { OPM_WriteString((CHAR*)", ", 3); - OPM_WriteInt(__ASHL(l->typ->size, 3)); + if (subclass == 15) { + OPM_WriteInt(__ASHL(r->typ->size, 3)); + } else { + OPM_WriteInt(__ASHL(l->typ->size, 3)); + } } OPM_Write(')'); break; case 9: case 10: case 11: case 12: case 13: case 14: - if (__IN(l->typ->form, 0x2100)) { + if (__IN(l->typ->form, 0x2100, 32)) { OPM_WriteString((CHAR*)"__STRCMP(", 10); OPV_expr(l, -1); OPM_WriteString((CHAR*)", ", 3); @@ -1142,7 +1150,7 @@ static void OPV_expr (OPT_Node n, int16 prec) OPV_design(n, prec); break; } - if ((exprPrec <= prec && __IN(class, 0x3ca0))) { + if ((exprPrec <= prec && __IN(class, 0x3ca0, 32))) { OPM_Write(')'); } } @@ -1432,7 +1440,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteString((CHAR*)", ", 3); OPC_Andent(n->left->typ->BaseTyp); OPM_WriteString((CHAR*)")", 2); - } else if (__IN(n->left->typ->BaseTyp->comp, 0x0c)) { + } else if (__IN(n->left->typ->BaseTyp->comp, 0x0c, 32)) { OPV_NewArr(n->left, n->right); } break; @@ -1446,6 +1454,8 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPC_SetInclude(n->subcl == 16); OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_expr(n->right, -1); + OPM_WriteString((CHAR*)",", 2); + OPM_WriteInt(__ASHL(n->left->typ->size, 3)); OPM_Write(')'); break; case 18: @@ -1623,7 +1633,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_LogWLn(); break; } - if (!__IN(n->class, 0x09744000)) { + if (!__IN(n->class, 0x09744000, 32)) { OPC_EndStat(); } n = n->link; diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 3b43e61e..ea1f9aaa 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-48/Platform.c b/bootstrap/windows-48/Platform.c index 06824f8e..8740b5b0 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/windows-48/Platform.h b/bootstrap/windows-48/Platform.h index a2301fff..ce51df39 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-48/Reals.c b/bootstrap/windows-48/Reals.c index e209af08..a64c2d13 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/windows-48/Reals.h b/bootstrap/windows-48/Reals.h index 2779fc88..d7981245 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-48/Strings.c b/bootstrap/windows-48/Strings.c index 387345ab..67c0f055 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/windows-48/Strings.h b/bootstrap/windows-48/Strings.h index fe90bd09..6f4f1073 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-48/Texts.c b/bootstrap/windows-48/Texts.c index c37a4a2c..4d12f6cb 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -578,13 +578,13 @@ void Texts_ChangeLooks (Texts_Text T, int32 beg, int32 end, SET sel, Texts_Fonts T->cache = c; T->corg = co; while (un != vn) { - if ((__IN(0, sel) && fnt != NIL)) { + if ((__IN(0, sel, 32) && fnt != NIL)) { un->fnt = fnt; } - if (__IN(1, sel)) { + if (__IN(1, sel, 32)) { un->col = col; } - if (__IN(2, sel)) { + if (__IN(2, sel, 32)) { un->voff = voff; } Texts_Merge(T, u, &un); diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index c6ee484f..2b694f6c 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-48/Vishap.c b/bootstrap/windows-48/Vishap.c index fb1c1662..2efce68f 100644 --- a/bootstrap/windows-48/Vishap.c +++ b/bootstrap/windows-48/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkamSf */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/windows-48/errors.c b/bootstrap/windows-48/errors.c index 7feed8e7..6f8e3d33 100644 --- a/bootstrap/windows-48/errors.c +++ b/bootstrap/windows-48/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/windows-48/errors.h b/bootstrap/windows-48/errors.h index 4fe434e1..58286fd8 100644 --- a/bootstrap/windows-48/errors.h +++ b/bootstrap/windows-48/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/windows-48/extTools.c b/bootstrap/windows-48/extTools.c index 0afff1f0..bbecb9f2 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/windows-48/extTools.h b/bootstrap/windows-48/extTools.h index 5d996dae..8a0d60be 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-48/vt100.c b/bootstrap/windows-48/vt100.c index 8a5286ec..b5422c40 100644 --- a/bootstrap/windows-48/vt100.c +++ b/bootstrap/windows-48/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/windows-48/vt100.h b/bootstrap/windows-48/vt100.h index c09b4c71..85494a63 100644 --- a/bootstrap/windows-48/vt100.h +++ b/bootstrap/windows-48/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/bootstrap/windows-88/Configuration.c b/bootstrap/windows-88/Configuration.c index b023c21b..f3f2e52d 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -18,6 +18,6 @@ export void *Configuration__init(void) __DEFMOD; __REGMOD("Configuration", 0); /* BEGIN */ - __MOVE("1.95 [2016/09/12] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/09/14] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index 3ce4467e..2b7bdf82 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Configuration__h #define Configuration__h diff --git a/bootstrap/windows-88/Console.c b/bootstrap/windows-88/Console.c index 1190773d..f1d67d28 100644 --- a/bootstrap/windows-88/Console.c +++ b/bootstrap/windows-88/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/windows-88/Console.h b/bootstrap/windows-88/Console.h index 27d906ad..8336a3d0 100644 --- a/bootstrap/windows-88/Console.h +++ b/bootstrap/windows-88/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Console__h #define Console__h diff --git a/bootstrap/windows-88/Files.c b/bootstrap/windows-88/Files.c index dbe8d119..6c40d595 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/windows-88/Files.h b/bootstrap/windows-88/Files.h index 8a4fb7c5..d3432e7a 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #ifndef Files__h #define Files__h diff --git a/bootstrap/windows-88/Heap.c b/bootstrap/windows-88/Heap.c index 67044d79..626812cb 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tskSfF */ #define INTEGER int32 #define LONGINT int64 @@ -82,6 +82,7 @@ export LONGINT *Heap__1__typ; static void Heap_CheckFin (void); static void Heap_ExtendHeap (address blksz); export void Heap_FINALL (void); +static address Heap_FetchAddress (address pointer); static void Heap_Finalize (void); export void Heap_GC (BOOLEAN markStack); static void Heap_HeapSort (address n, address *a, LONGINT a__len); @@ -106,7 +107,6 @@ export void Heap_Unlock (void); extern void *Heap__init(); extern address Platform_MainStackFrame; extern address Platform_OSAllocate(address size); -#define Heap_FetchAddress(pointer) (address)(*((void**)((address)pointer))) #define Heap_HeapModuleInit() Heap__init() #define Heap_OSAllocate(size) Platform_OSAllocate(size) #define Heap_PlatformHalt(code) Platform_Halt(code) @@ -188,6 +188,15 @@ static address Heap_NewChunk (address blksz) return _o_result; } +static address Heap_FetchAddress (address pointer) +{ + address _o_result; + address r; + __GET(pointer, r, address); + _o_result = r; + return _o_result; +} + static void Heap_ExtendHeap (address blksz) { address size, chnk, j, next; diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index 584661bc..08afe43e 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tskSfF */ #ifndef Heap__h #define Heap__h diff --git a/bootstrap/windows-88/Modules.c b/bootstrap/windows-88/Modules.c index 547909bb..3a48e24a 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/windows-88/Modules.h b/bootstrap/windows-88/Modules.h index 2666971d..3ebde4f3 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Modules__h #define Modules__h diff --git a/bootstrap/windows-88/OPB.c b/bootstrap/windows-88/OPB.c index f048dc85..883d2559 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -345,7 +345,7 @@ void OPB_Index (OPT_Node *x, OPT_Node y) f = y->typ->form; if ((*x)->class >= 7) { OPB_err(79); - } else if (f != 4 || __IN(y->class, 0x0300)) { + } else if (f != 4 || __IN(y->class, 0x0300, 64)) { OPB_err(80); y->typ = OPT_inttyp; } @@ -372,7 +372,7 @@ void OPB_Field (OPT_Node *x, OPT_Object y) if ((*x)->class >= 7) { OPB_err(77); } - if ((y != NIL && __IN(y->mode, 0x2010))) { + if ((y != NIL && __IN(y->mode, 0x2010, 64))) { OPB_BindNodes(2, y->typ, &*x, NIL); (*x)->obj = y; (*x)->readonly = (*x)->left->readonly || (y->vis == 2 && y->mnolev < 0); @@ -476,7 +476,7 @@ void OPB_In (OPT_Node *x, OPT_Node y) if (k < 0 || k > (int64)OPM_MaxSet) { OPB_err(202); } else if (y->class == 7) { - (*x)->conval->intval = OPB_BoolToInt(__IN(k, y->conval->setval)); + (*x)->conval->intval = OPB_BoolToInt(__IN(k, y->conval->setval, 64)); (*x)->obj = NIL; } else { OPB_BindNodes(12, OPT_booltyp, &*x, y); @@ -572,12 +572,12 @@ void OPB_MOp (int8 op, OPT_Node *x) } break; case 6: - if (!__IN(f, 0x70)) { + if (!__IN(f, 0x70, 64)) { OPB_err(96); } break; case 7: - if (__IN(f, 0xf0)) { + if (__IN(f, 0xf0, 64)) { if (z->class == 7) { if (f == 4) { if (z->conval->intval == (-9223372036854775807-1)) { @@ -586,7 +586,7 @@ void OPB_MOp (int8 op, OPT_Node *x) z->conval->intval = -z->conval->intval; OPB_SetIntType(z); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 64)) { z->conval->realval = -z->conval->realval; } else { z->conval->setval = ~z->conval->setval; @@ -600,7 +600,7 @@ void OPB_MOp (int8 op, OPT_Node *x) } break; case 21: - if (__IN(f, 0x70)) { + if (__IN(f, 0x70, 64)) { if (z->class == 7) { if (f == 4) { if (z->conval->intval == (-9223372036854775807-1)) { @@ -747,7 +747,7 @@ void OPB_CheckParameters (OPT_Object fp, OPT_Object ap, BOOLEAN checkNames) static void OPB_CheckProc (OPT_Struct x, OPT_Object y) { - if (__IN(y->mode, 0x04c0)) { + if (__IN(y->mode, 0x04c0, 64)) { if (y->mode == 6) { if (y->mnolev == 0) { y->mode = 7; @@ -923,7 +923,7 @@ static void OPB_ConstOp (int32 op, OPT_Node x, OPT_Node y) } break; case 9: - if (!__IN(g, 0x1800)) { + if (!__IN(g, 0x1800, 64)) { OPB_err(100); } break; @@ -954,7 +954,7 @@ static void OPB_ConstOp (int32 op, OPT_Node x, OPT_Node y) } else { OPB_err(204); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 64)) { temp = __ABS(yval->realval) <= (LONGREAL)1; if (temp || __ABS(xval->realval) <= 1.79769296342094e+308 / (LONGREAL)__ABS(yval->realval)) { xval->realval = xval->realval * yval->realval; @@ -978,7 +978,7 @@ static void OPB_ConstOp (int32 op, OPT_Node x, OPT_Node y) xval->realval = (LONGREAL)1; } x->typ = OPT_realtyp; - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 64)) { temp = __ABS(yval->realval) >= (LONGREAL)1; if (temp || __ABS(xval->realval) <= 1.79769296342094e+308 * __ABS(yval->realval)) { xval->realval = xval->realval / yval->realval; @@ -1032,7 +1032,7 @@ static void OPB_ConstOp (int32 op, OPT_Node x, OPT_Node y) } else { OPB_err(206); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 64)) { temp = (yval->realval >= (LONGREAL)0 && xval->realval <= 1.79769296342094e+308 - yval->realval); if (temp || (yval->realval < (LONGREAL)0 && xval->realval >= -1.79769296342094e+308 - yval->realval)) { xval->realval = xval->realval + yval->realval; @@ -1054,7 +1054,7 @@ static void OPB_ConstOp (int32 op, OPT_Node x, OPT_Node y) } else { OPB_err(207); } - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 64)) { temp = (yval->realval >= (LONGREAL)0 && xval->realval >= -1.79769296342094e+308 + yval->realval); if (temp || (yval->realval < (LONGREAL)0 && xval->realval <= 1.79769296342094e+308 + yval->realval)) { xval->realval = xval->realval - yval->realval; @@ -1082,28 +1082,28 @@ static void OPB_ConstOp (int32 op, OPT_Node x, OPT_Node y) xval->intval = OPB_BoolToInt(ConstCmp__14() != 9); break; case 11: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 64)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() == 11); } break; case 12: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 64)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() != 13); } break; case 13: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 64)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() == 13); } break; case 14: - if (__IN(f, 0x0a84)) { + if (__IN(f, 0x0a84, 64)) { OPB_err(108); } else { xval->intval = OPB_BoolToInt(ConstCmp__14() != 11); @@ -1136,7 +1136,7 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) (*x)->conval->intval = 1; } } - } else if (__IN(g, 0x60)) { + } else if (__IN(g, 0x60, 64)) { (*x)->conval->realval = (*x)->conval->intval; (*x)->conval->intval = -1; } else { @@ -1145,8 +1145,8 @@ static void OPB_Convert (OPT_Node *x, OPT_Struct typ) OPB_err(220); } } - } else if (__IN(f, 0x60)) { - if (__IN(g, 0x60)) { + } else if (__IN(f, 0x60, 64)) { + if (__IN(g, 0x60, 64)) { OPB_CheckRealType(g, 203, (*x)->conval); } else { r = (*x)->conval->realval; @@ -1195,8 +1195,8 @@ static BOOLEAN strings__41 (OPT_Node *x, OPT_Node *y) { BOOLEAN _o_result; BOOLEAN ok, xCharArr, yCharArr; - xCharArr = (__IN((*x)->typ->comp, 0x0c) && (*x)->typ->BaseTyp->form == 3) || *Op__38_s->f == 8; - yCharArr = (__IN((*y)->typ->comp, 0x0c) && (*y)->typ->BaseTyp->form == 3) || *Op__38_s->g == 8; + xCharArr = (__IN((*x)->typ->comp, 0x0c, 64) && (*x)->typ->BaseTyp->form == 3) || *Op__38_s->f == 8; + yCharArr = (__IN((*y)->typ->comp, 0x0c, 64) && (*y)->typ->BaseTyp->form == 3) || *Op__38_s->g == 8; if ((((xCharArr && *Op__38_s->g == 3)) && (*y)->class == 7)) { OPB_CharToString(*y); *Op__38_s->g = 8; @@ -1255,7 +1255,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) case 4: if ((g == 4 && y->typ->size < z->typ->size)) { OPB_Convert(&y, z->typ); - } else if (__IN(g, 0x70)) { + } else if (__IN(g, 0x70, 64)) { OPB_Convert(&z, y->typ); } else { OPB_err(100); @@ -1264,23 +1264,23 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) case 5: if (g == 4) { OPB_Convert(&y, z->typ); - } else if (__IN(g, 0x60)) { + } else if (__IN(g, 0x60, 64)) { OPB_Convert(&z, y->typ); } else { OPB_err(100); } break; case 6: - if (__IN(g, 0x70)) { + if (__IN(g, 0x70, 64)) { OPB_Convert(&y, z->typ); - } else if (__IN(g, 0x60)) { + } else if (__IN(g, 0x60, 64)) { OPB_Convert(&y, z->typ); } else { OPB_err(100); } break; case 9: - if (!__IN(g, 0x1800)) { + if (!__IN(g, 0x1800, 64)) { OPB_err(100); } break; @@ -1341,7 +1341,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) y->obj = NIL; } } - } else if (!__IN(f, 0xe1)) { + } else if (!__IN(f, 0xe1, 64)) { OPB_err(105); typ = OPT_undftyp; } @@ -1357,7 +1357,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) OPB_Convert(&z, OPT_realtyp); OPB_Convert(&y, OPT_realtyp); typ = OPT_realtyp; - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 64)) { if ((y->class == 7 && y->conval->realval == (LONGREAL)0)) { OPB_err(205); } @@ -1424,7 +1424,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) } break; case 6: - if (!__IN(f, 0xf1)) { + if (!__IN(f, 0xf1, 64)) { OPB_err(105); typ = OPT_undftyp; } @@ -1443,7 +1443,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) } break; case 7: - if (!__IN(f, 0xf1)) { + if (!__IN(f, 0xf1, 64)) { OPB_err(106); typ = OPT_undftyp; } @@ -1467,7 +1467,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) } break; case 9: case 10: - if (__IN(f, 0x1aff) || strings__41(&z, &y)) { + if (__IN(f, 0x1aff, 64) || strings__41(&z, &y)) { typ = OPT_booltyp; } else { OPB_err(107); @@ -1476,7 +1476,7 @@ void OPB_Op (int8 op, OPT_Node *x, OPT_Node y) NewOp__39(op, typ, &z, y); break; case 11: case 12: case 13: case 14: - if (__IN(f, 0x79) || strings__41(&z, &y)) { + if (__IN(f, 0x79, 64) || strings__41(&z, &y)) { typ = OPT_booltyp; } else { OPM_LogWLn(); @@ -1518,10 +1518,10 @@ void OPB_SetRange (OPT_Node *x, OPT_Node y) } if (((*x)->class == 7 && y->class == 7)) { if (k <= l) { - (*x)->conval->setval = __SETRNG(k, l); + (*x)->conval->setval = __SETRNG(k, l, 64); } else { OPB_err(201); - (*x)->conval->setval = __SETRNG(l, k); + (*x)->conval->setval = __SETRNG(l, k, 64); } (*x)->obj = NIL; } else { @@ -1543,7 +1543,7 @@ void OPB_SetElem (OPT_Node *x) } else if ((*x)->class == 7) { k = (*x)->conval->intval; if ((0 <= k && k <= (int64)OPM_MaxSet)) { - (*x)->conval->setval = __SETOF(k); + (*x)->conval->setval = __SETOF(k,64); } else { OPB_err(202); } @@ -1588,7 +1588,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) case 0: case 8: break; case 1: - if (!((__IN(g, 0x1a) && y->size == 1))) { + if (!((__IN(g, 0x1a, 64) && y->size == 1))) { OPB_err(113); } break; @@ -1603,12 +1603,12 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) } break; case 5: - if (!__IN(g, 0x30)) { + if (!__IN(g, 0x30, 64)) { OPB_err(113); } break; case 6: - if (!__IN(g, 0x70)) { + if (!__IN(g, 0x70, 64)) { OPB_err(113); } break; @@ -1656,7 +1656,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) if (ynode->conval->intval2 > x->n) { OPB_err(114); } - } else if ((__IN(y->comp, 0x0c) && y->BaseTyp == OPT_chartyp)) { + } else if ((__IN(y->comp, 0x0c, 64) && y->BaseTyp == OPT_chartyp)) { } else { OPB_err(113); } @@ -1664,7 +1664,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) OPB_err(113); } } else if ((x->comp == 3 && x->BaseTyp == OPT_chartyp)) { - if ((__IN(y->comp, 0x0c) && y->BaseTyp == OPT_chartyp)) { + if ((__IN(y->comp, 0x0c, 64) && y->BaseTyp == OPT_chartyp)) { } else { OPB_err(113); } @@ -1691,7 +1691,7 @@ static void OPB_CheckAssign (OPT_Struct x, OPT_Node ynode) OPM_LogWLn(); break; } - if ((((((ynode->class == 7 && g < f)) && __IN(g, 0x30))) && __IN(f, 0x70))) { + if ((((((ynode->class == 7 && g < f)) && __IN(g, 0x30, 64))) && __IN(f, 0x70, 64))) { OPB_Convert(&ynode, x); } } @@ -1729,7 +1729,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno) OPB_err(76); } f = x->typ->BaseTyp->comp; - if (__IN(f, 0x1c)) { + if (__IN(f, 0x1c, 64)) { if (f == 3) { typ = x->typ->BaseTyp; } @@ -1762,7 +1762,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno) case 5: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (__IN(f, 0x60)) { + } else if (__IN(f, 0x60, 64)) { OPB_Convert(&x, OPT_linttyp); } else { OPB_err(111); @@ -1837,7 +1837,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno) case 9: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (__IN(f, 0x11)) { + } else if (__IN(f, 0x11, 64)) { OPB_Convert(&x, OPT_chartyp); } else { OPB_err(111); @@ -1898,7 +1898,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno) } break; case 17: - if (!__IN(x->typ->comp, 0x0c)) { + if (!__IN(x->typ->comp, 0x0c, 64)) { OPB_err(131); } break; @@ -1909,7 +1909,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno) } if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (((!__IN(x->typ->comp, 0x0c) || x->typ->BaseTyp->form != 3) && f != 8)) { + } else if (((!__IN(x->typ->comp, 0x0c, 64) || x->typ->BaseTyp->form != 3) && f != 8)) { OPB_err(111); } break; @@ -1933,7 +1933,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno) if (x->class != 8) { OPB_err(110); x = OPB_NewIntConst(1); - } else if (__IN(f, 0x18fe) || __IN(x->typ->comp, 0x14)) { + } else if (__IN(f, 0x18fe, 64) || __IN(x->typ->comp, 0x14, 64)) { (*OPB_typSize)(x->typ); x->typ->pvused = 1; x = OPB_NewIntConst(x->typ->size); @@ -1948,7 +1948,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno) case 22: case 23: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (!__IN(f, 0x9a)) { + } else if (!__IN(f, 0x9a, 64)) { OPB_err(111); } break; @@ -1957,7 +1957,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno) OPB_err(126); } else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) { OPB_Convert(&x, OPT_linttyp); - } else if (!((__IN(x->typ->form, 0x0810) && x->typ->size == (int64)OPM_PointerSize))) { + } else if (!((__IN(x->typ->form, 0x0810, 64) && x->typ->size == (int64)OPM_PointerSize))) { OPB_err(111); x->typ = OPT_linttyp; } @@ -1974,7 +1974,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno) case 29: if (x->class != 8) { OPB_err(110); - } else if (__IN(f, 0x0501) || x->typ->comp == 3) { + } else if (__IN(f, 0x0501, 64) || x->typ->comp == 3) { OPB_err(111); } break; @@ -2070,11 +2070,11 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) } else if (x->typ->size == 1) { L = (int32)x->conval->intval; typ = p->typ; - while ((L > 0 && __IN(typ->comp, 0x0c))) { + while ((L > 0 && __IN(typ->comp, 0x0c, 64))) { typ = typ->BaseTyp; L -= 1; } - if (L != 0 || !__IN(typ->comp, 0x0c)) { + if (L != 0 || !__IN(typ->comp, 0x0c, 64)) { OPB_err(132); } else { x->obj = NIL; @@ -2098,7 +2098,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) case 18: if (OPB_NotVar(x)) { OPB_err(112); - } else if ((__IN(x->typ->comp, 0x0c) && x->typ->BaseTyp->form == 3)) { + } else if ((__IN(x->typ->comp, 0x0c, 64) && x->typ->BaseTyp->form == 3)) { if (x->readonly) { OPB_err(76); } @@ -2172,7 +2172,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) case 24: case 25: case 26: case 27: if (x->class == 8 || x->class == 9) { OPB_err(126); - } else if (__IN(f, 0x18ff)) { + } else if (__IN(f, 0x18ff, 64)) { if (fctno == 24 || fctno == 26) { if (OPB_NotVar(x)) { OPB_err(112); @@ -2198,7 +2198,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) p->typ = OPT_booltyp; break; case 29: - if (((x->class == 8 || x->class == 9) || __IN(f, 0x0501)) || x->typ->comp == 3) { + if (((x->class == 8 || x->class == 9) || __IN(f, 0x0501, 64)) || x->typ->comp == 3) { OPB_err(126); } if ((x->class != 7 && x->typ->size < p->typ->size)) { @@ -2230,7 +2230,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno) OPB_err(126); } else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) { OPB_Convert(&x, OPT_linttyp); - } else if (!((__IN(x->typ->form, 0x0810) && x->typ->size == (int64)OPM_PointerSize))) { + } else if (!((__IN(x->typ->form, 0x0810, 64) && x->typ->size == (int64)OPM_PointerSize))) { OPB_err(111); x->typ = OPT_linttyp; } @@ -2384,12 +2384,12 @@ static void OPB_DynArrParCheck (OPT_Struct ftyp, OPT_Struct atyp, BOOLEAN fvarpa ftyp = ftyp->BaseTyp; atyp = atyp->BaseTyp; if ((fvarpar && ftyp == OPT_bytetyp)) { - if (!__IN(f, 0x0c) || !((__IN(atyp->form, 0x1e) && atyp->size == 1))) { - if (__IN(18, OPM_opt)) { + if (!__IN(f, 0x0c, 64) || !((__IN(atyp->form, 0x1e, 64) && atyp->size == 1))) { + if (__IN(18, OPM_opt, 64)) { OPB_err(-301); } } - } else if (__IN(f, 0x0c)) { + } else if (__IN(f, 0x0c, 64)) { if (ftyp->comp == 3) { OPB_DynArrParCheck(ftyp, atyp, fvarpar); } else if (ftyp != atyp) { @@ -2428,7 +2428,7 @@ static void OPB_CheckReceiver (OPT_Node *x, OPT_Object fp) void OPB_PrepCall (OPT_Node *x, OPT_Object *fpar) { - if (((*x)->obj != NIL && __IN((*x)->obj->mode, 0x22c0))) { + if (((*x)->obj != NIL && __IN((*x)->obj->mode, 0x22c0, 64))) { *fpar = (*x)->obj->link; if ((*x)->obj->mode == 13) { OPB_CheckReceiver(&(*x)->left, *fpar); @@ -2467,7 +2467,7 @@ void OPB_Param (OPT_Node ap, OPT_Object fp) OPB_err(111); } } else if ((fp->typ == OPT_sysptrtyp && ap->typ->form == 11)) { - } else if ((ap->typ != fp->typ && !((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e) && ap->typ->size == 1)))))) { + } else if ((ap->typ != fp->typ && !((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e, 64) && ap->typ->size == 1)))))) { OPB_err(123); } else if ((fp->typ->form == 11 && ap->class == 5)) { OPB_err(123); @@ -2494,7 +2494,7 @@ void OPB_StaticLink (int8 dlev) scope = OPT_topScope; while (dlev > 0) { dlev -= 1; - scope->link->conval->setval |= __SETOF(3); + scope->link->conval->setval |= __SETOF(3,64); scope = scope->left; } } @@ -2589,7 +2589,7 @@ void OPB_Assign (OPT_Node *x, OPT_Node y) y->conval->intval = 0; OPB_Index(&*x, OPB_NewIntConst(0)); } - if ((((((__IN((*x)->typ->comp, 0x0c) && (*x)->typ->BaseTyp == OPT_chartyp)) && __IN(y->typ->comp, 0x0c))) && y->typ->BaseTyp == OPT_chartyp)) { + if ((((((__IN((*x)->typ->comp, 0x0c, 64) && (*x)->typ->BaseTyp == OPT_chartyp)) && __IN(y->typ->comp, 0x0c, 64))) && y->typ->BaseTyp == OPT_chartyp)) { subcl = 18; } else { subcl = 0; diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index adefb869..35fb2186 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPB__h #define OPB__h diff --git a/bootstrap/windows-88/OPC.c b/bootstrap/windows-88/OPC.c index aee5581c..ef8f41a1 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -93,9 +93,9 @@ static BOOLEAN OPC_Undefined (OPT_Object obj); void OPC_Init (void) { OPC_indentLevel = 0; - OPC_ptrinit = __IN(5, OPM_opt); + OPC_ptrinit = __IN(5, OPM_opt, 64); OPC_mainprog = OPM_mainProg || OPM_mainLinkStat; - OPC_ansi = __IN(6, OPM_opt); + OPC_ansi = __IN(6, OPM_opt, 64); if (OPC_ansi) { __MOVE("__init(void)", OPC_BodyNameExt, 13); } else { @@ -196,7 +196,7 @@ void OPC_Ident (OPT_Object obj) int32 mode, level, h; mode = obj->mode; level = obj->mnolev; - if ((__IN(mode, 0x62) && level > 0) || __IN(mode, 0x14)) { + if ((__IN(mode, 0x62, 64) && level > 0) || __IN(mode, 0x14, 64)) { OPM_WriteStringVar((void*)obj->name, 256); h = OPC_PerfectHash((void*)obj->name, 256); if (OPC_hashtab[__X(h, 105)] >= 0) { @@ -236,7 +236,7 @@ static void OPC_Stars (OPT_Struct typ, BOOLEAN *openClause) int32 pointers; *openClause = 0; if (((typ->strobj == NIL || typ->strobj->name[0] == 0x00) && typ->comp != 4)) { - if (__IN(typ->comp, 0x0c)) { + if (__IN(typ->comp, 0x0c, 64)) { OPC_Stars(typ->BaseTyp, &*openClause); *openClause = typ->comp == 2; } else if (typ->form == 12) { @@ -293,7 +293,7 @@ static void OPC_DeclareObj (OPT_Object dcl, BOOLEAN scopeDef) break; } else if ((form == 11 && typ->BaseTyp->comp != 3)) { openClause = 1; - } else if (form == 12 || __IN(comp, 0x0c)) { + } else if (form == 12 || __IN(comp, 0x0c, 64)) { if (openClause) { OPM_Write(')'); openClause = 0; @@ -708,7 +708,7 @@ static void OPC_DefineType (OPT_Struct str) if (str->BaseTyp->comp != 4) { OPC_DefineType(str->BaseTyp); } - } else if (__IN(str->comp, 0x0c)) { + } else if (__IN(str->comp, 0x0c, 64)) { OPC_DefineType(str->BaseTyp); } else if (str->form == 12) { if (str->BaseTyp != OPT_notyp) { @@ -1019,7 +1019,7 @@ static void OPC_IdentList (OPT_Object obj, int32 vis) base = NIL; first = 1; while ((obj != NIL && obj->mode != 13)) { - if ((__IN(vis, 0x05) || (vis == 1 && obj->vis != 0)) || (vis == 3 && !obj->leaf)) { + if ((__IN(vis, 0x05, 64) || (vis == 1 && obj->vis != 0)) || (vis == 3 && !obj->leaf)) { if (obj->typ != base || obj->vis != lastvis) { if (!first) { OPC_EndStat(); @@ -1144,7 +1144,7 @@ static void OPC_ProcPredefs (OPT_Object obj, int8 vis) { if (obj != NIL) { OPC_ProcPredefs(obj->left, vis); - if ((((__IN(obj->mode, 0xc0) && obj->vis >= vis)) && (obj->history != 4 || obj->mode == 6))) { + if ((((__IN(obj->mode, 0xc0, 64) && obj->vis >= vis)) && (obj->history != 4 || obj->mode == 6))) { if (vis == 1) { OPM_WriteString((CHAR*)"import ", 8); } else if (obj->vis == 0) { @@ -1238,7 +1238,7 @@ static void OPC_GenHeaderMsg (void) OPM_Write(' '); i = 0; while (i <= 63) { - if (__IN(i, OPM_glbopt)) { + if (__IN(i, OPM_glbopt, 64)) { switch (i) { case 0: OPM_Write('x'); @@ -1600,7 +1600,7 @@ void OPC_EnterProc (OPT_Object proc) } var = proc->link; while (var != NIL) { - if ((((__IN(var->typ->comp, 0x0c) && var->mode == 1)) && var->typ->sysflag == 0)) { + if ((((__IN(var->typ->comp, 0x0c, 64) && var->mode == 1)) && var->typ->sysflag == 0)) { OPC_BegStat(); if (var->typ->comp == 2) { OPM_WriteString((CHAR*)"__DUPARR(", 10); @@ -1648,7 +1648,7 @@ void OPC_EnterProc (OPT_Object proc) OPM_Write('.'); OPC_Ident(var); OPM_WriteString((CHAR*)" = ", 4); - if (__IN(var->typ->comp, 0x0c)) { + if (__IN(var->typ->comp, 0x0c, 64)) { OPM_WriteString((CHAR*)"(void*)", 8); } else if (var->mode != 2) { OPM_Write('&'); @@ -2006,7 +2006,7 @@ void OPC_Constant (OPT_Const con, int32 form) do { i -= 1; hex = __ASHL(hex, 1); - if (__IN(i, s)) { + if (__IN(i, s, 64)) { hex += 1; } } while (!(__MASK(i, -8) == 0)); diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index aba4bdbb..646d0151 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPC__h #define OPC__h diff --git a/bootstrap/windows-88/OPM.c b/bootstrap/windows-88/OPM.c index 55420864..96868200 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -288,15 +288,15 @@ void OPM_InitOptions (void) s[0] = 0x00; Platform_GetArg(OPM_S, (void*)s, 256); } - OPM_dontAsm = __IN(13, OPM_opt); - OPM_dontLink = __IN(14, OPM_opt); - OPM_mainProg = __IN(10, OPM_opt); - OPM_mainLinkStat = __IN(15, OPM_opt); - OPM_notColorOutput = __IN(16, OPM_opt); - OPM_forceNewSym = __IN(17, OPM_opt); - OPM_Verbose = __IN(18, OPM_opt); + OPM_dontAsm = __IN(13, OPM_opt, 64); + OPM_dontLink = __IN(14, OPM_opt, 64); + OPM_mainProg = __IN(10, OPM_opt, 64); + OPM_mainLinkStat = __IN(15, OPM_opt, 64); + OPM_notColorOutput = __IN(16, OPM_opt, 64); + OPM_forceNewSym = __IN(17, OPM_opt, 64); + OPM_Verbose = __IN(18, OPM_opt, 64); if (OPM_mainLinkStat) { - OPM_glbopt |= __SETOF(10); + OPM_glbopt |= __SETOF(10,64); } OPM_GetProperties(); } @@ -771,7 +771,7 @@ void OPM_SymWLReal (LONGREAL lr) void OPM_RegisterNewSym (void) { - if (__STRCMP(OPM_modName, "SYSTEM") != 0 || __IN(10, OPM_opt)) { + if (__STRCMP(OPM_modName, "SYSTEM") != 0 || __IN(10, OPM_opt, 64)) { Files_Register(OPM_newSFile); } } @@ -970,10 +970,10 @@ void OPM_CloseFiles (void) } if (OPM_noerr) { if (__STRCMP(OPM_modName, "SYSTEM") == 0) { - if (!__IN(10, OPM_opt)) { + if (!__IN(10, OPM_opt, 64)) { Files_Register(OPM_BFile); } - } else if (!__IN(10, OPM_opt)) { + } else if (!__IN(10, OPM_opt, 64)) { OPM_Append(&OPM_R[2], Files_Rider__typ, OPM_HFile); Files_Register(OPM_HIFile); Files_Register(OPM_BFile); diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 1e5c3e72..d4b77c79 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPM__h #define OPM__h diff --git a/bootstrap/windows-88/OPP.c b/bootstrap/windows-88/OPP.c index f175938c..7e958472 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -94,7 +94,7 @@ static void OPP_qualident (OPT_Object *id) obj->adr = 0; } else { lev = obj->mnolev; - if ((__IN(obj->mode, 0x06) && lev != OPP_level)) { + if ((__IN(obj->mode, 0x06, 64) && lev != OPP_level)) { obj->leaf = 0; if (lev > 0) { OPB_StaticLink(OPP_level - lev); @@ -325,7 +325,7 @@ static void OPP_PointerType (OPT_Struct *typ) } else { OPP_qualident(&id); if (id->mode == 5) { - if (__IN(id->typ->comp, 0x1c)) { + if (__IN(id->typ->comp, 0x1c, 64)) { (*typ)->BaseTyp = id->typ; } else { (*typ)->BaseTyp = OPT_undftyp; @@ -338,7 +338,7 @@ static void OPP_PointerType (OPT_Struct *typ) } } else { OPP_Type(&(*typ)->BaseTyp, &OPT_notyp); - if (!__IN((*typ)->BaseTyp->comp, 0x1c)) { + if (!__IN((*typ)->BaseTyp->comp, 0x1c, 64)) { (*typ)->BaseTyp = OPT_undftyp; OPP_err(57); } @@ -966,7 +966,7 @@ static void GetCode__19 (void) } } } - (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1); + (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1,64); } static void GetParams__21 (void) @@ -998,7 +998,7 @@ static void Body__17 (void) OPT_Node procdec = NIL, statseq = NIL; int64 c; c = OPM_errpos; - (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1); + (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(1,64); OPP_CheckSym(39); OPP_Block(&procdec, &statseq); OPB_Enter(&procdec, statseq, *ProcedureDeclaration__16_s->proc); @@ -1041,7 +1041,7 @@ static void TProcDecl__23 (void) if ((*ProcedureDeclaration__16_s->fwd != NIL && (*ProcedureDeclaration__16_s->fwd)->mnolev != OPP_level)) { *ProcedureDeclaration__16_s->fwd = NIL; } - if ((((*ProcedureDeclaration__16_s->fwd != NIL && (*ProcedureDeclaration__16_s->fwd)->mode == 13)) && !__IN(1, (*ProcedureDeclaration__16_s->fwd)->conval->setval))) { + if ((((*ProcedureDeclaration__16_s->fwd != NIL && (*ProcedureDeclaration__16_s->fwd)->mode == 13)) && !__IN(1, (*ProcedureDeclaration__16_s->fwd)->conval->setval, 64))) { *ProcedureDeclaration__16_s->proc = OPT_NewObj(); (*ProcedureDeclaration__16_s->proc)->leaf = 1; if ((*ProcedureDeclaration__16_s->fwd)->vis != *ProcedureDeclaration__16_s->vis) { @@ -1075,7 +1075,7 @@ static void TProcDecl__23 (void) if ((((((baseProc->vis == 1 && (*ProcedureDeclaration__16_s->proc)->vis == 0)) && recTyp->strobj != NIL)) && recTyp->strobj->vis == 1)) { OPP_err(109); } - (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(2); + (*ProcedureDeclaration__16_s->proc)->conval->setval |= __SETOF(2,64); } if (!*ProcedureDeclaration__16_s->forward) { Body__17(); @@ -1118,7 +1118,7 @@ static void OPP_ProcedureDeclaration (OPT_Node *x) } else { OPP_err(38); } - if ((__IN(mode, 0x0600) && !OPT_SYSimported)) { + if ((__IN(mode, 0x0600, 64) && !OPT_SYSimported)) { OPP_err(135); } OPS_Get(&OPP_sym); @@ -1135,7 +1135,7 @@ static void OPP_ProcedureDeclaration (OPT_Node *x) if ((fwd != NIL && (fwd->mnolev != OPP_level || fwd->mode == 8))) { fwd = NIL; } - if ((((fwd != NIL && __IN(fwd->mode, 0xc0))) && !__IN(1, fwd->conval->setval))) { + if ((((fwd != NIL && __IN(fwd->mode, 0xc0, 64))) && !__IN(1, fwd->conval->setval, 64))) { proc = OPT_NewObj(); proc->leaf = 1; if (fwd->vis != vis) { @@ -1178,7 +1178,7 @@ static void OPP_CaseLabelList (OPT_Node *lab, OPT_Struct LabelTyp, int32 *n, OPP for (;;) { OPP_ConstExpression(&x); f = x->typ->form; - if (__IN(f, 0x18)) { + if (__IN(f, 0x18, 64)) { xval = x->conval->intval; } else { OPP_err(61); @@ -1258,7 +1258,7 @@ static void CasePart__31 (OPT_Node *x) *StatSeq__30_s->pos = OPM_errpos; if ((*x)->class == 8 || (*x)->class == 9) { OPP_err(126); - } else if (!__IN((*x)->typ->form, 0x18)) { + } else if (!__IN((*x)->typ->form, 0x18, 64)) { OPP_err(125); } OPP_CheckSym(25); @@ -1675,7 +1675,7 @@ static void OPP_Block (OPT_Node *procdec, OPT_Node *statseq) if (obj->typ->strobj == NIL) { obj->typ->strobj = obj; } - if (__IN(obj->typ->comp, 0x1c)) { + if (__IN(obj->typ->comp, 0x1c, 64)) { i = 0; while (i < OPP_nofFwdPtr) { typ = OPP_FwdPtr[__X(i, 64)]; diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 2d3ebd77..9ddded2f 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPP__h #define OPP__h diff --git a/bootstrap/windows-88/OPS.c b/bootstrap/windows-88/OPS.c index 0c36910a..208f4934 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/windows-88/OPS.h b/bootstrap/windows-88/OPS.h index a16c2ce8..bb045fe9 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin tspkaSfF */ #ifndef OPS__h #define OPS__h diff --git a/bootstrap/windows-88/OPT.c b/bootstrap/windows-88/OPT.c index 3006ea90..afc5a8b6 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -274,9 +274,9 @@ void OPT_Init (OPS_Name name, SET opt) __COPY(name, OPT_topScope->name, 256); OPT_GlbMod[0] = OPT_topScope; OPT_nofGmod = 1; - OPT_newsf = __IN(4, opt); - OPT_findpc = __IN(8, opt); - OPT_extsf = OPT_newsf || __IN(9, opt); + OPT_newsf = __IN(4, opt, 64); + OPT_findpc = __IN(8, opt, 64); + OPT_extsf = OPT_newsf || __IN(9, opt, 64); OPT_sfpresent = 1; } @@ -609,7 +609,7 @@ void OPT_FPrintStr (OPT_Struct typ) pvfp = pbfp; } } else if (f == 12) { - } else if (__IN(c, 0x0c)) { + } else if (__IN(c, 0x0c, 64)) { OPT_FPrintStr(btyp); OPM_FPrint(&pbfp, btyp->pvfp); pvfp = pbfp; @@ -680,7 +680,7 @@ void OPT_FPrintObj (OPT_Object obj) OPM_FPrint(&fprint, obj->vis); OPT_FPrintStr(obj->typ); OPM_FPrint(&fprint, obj->typ->pbfp); - } else if (__IN(obj->mode, 0x0480)) { + } else if (__IN(obj->mode, 0x0480, 64)) { OPT_FPrintSign(&fprint, obj->typ, obj->link); } else if (obj->mode == 9) { OPT_FPrintSign(&fprint, obj->typ, obj->link); @@ -1573,7 +1573,7 @@ static void OPT_OutObj (OPT_Object obj) OPT_ConstExt ext = NIL; if (obj != NIL) { OPT_OutObj(obj->left); - if (__IN(obj->mode, 0x06ea)) { + if (__IN(obj->mode, 0x06ea, 64)) { if (obj->history == 4) { OPT_FPrintErr(obj, 250); } else if (obj->vis != 0) { diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 5f466ec4..090d9111 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 082797f1..098463c4 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -130,10 +130,10 @@ void OPV_Init (void) OPV_stamp = 0; OPV_recno = 0; OPV_nofExitLabels = 0; - OPV_assert = __IN(7, OPM_opt); - OPV_inxchk = __IN(0, OPM_opt); - OPV_mainprog = __IN(10, OPM_opt); - OPV_ansi = __IN(6, OPM_opt); + OPV_assert = __IN(7, OPM_opt, 64); + OPV_inxchk = __IN(0, OPM_opt, 64); + OPV_mainprog = __IN(10, OPM_opt, 64); + OPV_ansi = __IN(6, OPM_opt, 64); } static void OPV_GetTProcNum (OPT_Object obj) @@ -150,7 +150,7 @@ static void OPV_GetTProcNum (OPT_Object obj) OPT_FindField(obj->name, typ->BaseTyp, &redef); if (redef != NIL) { obj->adr = __ASHL(__ASHR(redef->adr, 16), 16); - if (!__IN(2, obj->conval->setval)) { + if (!__IN(2, obj->conval->setval, 64)) { OPM_err(119); } } else { @@ -230,12 +230,12 @@ static void OPV_Traverse (OPT_Object obj, OPT_Object outerScope, BOOLEAN exporte OPV_TypSize(obj->typ); } if (!exported) { - if ((__IN(mode, 0x60) && obj->mnolev > 0)) { + if ((__IN(mode, 0x60, 64) && obj->mnolev > 0)) { OPV_Stamp(obj->name); } - if (__IN(mode, 0x26)) { + if (__IN(mode, 0x26, 64)) { obj->scope = outerScope; - } else if (__IN(mode, 0x26c0)) { + } else if (__IN(mode, 0x26c0, 64)) { if (obj->conval->setval == 0x0) { OPM_err(129); } @@ -289,7 +289,7 @@ static int32 OPV_Precedence (int32 class, int32 subclass, int32 form, int32 comp return _o_result; break; case 5: - if (__IN(3, OPM_opt)) { + if (__IN(3, OPM_opt, 64)) { _o_result = 10; return _o_result; } else { @@ -298,7 +298,7 @@ static int32 OPV_Precedence (int32 class, int32 subclass, int32 form, int32 comp } break; case 1: - if (__IN(comp, 0x0c)) { + if (__IN(comp, 0x0c, 64)) { _o_result = 10; return _o_result; } else { @@ -445,7 +445,7 @@ static BOOLEAN OPV_SideEffects (OPT_Node n) static void OPV_Entier (OPT_Node n, int32 prec) { - if (__IN(n->typ->form, 0x60)) { + if (__IN(n->typ->form, 0x60, 64)) { OPM_WriteString((CHAR*)"__ENTIER(", 10); OPV_expr(n, -1); OPM_Write(')'); @@ -471,9 +471,11 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, int32 prec) if (to == 7) { OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_Entier(n, -1); + OPM_WriteString((CHAR*)",", 2); + OPM_WriteInt(__ASHL(newtype->size, 3)); OPM_Write(')'); } else if (to == 4) { - if ((newtype->size < n->typ->size && __IN(2, OPM_opt))) { + if ((newtype->size < n->typ->size && __IN(2, OPM_opt, 64))) { OPM_WriteString((CHAR*)"__SHORT", 8); if (OPV_SideEffects(n)) { OPM_Write('F'); @@ -488,7 +490,7 @@ static void OPV_Convert (OPT_Node n, OPT_Struct newtype, int32 prec) OPV_Entier(n, 9); } } else if (to == 3) { - if (__IN(2, OPM_opt)) { + if (__IN(2, OPM_opt, 64)) { OPM_WriteString((CHAR*)"__CHR", 6); if (OPV_SideEffects(n)) { OPM_Write('F'); @@ -511,7 +513,7 @@ static void OPV_TypeOf (OPT_Node n) OPM_WriteString((CHAR*)"__TYPEOF(", 10); OPV_expr(n, -1); OPM_Write(')'); - } else if (__IN(n->class, 0x15)) { + } else if (__IN(n->class, 0x15, 64)) { OPC_Andent(n->typ); OPM_WriteString((CHAR*)"__typ", 6); } else if (n->class == 3) { @@ -572,7 +574,7 @@ static void OPV_design (OPT_Node n, int32 prec) OPC_CompleteIdent(n->obj); break; case 1: - if (!__IN(comp, 0x0c)) { + if (!__IN(comp, 0x0c, 64)) { OPM_Write('*'); } OPC_CompleteIdent(n->obj); @@ -651,7 +653,7 @@ static void OPV_design (OPT_Node n, int32 prec) case 5: typ = n->typ; obj = n->left->obj; - if (__IN(3, OPM_opt)) { + if (__IN(3, OPM_opt, 64)) { if (typ->comp == 4) { OPM_WriteString((CHAR*)"__GUARDR(", 10); if (obj->mnolev != OPM_level) { @@ -690,7 +692,7 @@ static void OPV_design (OPT_Node n, int32 prec) } break; case 6: - if (__IN(3, OPM_opt)) { + if (__IN(3, OPM_opt, 64)) { if (n->left->class == 1) { OPM_WriteString((CHAR*)"__GUARDEQR(", 12); OPC_CompleteIdent(n->left->obj); @@ -749,7 +751,7 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp) OPM_WriteString((CHAR*)"*)", 3); prec = 10; } - if (!__IN(n->typ->comp, 0x0c)) { + if (!__IN(n->typ->comp, 0x0c, 64)) { if (mode == 2) { if ((OPV_ansi && typ != n->typ)) { OPM_WriteString((CHAR*)"(void*)", 8); @@ -757,13 +759,13 @@ static void OPV_ActualPar (OPT_Node n, OPT_Object fp) OPM_Write('&'); prec = 9; } else if (OPV_ansi) { - if ((__IN(comp, 0x0c) && n->class == 7)) { + if ((__IN(comp, 0x0c, 64) && n->class == 7)) { OPM_WriteString((CHAR*)"(CHAR*)", 8); } else if ((((form == 11 && typ != n->typ)) && n->typ != OPT_niltyp)) { OPM_WriteString((CHAR*)"(void*)", 8); } } else { - if ((__IN(form, 0x60) && n->typ->form == 4)) { + if ((__IN(form, 0x60, 64) && n->typ->form == 4)) { OPM_WriteString((CHAR*)"(double)", 9); prec = 9; } else if (form == 4) { @@ -846,7 +848,7 @@ static void OPV_expr (OPT_Node n, int32 prec) l = n->left; r = n->right; exprPrec = OPV_Precedence(class, subclass, form, n->typ->comp); - if ((exprPrec <= prec && __IN(class, 0x3ce0))) { + if ((exprPrec <= prec && __IN(class, 0x3ce0, 64))) { OPM_Write('('); } switch (class) { @@ -858,6 +860,8 @@ static void OPV_expr (OPT_Node n, int32 prec) OPV_expr(l, -1); OPM_WriteString((CHAR*)", ", 3); OPV_expr(r, -1); + OPM_WriteString((CHAR*)", ", 3); + OPM_WriteInt(__ASHL(n->typ->size, 3)); OPM_Write(')'); break; case 11: @@ -924,18 +928,18 @@ static void OPV_expr (OPT_Node n, int32 prec) if (l->class == 1) { OPC_CompleteIdent(l->obj); } else { - if ((l->typ->form != 8 && !__IN(l->typ->comp, 0x0c))) { + if ((l->typ->form != 8 && !__IN(l->typ->comp, 0x0c, 64))) { OPM_Write('&'); } OPV_expr(l, exprPrec); } break; case 29: - if (!__IN(l->class, 0x17) || (((__IN(n->typ->form, 0x1890) && __IN(l->typ->form, 0x1890))) && n->typ->size == l->typ->size)) { + if (!__IN(l->class, 0x17, 64) || (((__IN(n->typ->form, 0x1890, 64) && __IN(l->typ->form, 0x1890, 64))) && n->typ->size == l->typ->size)) { OPM_Write('('); OPC_Ident(n->typ->strobj); OPM_Write(')'); - if (__IN(n->typ->form, 0x1800) || __IN(l->typ->form, 0x1800)) { + if (__IN(n->typ->form, 0x1800, 64) || __IN(l->typ->form, 0x1800, 64)) { OPM_WriteString((CHAR*)"(address)", 10); } OPV_expr(l, exprPrec); @@ -1032,20 +1036,24 @@ static void OPV_expr (OPT_Node n, int32 prec) } OPV_expr(l, -1); OPM_WriteString((CHAR*)", ", 3); - if ((((__IN(subclass, 0x18020000) && r->class == 7)) && r->conval->intval < 0)) { + if ((((__IN(subclass, 0x18020000, 64) && r->class == 7)) && r->conval->intval < 0)) { OPM_WriteInt(-r->conval->intval); } else { OPV_expr(r, -1); } - if (__IN(subclass, 0x18000000)) { + if (__IN(subclass, 0x18008000, 64)) { OPM_WriteString((CHAR*)", ", 3); - OPM_WriteInt(__ASHL(l->typ->size, 3)); + if (subclass == 15) { + OPM_WriteInt(__ASHL(r->typ->size, 3)); + } else { + OPM_WriteInt(__ASHL(l->typ->size, 3)); + } } OPM_Write(')'); break; case 9: case 10: case 11: case 12: case 13: case 14: - if (__IN(l->typ->form, 0x2100)) { + if (__IN(l->typ->form, 0x2100, 64)) { OPM_WriteString((CHAR*)"__STRCMP(", 10); OPV_expr(l, -1); OPM_WriteString((CHAR*)", ", 3); @@ -1142,7 +1150,7 @@ static void OPV_expr (OPT_Node n, int32 prec) OPV_design(n, prec); break; } - if ((exprPrec <= prec && __IN(class, 0x3ca0))) { + if ((exprPrec <= prec && __IN(class, 0x3ca0, 64))) { OPM_Write(')'); } } @@ -1432,7 +1440,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_WriteString((CHAR*)", ", 3); OPC_Andent(n->left->typ->BaseTyp); OPM_WriteString((CHAR*)")", 2); - } else if (__IN(n->left->typ->BaseTyp->comp, 0x0c)) { + } else if (__IN(n->left->typ->BaseTyp->comp, 0x0c, 64)) { OPV_NewArr(n->left, n->right); } break; @@ -1446,6 +1454,8 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPC_SetInclude(n->subcl == 16); OPM_WriteString((CHAR*)"__SETOF(", 9); OPV_expr(n->right, -1); + OPM_WriteString((CHAR*)",", 2); + OPM_WriteInt(__ASHL(n->left->typ->size, 3)); OPM_Write(')'); break; case 18: @@ -1623,7 +1633,7 @@ static void OPV_stat (OPT_Node n, OPT_Object outerProc) OPM_LogWLn(); break; } - if (!__IN(n->class, 0x09744000)) { + if (!__IN(n->class, 0x09744000, 64)) { OPC_EndStat(); } n = n->link; diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 3b43e61e..ea1f9aaa 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPV__h #define OPV__h diff --git a/bootstrap/windows-88/Platform.c b/bootstrap/windows-88/Platform.c index b7705767..3bb993de 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/windows-88/Platform.h b/bootstrap/windows-88/Platform.h index 290fc518..c1175e02 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Platform__h #define Platform__h diff --git a/bootstrap/windows-88/Reals.c b/bootstrap/windows-88/Reals.c index 2a753b7a..b3e89e04 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/windows-88/Reals.h b/bootstrap/windows-88/Reals.h index c3cac05a..3892d49c 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Reals__h #define Reals__h diff --git a/bootstrap/windows-88/Strings.c b/bootstrap/windows-88/Strings.c index d8c606d3..1eef261b 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/windows-88/Strings.h b/bootstrap/windows-88/Strings.h index 130e1d06..8145aa00 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Strings__h #define Strings__h diff --git a/bootstrap/windows-88/Texts.c b/bootstrap/windows-88/Texts.c index 056c54e0..d8710e54 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -578,13 +578,13 @@ void Texts_ChangeLooks (Texts_Text T, int64 beg, int64 end, SET sel, Texts_Fonts T->cache = c; T->corg = co; while (un != vn) { - if ((__IN(0, sel) && fnt != NIL)) { + if ((__IN(0, sel, 64) && fnt != NIL)) { un->fnt = fnt; } - if (__IN(1, sel)) { + if (__IN(1, sel, 64)) { un->col = col; } - if (__IN(2, sel)) { + if (__IN(2, sel, 64)) { un->voff = voff; } Texts_Merge(T, u, &un); diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index 1e734f9d..8389bc47 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h diff --git a/bootstrap/windows-88/Vishap.c b/bootstrap/windows-88/Vishap.c index 08b89b00..3972af10 100644 --- a/bootstrap/windows-88/Vishap.c +++ b/bootstrap/windows-88/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkamSf */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/windows-88/errors.c b/bootstrap/windows-88/errors.c index 84d35faf..8864c777 100644 --- a/bootstrap/windows-88/errors.c +++ b/bootstrap/windows-88/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/windows-88/errors.h b/bootstrap/windows-88/errors.h index 4fe434e1..58286fd8 100644 --- a/bootstrap/windows-88/errors.h +++ b/bootstrap/windows-88/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef errors__h #define errors__h diff --git a/bootstrap/windows-88/extTools.c b/bootstrap/windows-88/extTools.c index 7651bcf8..bb60848a 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/windows-88/extTools.h b/bootstrap/windows-88/extTools.h index 5d996dae..8a0d60be 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef extTools__h #define extTools__h diff --git a/bootstrap/windows-88/vt100.c b/bootstrap/windows-88/vt100.c index b7524886..c143a6b3 100644 --- a/bootstrap/windows-88/vt100.c +++ b/bootstrap/windows-88/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/windows-88/vt100.h b/bootstrap/windows-88/vt100.h index ef3afa5a..11a9c941 100644 --- a/bootstrap/windows-88/vt100.h +++ b/bootstrap/windows-88/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/12] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/14] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/src/system/Heap.Mod b/src/system/Heap.Mod index bf3d0d7f..00023a0a 100644 --- a/src/system/Heap.Mod +++ b/src/system/Heap.Mod @@ -3,10 +3,12 @@ MODULE Heap; IMPORT SYSTEM; (* Cannot import anything else as heap initialization must complete before any other modules are initialized. *) + TYPE Address = SYSTEM.ADDRESS; + CONST ModNameLen = 20; CmdNameLen = 24; - SZA = SIZE(SYSTEM.ADDRESS); (* Size of address *) + SZA = SIZE(Address); (* Size of address *) Unit = 4*SZA; (* smallest possible heap block *) nofLists = 9; (* number of free_lists *) heapSize0 = 8000*Unit; (* startup heap size *) @@ -20,17 +22,17 @@ MODULE Heap; *) (* heap chunks *) - nextChnkOff = SYSTEM.VAL(SYSTEM.ADDRESS, 0); (* next heap chunk, sorted ascendingly! *) - endOff = SYSTEM.VAL(SYSTEM.ADDRESS, SZA); (* end of heap chunk *) - blkOff = SYSTEM.VAL(SYSTEM.ADDRESS, 3*SZA); (* first block in a chunk *) + nextChnkOff = SYSTEM.VAL(Address, 0); (* next heap chunk, sorted ascendingly! *) + endOff = SYSTEM.VAL(Address, SZA); (* end of heap chunk *) + blkOff = SYSTEM.VAL(Address, 3*SZA); (* first block in a chunk *) (* heap blocks *) - tagOff = SYSTEM.VAL(SYSTEM.ADDRESS, 0); (* block starts with tag *) - sizeOff = SYSTEM.VAL(SYSTEM.ADDRESS, SZA); (* block size in free block relative to block start *) - sntlOff = SYSTEM.VAL(SYSTEM.ADDRESS, 2*SZA); (* pointer offset table sentinel in free block relative to block start *) - nextOff = SYSTEM.VAL(SYSTEM.ADDRESS, 3*SZA); (* next pointer in free block relative to block start *) - NoPtrSntl = SYSTEM.VAL(SYSTEM.ADDRESS, -SZA); - AddressZero = SYSTEM.VAL(SYSTEM.ADDRESS, 0); + tagOff = SYSTEM.VAL(Address, 0); (* block starts with tag *) + sizeOff = SYSTEM.VAL(Address, SZA); (* block size in free block relative to block start *) + sntlOff = SYSTEM.VAL(Address, 2*SZA); (* pointer offset table sentinel in free block relative to block start *) + nextOff = SYSTEM.VAL(Address, 3*SZA); (* next pointer in free block relative to block start *) + NoPtrSntl = SYSTEM.VAL(Address, -SZA); + AddressZero = SYSTEM.VAL(Address, 0); TYPE ModuleName = ARRAY ModNameLen OF CHAR; @@ -46,7 +48,7 @@ MODULE Heap; name: ModuleName; refcnt: LONGINT; cmds: Cmd; - types: SYSTEM.ADDRESS; + types: Address; enumPtrs: EnumProc; reserved1, reserved2: LONGINT END ; @@ -64,7 +66,7 @@ MODULE Heap; FinNode = POINTER TO FinDesc; FinDesc = RECORD next: FinNode; - obj: SYSTEM.ADDRESS; (* weak pointer *) + obj: Address; (* weak pointer *) marked: BOOLEAN; finalize: Finalizer; END ; @@ -73,15 +75,15 @@ MODULE Heap; (* the list of loaded (=initialization started) modules *) modules*: SYSTEM.PTR; - freeList: ARRAY nofLists + 1 OF SYSTEM.ADDRESS; (* dummy, 16, 32, 48, 64, 80, 96, 112, 128, sentinel *) - bigBlocks: SYSTEM.ADDRESS; - allocated*: SYSTEM.ADDRESS; + freeList: ARRAY nofLists + 1 OF Address; (* dummy, 16, 32, 48, 64, 80, 96, 112, 128, sentinel *) + bigBlocks: Address; + allocated*: Address; firstTry: BOOLEAN; (* extensible heap *) - heap: SYSTEM.ADDRESS; (* the sorted list of heap chunks *) - heapend: SYSTEM.ADDRESS; (* max possible pointer value (used for stack collection) *) - heapsize*: SYSTEM.ADDRESS; (* the sum of all heap chunk sizes *) + heap: Address; (* the sorted list of heap chunks *) + heapend: Address; (* max possible pointer value (used for stack collection) *) + heapsize*: Address; (* the sum of all heap chunk sizes *) (* finalization candidates *) fin: FinNode; @@ -153,7 +155,7 @@ MODULE Heap; COPY(name, c.name); c.cmd := cmd; c.next := m.cmds; m.cmds := c END REGCMD; - PROCEDURE REGTYP*(m: Module; typ: SYSTEM.ADDRESS); + PROCEDURE REGTYP*(m: Module; typ: Address); BEGIN SYSTEM.PUT(typ, m.types); m.types := typ END REGTYP; @@ -163,10 +165,10 @@ MODULE Heap; PROCEDURE -ExternPlatformOSAllocate "extern address Platform_OSAllocate(address size);"; - PROCEDURE -OSAllocate(size: SYSTEM.ADDRESS): SYSTEM.ADDRESS "Platform_OSAllocate(size)"; + PROCEDURE -OSAllocate(size: Address): Address "Platform_OSAllocate(size)"; - PROCEDURE NewChunk(blksz: SYSTEM.ADDRESS): SYSTEM.ADDRESS; - VAR chnk: SYSTEM.ADDRESS; + PROCEDURE NewChunk(blksz: Address): Address; + VAR chnk: Address; BEGIN chnk := OSAllocate(blksz + blkOff); IF chnk # 0 THEN @@ -182,19 +184,13 @@ MODULE Heap; END NewChunk; - (* FetchAddress fetches a pointer from memory and returns it as a LONGINT. It works - correctly regardless of the size of an address. Specifically on 32 bit address - architectures with 64 bit LONGINT, it loads 32 bits and extends it to LONGINT - rather than loading 64 bits. - - NOTE - with uintpr work complete this function should be replaced with SYSTEM.GET - as there will be no need to extend addresses to larger types. + (* + PROCEDURE -FetchAddress(pointer: Address): Address "(address)(*((void**)((address)pointer)))"; *) + PROCEDURE FetchAddress(pointer: Address): Address; VAR r: Address; BEGIN SYSTEM.GET(pointer, r); RETURN r END FetchAddress; - PROCEDURE -FetchAddress(pointer: SYSTEM.ADDRESS): SYSTEM.ADDRESS "(address)(*((void**)((address)pointer)))"; - - PROCEDURE ExtendHeap(blksz: SYSTEM.ADDRESS); - VAR size, chnk, j, next: SYSTEM.ADDRESS; + PROCEDURE ExtendHeap(blksz: Address); + VAR size, chnk, j, next: Address; BEGIN IF blksz > 10000*Unit THEN size := blksz ELSE size := 10000*Unit (* additional heuristics *) @@ -218,16 +214,16 @@ MODULE Heap; PROCEDURE ^GC*(markStack: BOOLEAN); - PROCEDURE NEWREC*(tag: SYSTEM.ADDRESS): SYSTEM.PTR; + PROCEDURE NEWREC*(tag: Address): SYSTEM.PTR; VAR - i, i0, di, blksz, restsize, t, adr, end, next, prev: SYSTEM.ADDRESS; + i, i0, di, blksz, restsize, t, adr, end, next, prev: Address; new: SYSTEM.PTR; BEGIN Lock(); blksz := FetchAddress(tag); ASSERT((Unit = 16) OR (Unit = 32)); - ASSERT(SIZE(SYSTEM.PTR) = SIZE(SYSTEM.ADDRESS)); + ASSERT(SIZE(SYSTEM.PTR) = SIZE(Address)); ASSERT(blksz MOD Unit = 0); i0 := blksz DIV Unit; i := i0; @@ -310,23 +306,23 @@ MODULE Heap; RETURN SYSTEM.VAL(SYSTEM.PTR, adr + SZA) END NEWREC; - PROCEDURE NEWBLK*(size: SYSTEM.ADDRESS): SYSTEM.PTR; - VAR blksz, tag: SYSTEM.ADDRESS; new: SYSTEM.PTR; + PROCEDURE NEWBLK*(size: Address): SYSTEM.PTR; + VAR blksz, tag: Address; new: SYSTEM.PTR; BEGIN Lock(); blksz := (size + (4*SZA + Unit - 1)) DIV Unit * Unit; (*size + tag + meta + blksz + sntnl + UnitAlignment*) new := NEWREC(SYSTEM.ADR(blksz)); - tag := SYSTEM.VAL(SYSTEM.ADDRESS, new) + blksz - 3*SZA; + tag := SYSTEM.VAL(Address, new) + blksz - 3*SZA; SYSTEM.PUT(tag - SZA, AddressZero); (*reserved for meta info*) SYSTEM.PUT(tag, blksz); SYSTEM.PUT(tag + SZA, NoPtrSntl); - SYSTEM.PUT(SYSTEM.VAL(SYSTEM.ADDRESS, new) - SZA, tag); + SYSTEM.PUT(SYSTEM.VAL(Address, new) - SZA, tag); Unlock(); RETURN new END NEWBLK; - PROCEDURE Mark(q: SYSTEM.ADDRESS); - VAR p, tag, offset, fld, n, tagbits: SYSTEM.ADDRESS; + PROCEDURE Mark(q: Address); + VAR p, tag, offset, fld, n, tagbits: Address; BEGIN IF q # 0 THEN tagbits := FetchAddress(q - SZA); (* Load the tag for the record at q *) @@ -365,11 +361,11 @@ MODULE Heap; PROCEDURE MarkP(p: SYSTEM.PTR); (* for compatibility with EnumPtrs in ANSI mode *) BEGIN - Mark(SYSTEM.VAL(SYSTEM.ADDRESS, p)) + Mark(SYSTEM.VAL(Address, p)) END MarkP; PROCEDURE Scan; - VAR chnk, adr, end, start, tag, i, size, freesize: SYSTEM.ADDRESS; + VAR chnk, adr, end, start, tag, i, size, freesize: Address; BEGIN bigBlocks := 0; i := 1; WHILE i < nofLists DO freeList[i] := 0; INC(i) END ; freesize := 0; allocated := 0; chnk := heap; @@ -414,8 +410,8 @@ MODULE Heap; END END Scan; - PROCEDURE Sift (l, r: SYSTEM.ADDRESS; VAR a: ARRAY OF SYSTEM.ADDRESS); - VAR i, j, x: SYSTEM.ADDRESS; + PROCEDURE Sift (l, r: Address; VAR a: ARRAY OF Address); + VAR i, j, x: Address; BEGIN j := l; x := a[j]; LOOP i := j; j := 2*j + 1; IF (j < r) & (a[j] < a[j+1]) THEN INC(j) END; @@ -425,15 +421,15 @@ MODULE Heap; a[i] := x END Sift; - PROCEDURE HeapSort (n: SYSTEM.ADDRESS; VAR a: ARRAY OF SYSTEM.ADDRESS); - VAR l, r, x: SYSTEM.ADDRESS; + PROCEDURE HeapSort (n: Address; VAR a: ARRAY OF Address); + VAR l, r, x: Address; BEGIN l := n DIV 2; r := n - 1; WHILE l > 0 DO DEC(l); Sift(l, r, a) END; WHILE r > 0 DO x := a[0]; a[0] := a[r]; a[r] := x; DEC(r); Sift(l, r, a) END END HeapSort; - PROCEDURE MarkCandidates(n: SYSTEM.ADDRESS; VAR cand: ARRAY OF SYSTEM.ADDRESS); - VAR chnk, adr, tag, next, lim, lim1, i, ptr, size: SYSTEM.ADDRESS; + PROCEDURE MarkCandidates(n: Address; VAR cand: ARRAY OF Address); + VAR chnk, adr, tag, next, lim, lim1, i, ptr, size: Address; BEGIN chnk := heap; i := 0; lim := cand[n-1]; WHILE (chnk # 0 ) & (chnk < lim) DO @@ -459,7 +455,7 @@ MODULE Heap; END MarkCandidates; PROCEDURE CheckFin; - VAR n: FinNode; tag: SYSTEM.ADDRESS; + VAR n: FinNode; tag: Address; BEGIN n := fin; WHILE n # NIL DO @@ -496,13 +492,13 @@ MODULE Heap; END FINALL; PROCEDURE -ExternMainStackFrame "extern address Platform_MainStackFrame;"; - PROCEDURE -PlatformMainStackFrame(): SYSTEM.ADDRESS "Platform_MainStackFrame"; + PROCEDURE -PlatformMainStackFrame(): Address "Platform_MainStackFrame"; - PROCEDURE MarkStack(n: SYSTEM.ADDRESS; VAR cand: ARRAY OF SYSTEM.ADDRESS); + PROCEDURE MarkStack(n: Address; VAR cand: ARRAY OF Address); VAR frame: SYSTEM.PTR; - inc, nofcand: SYSTEM.ADDRESS; - sp, p, stack0: SYSTEM.ADDRESS; + inc, nofcand: Address; + sp, p, stack0: Address; align: RECORD ch: CHAR; p: SYSTEM.PTR END ; BEGIN IF n > 0 THEN MarkStack(n-1, cand); (* flush register windows by means of recursive calls *) @@ -529,8 +525,8 @@ MODULE Heap; PROCEDURE GC*(markStack: BOOLEAN); VAR m: Module; - i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23: SYSTEM.ADDRESS; - cand: ARRAY 10000 OF SYSTEM.ADDRESS; + i0, i1, i2, i3, i4, i5, i6, i7, i8, i9, i10, i11, i12, i13, i14, i15, i16, i17, i18, i19, i20, i21, i22, i23: Address; + cand: ARRAY 10000 OF Address; BEGIN IF (lockdepth = 0) OR (lockdepth = 1) & ~markStack THEN Lock(); @@ -565,7 +561,7 @@ MODULE Heap; PROCEDURE RegisterFinalizer*(obj: SYSTEM.PTR; finalize: Finalizer); VAR f: FinNode; BEGIN NEW(f); - f.obj := SYSTEM.VAL(SYSTEM.ADDRESS, obj); f.finalize := finalize; f.marked := TRUE; + f.obj := SYSTEM.VAL(Address, obj); f.finalize := finalize; f.marked := TRUE; f.next := fin; fin := f; END RegisterFinalizer; diff --git a/src/system/SYSTEM.c b/src/system/SYSTEM.c index defcc9fa..6efc8321 100644 --- a/src/system/SYSTEM.c +++ b/src/system/SYSTEM.c @@ -46,37 +46,6 @@ int64 SYSTEM_MOD(int64 x, int64 y) else {return -((-x) % (-y));} } - -void SYSTEM_INHERIT(LONGINT *t, LONGINT *t0) -{ - t -= __TPROC0OFF; - t0 -= __TPROC0OFF; - while (*t0 != __EOM) {*t = *t0; t--; t0--;} -} - - -void SYSTEM_ENUMP(void *adr, LONGINT n, void (*P)()) -{ - while (n > 0) { - P((address)(*((void**)(adr)))); - adr = ((void**)adr) + 1; - n--; - } -} - -void SYSTEM_ENUMR(void *adr, LONGINT *typ, LONGINT size, LONGINT n, void (*P)()) -{ - LONGINT *t, off; - typ++; - while (n > 0) { - t = typ; - off = *t; - while (off >= 0) {P(*(address*)((char*)adr+off)); t++; off = *t;} - adr = ((char*)adr) + size; - n--; - } -} - LONGINT SYSTEM_ENTIER(double x) { LONGINT y; @@ -88,22 +57,55 @@ LONGINT SYSTEM_ENTIER(double x) } } + + + +void SYSTEM_INHERIT(address *t, address *t0) +{ + t -= __TPROC0OFF; + t0 -= __TPROC0OFF; + while (*t0 != __EOM) {*t = *t0; t--; t0--;} +} + + +void SYSTEM_ENUMP(void *adr, address n, void (*P)()) +{ + while (n > 0) { + P((address)(*((void**)(adr)))); + adr = ((void**)adr) + 1; + n--; + } +} + +void SYSTEM_ENUMR(void *adr, address *typ, address size, address n, void (*P)()) +{ + address *t, off; + typ++; + while (n > 0) { + t = typ; + off = *t; + while (off >= 0) {P(*(address*)((char*)adr+off)); t++; off = *t;} + adr = ((char*)adr) + size; + n--; + } +} + extern void Heap_Lock(); extern void Heap_Unlock(); -SYSTEM_PTR SYSTEM_NEWARR(LONGINT *typ, LONGINT elemsz, int elemalgn, int nofdim, int nofdyn, ...) +SYSTEM_PTR SYSTEM_NEWARR(address *typ, address elemsz, int elemalgn, int nofdim, int nofdyn, ...) { - LONGINT nofelems, size, dataoff, n, nptr, *x, *p, nofptrs, i, *ptab, off; + address nofelems, size, dataoff, n, nptr, *x, *p, nofptrs, i, *ptab, off; va_list ap; va_start(ap, nofdyn); nofelems = 1; while (nofdim > 0) { - nofelems = nofelems * va_arg(ap, LONGINT); nofdim--; + nofelems = nofelems * va_arg(ap, address); nofdim--; if (nofelems <= 0) __HALT(-20); } va_end(ap); - dataoff = nofdyn * sizeof(LONGINT); - if (elemalgn > sizeof(LONGINT)) { + dataoff = nofdyn * sizeof(address); + if (elemalgn > sizeof(address)) { n = dataoff % elemalgn; if (n != 0) dataoff += elemalgn - n; } @@ -113,37 +115,37 @@ SYSTEM_PTR SYSTEM_NEWARR(LONGINT *typ, LONGINT elemsz, int elemalgn, int nofdim, /* element typ does not contain pointers */ x = Heap_NEWBLK(size); } - else if (typ == (LONGINT*)POINTER__typ) { + else if (typ == (address*)POINTER__typ) { /* element type is a pointer */ - x = Heap_NEWBLK(size + nofelems * sizeof(LONGINT)); - p = (LONGINT*)(address)x[-1]; + x = Heap_NEWBLK(size + nofelems * sizeof(address)); + p = (address*)(address)x[-1]; p[-nofelems] = *p; /* build new type desc in situ: 1. copy block size; 2. setup ptr tab; 3. set sentinel; 4. patch tag */ p -= nofelems - 1; n = 1; /* n =1 for skipping the size field */ - while (n <= nofelems) {*p = n*sizeof(LONGINT); p++; n++;} - *p = - (nofelems + 1) * sizeof(LONGINT); /* sentinel */ - x[-1] -= nofelems * sizeof(LONGINT); + while (n <= nofelems) {*p = n*sizeof(address); p++; n++;} + *p = - (nofelems + 1) * sizeof(address); /* sentinel */ + x[-1] -= nofelems * sizeof(address); } else { /* element type is a record that contains pointers */ ptab = typ + 1; nofptrs = 0; while (ptab[nofptrs] >= 0) {nofptrs++;} /* number of pointers per element */ nptr = nofelems * nofptrs; /* total number of pointers */ - x = Heap_NEWBLK(size + nptr * sizeof(LONGINT)); - p = (LONGINT*)(address)x[- 1]; + x = Heap_NEWBLK(size + nptr * sizeof(address)); + p = (address*)(address)x[- 1]; p[-nptr] = *p; /* build new type desc in situ; 1. copy block size; 2. setup ptr tab; 3. set sentinel; 4. patch tag */ p -= nptr - 1; n = 0; off = dataoff; while (n < nofelems) {i = 0; while (i < nofptrs) {*p = off + ptab[i]; p++; i++;} off += elemsz; n++; } - *p = - (nptr + 1) * sizeof(LONGINT); /* sentinel */ - x[-1] -= nptr * sizeof(LONGINT); + *p = - (nptr + 1) * sizeof(address); /* sentinel */ + x[-1] -= nptr * sizeof(address); } if (nofdyn != 0) { /* setup len vector for index checks */ va_start(ap, nofdyn); p = x; - while (nofdyn > 0) {*p = va_arg(ap, LONGINT); p++, nofdyn--;} + while (nofdyn > 0) {*p = va_arg(ap, address); p++, nofdyn--;} va_end(ap); } Heap_Unlock(); diff --git a/src/system/SYSTEM.h b/src/system/SYSTEM.h index 7c645e85..ddd85144 100644 --- a/src/system/SYSTEM.h +++ b/src/system/SYSTEM.h @@ -243,6 +243,10 @@ static inline double SYSTEM_ABSD(double i) {return i >= 0.0 ? i : -i;} #define __CASECHK __HALT(-4) #define __WITHCHK __HALT(-7) +#define __IS(tag, typ, level) (*(tag-(__BASEOFF-level))==(LONGINT)(address)typ##__typ) +#define __TYPEOF(p) ((LONGINT*)(address)(*(((LONGINT*)(p))-1))) +#define __ISP(p, typ, level) __IS(__TYPEOF(p),typ,level) + #define __GUARDP(p, typ, level) ((typ*)(__ISP(p,typ,level)?p:(__HALT(-5),p))) #define __GUARDR(r, typ, level) (*((typ*)(__IS(r##__typ,typ,level)?r:(__HALT(-5),r)))) #define __GUARDA(p, typ, level) ((struct typ*)(__IS(__TYPEOF(p),typ,level)?p:(__HALT(-5),p))) @@ -282,56 +286,52 @@ extern SYSTEM_PTR Heap_NEWBLK (address size); extern SYSTEM_PTR Heap_NEWREC (address tag); extern SYSTEM_PTR SYSTEM_NEWARR(LONGINT*, LONGINT, int, int, int, ...); -#define __SYSNEW(p, len) p = Heap_NEWBLK((LONGINT)(len)) -#define __NEW(p, t) p = Heap_NEWREC((LONGINT)(address)t##__typ) +#define __SYSNEW(p, len) p = Heap_NEWBLK((address)(len)) +#define __NEW(p, t) p = Heap_NEWREC((address)t##__typ) #define __NEWARR SYSTEM_NEWARR /* Type handling */ -extern void SYSTEM_INHERIT(LONGINT *t, LONGINT *t0); -extern void SYSTEM_ENUMP (void *adr, LONGINT n, void (*P)()); -extern void SYSTEM_ENUMR (void *adr, LONGINT *typ, LONGINT size, LONGINT n, void (*P)()); +extern void SYSTEM_INHERIT(address *t, address *t0); +extern void SYSTEM_ENUMP (void *adr, address n, void (*P)()); +extern void SYSTEM_ENUMR (void *adr, address *typ, address size, address n, void (*P)()); #define __TDESC(t, m, n) \ static struct t##__desc { \ - LONGINT tproc[m]; /* Proc for each ptr field */ \ - LONGINT tag; \ - LONGINT next; /* Module table type list points here */ \ - LONGINT level; \ - LONGINT module; \ + address tproc[m]; /* Proc for each ptr field */ \ + address tag; \ + address next; /* Module table type list points here */ \ + address level; \ + address module; \ char name[24]; \ - LONGINT basep[__MAXEXT]; /* List of bases this extends */ \ - LONGINT reserved; \ - LONGINT blksz; /* xxx_typ points here */ \ - LONGINT ptr[n+1]; /* Offsets of ptrs up to -ve sentinel */ \ + address basep[__MAXEXT]; /* List of bases this extends */ \ + address reserved; \ + address blksz; /* xxx_typ points here */ \ + address ptr[n+1]; /* Offsets of ptrs up to -ve sentinel */ \ } t##__desc #define __BASEOFF (__MAXEXT+1) // blksz as index to base. -#define __TPROC0OFF (__BASEOFF+24/sizeof(LONGINT)+5) // blksz as index to tproc IFF m=1. +#define __TPROC0OFF (__BASEOFF+24/sizeof(address)+5) // blksz as index to tproc IFF m=1. #define __EOM 1 #define __TDFLDS(name, size) {__EOM}, 1, 0, 0, 0, name, {0}, 0, size -#define __ENUMP(adr, n, P) SYSTEM_ENUMP(adr, (LONGINT)(n), P) -#define __ENUMR(adr, typ, size, n, P) SYSTEM_ENUMR(adr, typ, (LONGINT)(size), (LONGINT)(n), P) +#define __ENUMP(adr, n, P) SYSTEM_ENUMP(adr, (address)(n), P) +#define __ENUMR(adr, typ, size, n, P) SYSTEM_ENUMR(adr, typ, (address)(size), (address)(n), P) #define __INITYP(t, t0, level) \ - t##__typ = (LONGINT*)&t##__desc.blksz; \ - memcpy(t##__desc.basep, t0##__typ - __BASEOFF, level*sizeof(LONGINT)); \ - t##__desc.basep[level] = (LONGINT)(address)t##__typ; \ - t##__desc.module = (LONGINT)(address)m; \ + t##__typ = (address*)&t##__desc.blksz; \ + memcpy(t##__desc.basep, t0##__typ - __BASEOFF, level*sizeof(address)); \ + t##__desc.basep[level] = (address)t##__typ; \ + t##__desc.module = (address)m; \ if(t##__desc.blksz!=sizeof(struct t)) __HALT(-15); \ - t##__desc.blksz = (t##__desc.blksz+5*sizeof(LONGINT)-1)/(4*sizeof(LONGINT))*(4*sizeof(LONGINT)); \ - Heap_REGTYP(m, (LONGINT)(address)&t##__desc.next); \ + t##__desc.blksz = (t##__desc.blksz+5*sizeof(address)-1)/(4*sizeof(address))*(4*sizeof(address)); \ + Heap_REGTYP(m, (address)&t##__desc.next); \ SYSTEM_INHERIT(t##__typ, t0##__typ) -#define __IS(tag, typ, level) (*(tag-(__BASEOFF-level))==(LONGINT)(address)typ##__typ) -#define __TYPEOF(p) ((LONGINT*)(address)(*(((LONGINT*)(p))-1))) -#define __ISP(p, typ, level) __IS(__TYPEOF(p),typ,level) - // Oberon-2 type bound procedures support -#define __INITBP(t, proc, num) *(t##__typ-(__TPROC0OFF+num))=(LONGINT)(address)proc +#define __INITBP(t, proc, num) *(t##__typ-(__TPROC0OFF+num))=(address)proc #define __SEND(typ, num, funtyp, parlist) ((funtyp)((address)*(typ-(__TPROC0OFF+num))))parlist diff --git a/src/test/confidence/planned-binary-change b/src/test/confidence/planned-binary-change index a2fd3632..b9c5c369 100644 --- a/src/test/confidence/planned-binary-change +++ b/src/test/confidence/planned-binary-change @@ -1 +1 @@ -13 Sep 2016 20:12:45 +14 Sep 2016 13:00:54