diff --git a/bootstrap/unix-44/Configuration.c b/bootstrap/unix-44/Configuration.c index 1a0e2ffe..4ea29c15 100644 --- a/bootstrap/unix-44/Configuration.c +++ b/bootstrap/unix-44/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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/18] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/09/20] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/unix-44/Configuration.h b/bootstrap/unix-44/Configuration.h index e5d79317..6b8f5d99 100644 --- a/bootstrap/unix-44/Configuration.h +++ b/bootstrap/unix-44/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 10d0a39b..a3acbd98 100644 --- a/bootstrap/unix-44/Console.c +++ b/bootstrap/unix-44/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 e5dc1566..8f5a2a2a 100644 --- a/bootstrap/unix-44/Console.h +++ b/bootstrap/unix-44/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 6c934210..32971286 100644 --- a/bootstrap/unix-44/Files.c +++ b/bootstrap/unix-44/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 0187d33f..2dfc3018 100644 --- a/bootstrap/unix-44/Files.h +++ b/bootstrap/unix-44/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 b80b6666..08a21c58 100644 --- a/bootstrap/unix-44/Heap.c +++ b/bootstrap/unix-44/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tskSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-44/Heap.h b/bootstrap/unix-44/Heap.h index 50308888..65b6b0b1 100644 --- a/bootstrap/unix-44/Heap.h +++ b/bootstrap/unix-44/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/20] 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 142b60f4..f61acc40 100644 --- a/bootstrap/unix-44/Modules.c +++ b/bootstrap/unix-44/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 2dc36a9b..6841c244 100644 --- a/bootstrap/unix-44/Modules.h +++ b/bootstrap/unix-44/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 47f2de21..13c64396 100644 --- a/bootstrap/unix-44/OPB.c +++ b/bootstrap/unix-44/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -221,18 +221,7 @@ OPT_Node OPB_EmptySet (void) static void OPB_SetIntType (OPT_Node node) { - int16 b; - int64 n; - if (node->conval->intval >= 0) { - n = node->conval->intval; - } else { - n = -(node->conval->intval + 1); - } - b = 1; - while ((b < 8 && __ASH(n, -(__ASHL(b, 3) - 1)) != 0)) { - b += 1; - } - node->typ = OPT_IntType(b); + node->typ = OPT_IntType(OPT_IntSize(node->conval->intval)); } OPT_Node OPB_NewIntConst (int64 intval) diff --git a/bootstrap/unix-44/OPB.h b/bootstrap/unix-44/OPB.h index 08d025bf..a57ace75 100644 --- a/bootstrap/unix-44/OPB.h +++ b/bootstrap/unix-44/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 c21e44a4..9923ccbc 100644 --- a/bootstrap/unix-44/OPC.c +++ b/bootstrap/unix-44/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-44/OPC.h b/bootstrap/unix-44/OPC.h index 9e1ec652..83153512 100644 --- a/bootstrap/unix-44/OPC.h +++ b/bootstrap/unix-44/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 ba86c00a..558dde61 100644 --- a/bootstrap/unix-44/OPM.c +++ b/bootstrap/unix-44/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-44/OPM.h b/bootstrap/unix-44/OPM.h index 504519da..c5298326 100644 --- a/bootstrap/unix-44/OPM.h +++ b/bootstrap/unix-44/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 44ce8ff1..5351781f 100644 --- a/bootstrap/unix-44/OPP.c +++ b/bootstrap/unix-44/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-44/OPP.h b/bootstrap/unix-44/OPP.h index 22557b29..7cbdb873 100644 --- a/bootstrap/unix-44/OPP.h +++ b/bootstrap/unix-44/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 f80ca2b1..67bca013 100644 --- a/bootstrap/unix-44/OPS.c +++ b/bootstrap/unix-44/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 d33103c1..3f106d0c 100644 --- a/bootstrap/unix-44/OPS.h +++ b/bootstrap/unix-44/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 c7f21138..a18e6768 100644 --- a/bootstrap/unix-44/OPT.c +++ b/bootstrap/unix-44/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -139,6 +139,7 @@ export void OPT_Init (OPS_Name name, SET opt); static void OPT_InitStruct (OPT_Struct *typ, int8 form); export void OPT_Insert (OPS_Name name, OPT_Object *obj); export void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old); +export int16 OPT_IntSize (int64 n); export OPT_Struct OPT_IntType (int32 size); export OPT_Const OPT_NewConst (void); export OPT_ConstExt OPT_NewExt (void); @@ -164,6 +165,21 @@ static void OPT_err (int16 n) OPM_err(n); } +int16 OPT_IntSize (int64 n) +{ + int16 _o_result; + int16 bytes; + if (n < 0) { + n = -(n + 1); + } + bytes = 1; + while ((bytes < 8 && __ASH(n, -(__ASHL(bytes, 3) - 1)) != 0)) { + bytes += 1; + } + _o_result = bytes; + return _o_result; +} + OPT_Struct OPT_IntType (int32 size) { OPT_Struct _o_result; diff --git a/bootstrap/unix-44/OPT.h b/bootstrap/unix-44/OPT.h index b6566702..fd0a538e 100644 --- a/bootstrap/unix-44/OPT.h +++ b/bootstrap/unix-44/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h @@ -94,6 +94,7 @@ import void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done); import void OPT_Init (OPS_Name name, SET opt); import void OPT_Insert (OPS_Name name, OPT_Object *obj); import void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old); +import int16 OPT_IntSize (int64 n); import OPT_Struct OPT_IntType (int32 size); import OPT_Const OPT_NewConst (void); import OPT_ConstExt OPT_NewExt (void); diff --git a/bootstrap/unix-44/OPV.c b/bootstrap/unix-44/OPV.c index cddb737c..ffe3eb71 100644 --- a/bootstrap/unix-44/OPV.c +++ b/bootstrap/unix-44/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-44/OPV.h b/bootstrap/unix-44/OPV.h index 937f0ba6..33c1eeeb 100644 --- a/bootstrap/unix-44/OPV.h +++ b/bootstrap/unix-44/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 cdb47dd1..10d2ba41 100644 --- a/bootstrap/unix-44/Platform.c +++ b/bootstrap/unix-44/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 6e372559..57c87f55 100644 --- a/bootstrap/unix-44/Platform.h +++ b/bootstrap/unix-44/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 8b263757..6982b582 100644 --- a/bootstrap/unix-44/Reals.c +++ b/bootstrap/unix-44/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 6ff22ad6..e79f35d7 100644 --- a/bootstrap/unix-44/Reals.h +++ b/bootstrap/unix-44/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 8758a988..b2d5f19a 100644 --- a/bootstrap/unix-44/Strings.c +++ b/bootstrap/unix-44/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 36e01e6c..ea987a3e 100644 --- a/bootstrap/unix-44/Strings.h +++ b/bootstrap/unix-44/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 994ef48a..0339cbdb 100644 --- a/bootstrap/unix-44/Texts.c +++ b/bootstrap/unix-44/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -221,7 +221,7 @@ export void Texts_Write (Texts_Writer *W, LONGINT *W__typ, CHAR ch); export void Texts_WriteDate (Texts_Writer *W, LONGINT *W__typ, int32 t, int32 d); export void Texts_WriteElem (Texts_Writer *W, LONGINT *W__typ, Texts_Elem e); export void Texts_WriteHex (Texts_Writer *W, LONGINT *W__typ, int32 x); -export void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n); +export void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n); export void Texts_WriteLn (Texts_Writer *W, LONGINT *W__typ); export void Texts_WriteLongReal (Texts_Writer *W, LONGINT *W__typ, LONGREAL x, int16 n); export void Texts_WriteLongRealHex (Texts_Writer *W, LONGINT *W__typ, LONGREAL x); @@ -1050,15 +1050,15 @@ void Texts_WriteString (Texts_Writer *W, LONGINT *W__typ, CHAR *s, LONGINT s__le __DEL(s); } -void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n) +void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n) { int16 i; - int32 x0; - CHAR a[22]; + int64 x0; + CHAR a[24]; i = 0; if (x < 0) { - if (x == (-2147483647-1)) { - Texts_WriteString(&*W, W__typ, (CHAR*)" -2147483648", 13); + if (x == (-9223372036854775807-1)) { + Texts_WriteString(&*W, W__typ, (CHAR*)" -9223372036854775808", 22); return; } else { n -= 1; @@ -1068,11 +1068,11 @@ void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n) x0 = x; } do { - a[__X(i, 22)] = (CHAR)((int)__MOD(x0, 10) + 48); + a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48); x0 = __DIV(x0, 10); i += 1; } while (!(x0 == 0)); - while (n > i) { + while (n > (int64)i) { Texts_Write(&*W, W__typ, ' '); n -= 1; } @@ -1081,7 +1081,7 @@ void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n) } do { i -= 1; - Texts_Write(&*W, W__typ, a[__X(i, 22)]); + Texts_Write(&*W, W__typ, a[__X(i, 24)]); } while (!(i == 0)); } diff --git a/bootstrap/unix-44/Texts.h b/bootstrap/unix-44/Texts.h index 033c5c1a..6d3f7c1e 100644 --- a/bootstrap/unix-44/Texts.h +++ b/bootstrap/unix-44/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h @@ -158,7 +158,7 @@ import void Texts_Write (Texts_Writer *W, LONGINT *W__typ, CHAR ch); import void Texts_WriteDate (Texts_Writer *W, LONGINT *W__typ, int32 t, int32 d); import void Texts_WriteElem (Texts_Writer *W, LONGINT *W__typ, Texts_Elem e); import void Texts_WriteHex (Texts_Writer *W, LONGINT *W__typ, int32 x); -import void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n); +import void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n); import void Texts_WriteLn (Texts_Writer *W, LONGINT *W__typ); import void Texts_WriteLongReal (Texts_Writer *W, LONGINT *W__typ, LONGREAL x, int16 n); import void Texts_WriteLongRealHex (Texts_Writer *W, LONGINT *W__typ, LONGREAL x); diff --git a/bootstrap/unix-44/Vishap.c b/bootstrap/unix-44/Vishap.c index 1f322c5e..2d0b9dee 100644 --- a/bootstrap/unix-44/Vishap.c +++ b/bootstrap/unix-44/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/09/20] 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 689e3cdd..2bdf2af6 100644 --- a/bootstrap/unix-44/errors.c +++ b/bootstrap/unix-44/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 f5c1a708..b3535e92 100644 --- a/bootstrap/unix-44/errors.h +++ b/bootstrap/unix-44/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 c2339121..5245f35d 100644 --- a/bootstrap/unix-44/extTools.c +++ b/bootstrap/unix-44/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 6815aacb..414a05f0 100644 --- a/bootstrap/unix-44/extTools.h +++ b/bootstrap/unix-44/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 341502ec..4d312413 100644 --- a/bootstrap/unix-44/vt100.c +++ b/bootstrap/unix-44/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 f7615911..1ecf99b1 100644 --- a/bootstrap/unix-44/vt100.h +++ b/bootstrap/unix-44/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 1a0e2ffe..4ea29c15 100644 --- a/bootstrap/unix-48/Configuration.c +++ b/bootstrap/unix-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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/18] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/09/20] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/unix-48/Configuration.h b/bootstrap/unix-48/Configuration.h index e5d79317..6b8f5d99 100644 --- a/bootstrap/unix-48/Configuration.h +++ b/bootstrap/unix-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 10d0a39b..a3acbd98 100644 --- a/bootstrap/unix-48/Console.c +++ b/bootstrap/unix-48/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 e5dc1566..8f5a2a2a 100644 --- a/bootstrap/unix-48/Console.h +++ b/bootstrap/unix-48/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 6c934210..32971286 100644 --- a/bootstrap/unix-48/Files.c +++ b/bootstrap/unix-48/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 0187d33f..2dfc3018 100644 --- a/bootstrap/unix-48/Files.h +++ b/bootstrap/unix-48/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 b80b6666..08a21c58 100644 --- a/bootstrap/unix-48/Heap.c +++ b/bootstrap/unix-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tskSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-48/Heap.h b/bootstrap/unix-48/Heap.h index 50308888..65b6b0b1 100644 --- a/bootstrap/unix-48/Heap.h +++ b/bootstrap/unix-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/20] 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 142b60f4..f61acc40 100644 --- a/bootstrap/unix-48/Modules.c +++ b/bootstrap/unix-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 2dc36a9b..6841c244 100644 --- a/bootstrap/unix-48/Modules.h +++ b/bootstrap/unix-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 47f2de21..13c64396 100644 --- a/bootstrap/unix-48/OPB.c +++ b/bootstrap/unix-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -221,18 +221,7 @@ OPT_Node OPB_EmptySet (void) static void OPB_SetIntType (OPT_Node node) { - int16 b; - int64 n; - if (node->conval->intval >= 0) { - n = node->conval->intval; - } else { - n = -(node->conval->intval + 1); - } - b = 1; - while ((b < 8 && __ASH(n, -(__ASHL(b, 3) - 1)) != 0)) { - b += 1; - } - node->typ = OPT_IntType(b); + node->typ = OPT_IntType(OPT_IntSize(node->conval->intval)); } OPT_Node OPB_NewIntConst (int64 intval) diff --git a/bootstrap/unix-48/OPB.h b/bootstrap/unix-48/OPB.h index 08d025bf..a57ace75 100644 --- a/bootstrap/unix-48/OPB.h +++ b/bootstrap/unix-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 c21e44a4..9923ccbc 100644 --- a/bootstrap/unix-48/OPC.c +++ b/bootstrap/unix-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-48/OPC.h b/bootstrap/unix-48/OPC.h index 9e1ec652..83153512 100644 --- a/bootstrap/unix-48/OPC.h +++ b/bootstrap/unix-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 ba86c00a..558dde61 100644 --- a/bootstrap/unix-48/OPM.c +++ b/bootstrap/unix-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-48/OPM.h b/bootstrap/unix-48/OPM.h index 504519da..c5298326 100644 --- a/bootstrap/unix-48/OPM.h +++ b/bootstrap/unix-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 44ce8ff1..5351781f 100644 --- a/bootstrap/unix-48/OPP.c +++ b/bootstrap/unix-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-48/OPP.h b/bootstrap/unix-48/OPP.h index 22557b29..7cbdb873 100644 --- a/bootstrap/unix-48/OPP.h +++ b/bootstrap/unix-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 f80ca2b1..67bca013 100644 --- a/bootstrap/unix-48/OPS.c +++ b/bootstrap/unix-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 d33103c1..3f106d0c 100644 --- a/bootstrap/unix-48/OPS.h +++ b/bootstrap/unix-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 fa5401ee..c1bc93b1 100644 --- a/bootstrap/unix-48/OPT.c +++ b/bootstrap/unix-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -139,6 +139,7 @@ export void OPT_Init (OPS_Name name, SET opt); static void OPT_InitStruct (OPT_Struct *typ, int8 form); export void OPT_Insert (OPS_Name name, OPT_Object *obj); export void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old); +export int16 OPT_IntSize (int64 n); export OPT_Struct OPT_IntType (int32 size); export OPT_Const OPT_NewConst (void); export OPT_ConstExt OPT_NewExt (void); @@ -164,6 +165,21 @@ static void OPT_err (int16 n) OPM_err(n); } +int16 OPT_IntSize (int64 n) +{ + int16 _o_result; + int16 bytes; + if (n < 0) { + n = -(n + 1); + } + bytes = 1; + while ((bytes < 8 && __ASH(n, -(__ASHL(bytes, 3) - 1)) != 0)) { + bytes += 1; + } + _o_result = bytes; + return _o_result; +} + OPT_Struct OPT_IntType (int32 size) { OPT_Struct _o_result; diff --git a/bootstrap/unix-48/OPT.h b/bootstrap/unix-48/OPT.h index b6566702..fd0a538e 100644 --- a/bootstrap/unix-48/OPT.h +++ b/bootstrap/unix-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h @@ -94,6 +94,7 @@ import void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done); import void OPT_Init (OPS_Name name, SET opt); import void OPT_Insert (OPS_Name name, OPT_Object *obj); import void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old); +import int16 OPT_IntSize (int64 n); import OPT_Struct OPT_IntType (int32 size); import OPT_Const OPT_NewConst (void); import OPT_ConstExt OPT_NewExt (void); diff --git a/bootstrap/unix-48/OPV.c b/bootstrap/unix-48/OPV.c index cddb737c..ffe3eb71 100644 --- a/bootstrap/unix-48/OPV.c +++ b/bootstrap/unix-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/unix-48/OPV.h b/bootstrap/unix-48/OPV.h index 937f0ba6..33c1eeeb 100644 --- a/bootstrap/unix-48/OPV.h +++ b/bootstrap/unix-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 cdb47dd1..10d2ba41 100644 --- a/bootstrap/unix-48/Platform.c +++ b/bootstrap/unix-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 6e372559..57c87f55 100644 --- a/bootstrap/unix-48/Platform.h +++ b/bootstrap/unix-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 8b263757..6982b582 100644 --- a/bootstrap/unix-48/Reals.c +++ b/bootstrap/unix-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 6ff22ad6..e79f35d7 100644 --- a/bootstrap/unix-48/Reals.h +++ b/bootstrap/unix-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 8758a988..b2d5f19a 100644 --- a/bootstrap/unix-48/Strings.c +++ b/bootstrap/unix-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 36e01e6c..ea987a3e 100644 --- a/bootstrap/unix-48/Strings.h +++ b/bootstrap/unix-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 e14d923b..f277a856 100644 --- a/bootstrap/unix-48/Texts.c +++ b/bootstrap/unix-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -221,7 +221,7 @@ export void Texts_Write (Texts_Writer *W, LONGINT *W__typ, CHAR ch); export void Texts_WriteDate (Texts_Writer *W, LONGINT *W__typ, int32 t, int32 d); export void Texts_WriteElem (Texts_Writer *W, LONGINT *W__typ, Texts_Elem e); export void Texts_WriteHex (Texts_Writer *W, LONGINT *W__typ, int32 x); -export void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n); +export void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n); export void Texts_WriteLn (Texts_Writer *W, LONGINT *W__typ); export void Texts_WriteLongReal (Texts_Writer *W, LONGINT *W__typ, LONGREAL x, int16 n); export void Texts_WriteLongRealHex (Texts_Writer *W, LONGINT *W__typ, LONGREAL x); @@ -1050,15 +1050,15 @@ void Texts_WriteString (Texts_Writer *W, LONGINT *W__typ, CHAR *s, LONGINT s__le __DEL(s); } -void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n) +void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n) { int16 i; - int32 x0; - CHAR a[22]; + int64 x0; + CHAR a[24]; i = 0; if (x < 0) { - if (x == (-2147483647-1)) { - Texts_WriteString(&*W, W__typ, (CHAR*)" -2147483648", 13); + if (x == (-9223372036854775807-1)) { + Texts_WriteString(&*W, W__typ, (CHAR*)" -9223372036854775808", 22); return; } else { n -= 1; @@ -1068,11 +1068,11 @@ void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n) x0 = x; } do { - a[__X(i, 22)] = (CHAR)((int)__MOD(x0, 10) + 48); + a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48); x0 = __DIV(x0, 10); i += 1; } while (!(x0 == 0)); - while (n > i) { + while (n > (int64)i) { Texts_Write(&*W, W__typ, ' '); n -= 1; } @@ -1081,7 +1081,7 @@ void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n) } do { i -= 1; - Texts_Write(&*W, W__typ, a[__X(i, 22)]); + Texts_Write(&*W, W__typ, a[__X(i, 24)]); } while (!(i == 0)); } diff --git a/bootstrap/unix-48/Texts.h b/bootstrap/unix-48/Texts.h index 45ca0bb5..b2a965f8 100644 --- a/bootstrap/unix-48/Texts.h +++ b/bootstrap/unix-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h @@ -159,7 +159,7 @@ import void Texts_Write (Texts_Writer *W, LONGINT *W__typ, CHAR ch); import void Texts_WriteDate (Texts_Writer *W, LONGINT *W__typ, int32 t, int32 d); import void Texts_WriteElem (Texts_Writer *W, LONGINT *W__typ, Texts_Elem e); import void Texts_WriteHex (Texts_Writer *W, LONGINT *W__typ, int32 x); -import void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n); +import void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n); import void Texts_WriteLn (Texts_Writer *W, LONGINT *W__typ); import void Texts_WriteLongReal (Texts_Writer *W, LONGINT *W__typ, LONGREAL x, int16 n); import void Texts_WriteLongRealHex (Texts_Writer *W, LONGINT *W__typ, LONGREAL x); diff --git a/bootstrap/unix-48/Vishap.c b/bootstrap/unix-48/Vishap.c index 1f322c5e..2d0b9dee 100644 --- a/bootstrap/unix-48/Vishap.c +++ b/bootstrap/unix-48/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/09/20] 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 689e3cdd..2bdf2af6 100644 --- a/bootstrap/unix-48/errors.c +++ b/bootstrap/unix-48/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 f5c1a708..b3535e92 100644 --- a/bootstrap/unix-48/errors.h +++ b/bootstrap/unix-48/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 c2339121..5245f35d 100644 --- a/bootstrap/unix-48/extTools.c +++ b/bootstrap/unix-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 6815aacb..414a05f0 100644 --- a/bootstrap/unix-48/extTools.h +++ b/bootstrap/unix-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 341502ec..4d312413 100644 --- a/bootstrap/unix-48/vt100.c +++ b/bootstrap/unix-48/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 f7615911..1ecf99b1 100644 --- a/bootstrap/unix-48/vt100.h +++ b/bootstrap/unix-48/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 ec75a6df..a5c4087d 100644 --- a/bootstrap/unix-88/Configuration.c +++ b/bootstrap/unix-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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/18] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/09/20] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/unix-88/Configuration.h b/bootstrap/unix-88/Configuration.h index e5d79317..6b8f5d99 100644 --- a/bootstrap/unix-88/Configuration.h +++ b/bootstrap/unix-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 845cce11..dea88004 100644 --- a/bootstrap/unix-88/Console.c +++ b/bootstrap/unix-88/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 23f894db..a1322efe 100644 --- a/bootstrap/unix-88/Console.h +++ b/bootstrap/unix-88/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 2b23754f..7ace9c7c 100644 --- a/bootstrap/unix-88/Files.c +++ b/bootstrap/unix-88/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 51065265..2040560d 100644 --- a/bootstrap/unix-88/Files.h +++ b/bootstrap/unix-88/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 c99a229c..02dc0bbd 100644 --- a/bootstrap/unix-88/Heap.c +++ b/bootstrap/unix-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tskSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/unix-88/Heap.h b/bootstrap/unix-88/Heap.h index f9b4a041..aa22df29 100644 --- a/bootstrap/unix-88/Heap.h +++ b/bootstrap/unix-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/20] 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 662b84f9..60382d3c 100644 --- a/bootstrap/unix-88/Modules.c +++ b/bootstrap/unix-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 9f3d713d..4ef50204 100644 --- a/bootstrap/unix-88/Modules.h +++ b/bootstrap/unix-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 b271fa53..d94f4b29 100644 --- a/bootstrap/unix-88/OPB.c +++ b/bootstrap/unix-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -221,18 +221,7 @@ OPT_Node OPB_EmptySet (void) static void OPB_SetIntType (OPT_Node node) { - int32 b; - int64 n; - if (node->conval->intval >= 0) { - n = node->conval->intval; - } else { - n = -(node->conval->intval + 1); - } - b = 1; - while ((b < 8 && __ASH(n, -(__ASHL(b, 3) - 1)) != 0)) { - b += 1; - } - node->typ = OPT_IntType(b); + node->typ = OPT_IntType(OPT_IntSize(node->conval->intval)); } OPT_Node OPB_NewIntConst (int64 intval) diff --git a/bootstrap/unix-88/OPB.h b/bootstrap/unix-88/OPB.h index 185aa968..1330baf1 100644 --- a/bootstrap/unix-88/OPB.h +++ b/bootstrap/unix-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 689dfff4..b33dc59f 100644 --- a/bootstrap/unix-88/OPC.c +++ b/bootstrap/unix-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/unix-88/OPC.h b/bootstrap/unix-88/OPC.h index bf22de26..e749f6b6 100644 --- a/bootstrap/unix-88/OPC.h +++ b/bootstrap/unix-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 47c8a9be..39c62389 100644 --- a/bootstrap/unix-88/OPM.c +++ b/bootstrap/unix-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/unix-88/OPM.h b/bootstrap/unix-88/OPM.h index 9d977ff8..908a80ad 100644 --- a/bootstrap/unix-88/OPM.h +++ b/bootstrap/unix-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 5150cdbe..8573d6b1 100644 --- a/bootstrap/unix-88/OPP.c +++ b/bootstrap/unix-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/unix-88/OPP.h b/bootstrap/unix-88/OPP.h index 22557b29..7cbdb873 100644 --- a/bootstrap/unix-88/OPP.h +++ b/bootstrap/unix-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 7caa7493..a92e1feb 100644 --- a/bootstrap/unix-88/OPS.c +++ b/bootstrap/unix-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 6d67036e..d7c08330 100644 --- a/bootstrap/unix-88/OPS.h +++ b/bootstrap/unix-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 b588c3f1..6928030e 100644 --- a/bootstrap/unix-88/OPT.c +++ b/bootstrap/unix-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -138,6 +138,7 @@ export void OPT_Init (OPS_Name name, SET opt); static void OPT_InitStruct (OPT_Struct *typ, int8 form); export void OPT_Insert (OPS_Name name, OPT_Object *obj); export void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old); +export int32 OPT_IntSize (int64 n); export OPT_Struct OPT_IntType (int64 size); export OPT_Const OPT_NewConst (void); export OPT_ConstExt OPT_NewExt (void); @@ -163,6 +164,21 @@ static void OPT_err (int32 n) OPM_err(n); } +int32 OPT_IntSize (int64 n) +{ + int32 _o_result; + int32 bytes; + if (n < 0) { + n = -(n + 1); + } + bytes = 1; + while ((bytes < 8 && __ASH(n, -(__ASHL(bytes, 3) - 1)) != 0)) { + bytes += 1; + } + _o_result = bytes; + return _o_result; +} + OPT_Struct OPT_IntType (int64 size) { OPT_Struct _o_result; diff --git a/bootstrap/unix-88/OPT.h b/bootstrap/unix-88/OPT.h index 504e70b7..abb49dda 100644 --- a/bootstrap/unix-88/OPT.h +++ b/bootstrap/unix-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h @@ -93,6 +93,7 @@ import void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done); import void OPT_Init (OPS_Name name, SET opt); import void OPT_Insert (OPS_Name name, OPT_Object *obj); import void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old); +import int32 OPT_IntSize (int64 n); import OPT_Struct OPT_IntType (int64 size); import OPT_Const OPT_NewConst (void); import OPT_ConstExt OPT_NewExt (void); diff --git a/bootstrap/unix-88/OPV.c b/bootstrap/unix-88/OPV.c index 04c24f09..48080e50 100644 --- a/bootstrap/unix-88/OPV.c +++ b/bootstrap/unix-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/unix-88/OPV.h b/bootstrap/unix-88/OPV.h index 937f0ba6..33c1eeeb 100644 --- a/bootstrap/unix-88/OPV.h +++ b/bootstrap/unix-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 874e4d6d..55230bcc 100644 --- a/bootstrap/unix-88/Platform.c +++ b/bootstrap/unix-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 86dbc3cb..d5e89ca2 100644 --- a/bootstrap/unix-88/Platform.h +++ b/bootstrap/unix-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 08445989..e81db820 100644 --- a/bootstrap/unix-88/Reals.c +++ b/bootstrap/unix-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 44e13bae..dec142cf 100644 --- a/bootstrap/unix-88/Reals.h +++ b/bootstrap/unix-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 ad3ef185..6aa3846a 100644 --- a/bootstrap/unix-88/Strings.c +++ b/bootstrap/unix-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 23e3adb8..d1c9f056 100644 --- a/bootstrap/unix-88/Strings.h +++ b/bootstrap/unix-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 5a607fdd..37fac00b 100644 --- a/bootstrap/unix-88/Texts.c +++ b/bootstrap/unix-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -1054,7 +1054,7 @@ void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n) { int32 i; int64 x0; - CHAR a[22]; + CHAR a[24]; i = 0; if (x < 0) { if (x == (-9223372036854775807-1)) { @@ -1068,7 +1068,7 @@ void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n) x0 = x; } do { - a[__X(i, 22)] = (CHAR)(__MOD(x0, 10) + 48); + a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48); x0 = __DIV(x0, 10); i += 1; } while (!(x0 == 0)); @@ -1081,7 +1081,7 @@ void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n) } do { i -= 1; - Texts_Write(&*W, W__typ, a[__X(i, 22)]); + Texts_Write(&*W, W__typ, a[__X(i, 24)]); } while (!(i == 0)); } diff --git a/bootstrap/unix-88/Texts.h b/bootstrap/unix-88/Texts.h index f18817ff..0f195ce8 100644 --- a/bootstrap/unix-88/Texts.h +++ b/bootstrap/unix-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 1bc7e5ed..00f0ac1a 100644 --- a/bootstrap/unix-88/Vishap.c +++ b/bootstrap/unix-88/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/09/20] 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 8d3792df..8396896b 100644 --- a/bootstrap/unix-88/errors.c +++ b/bootstrap/unix-88/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 f5c1a708..b3535e92 100644 --- a/bootstrap/unix-88/errors.h +++ b/bootstrap/unix-88/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 d7c28163..a4fbedda 100644 --- a/bootstrap/unix-88/extTools.c +++ b/bootstrap/unix-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 6815aacb..414a05f0 100644 --- a/bootstrap/unix-88/extTools.h +++ b/bootstrap/unix-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 a575d688..04503b55 100644 --- a/bootstrap/unix-88/vt100.c +++ b/bootstrap/unix-88/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 f0786605..c27f0ae1 100644 --- a/bootstrap/unix-88/vt100.h +++ b/bootstrap/unix-88/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 1a0e2ffe..4ea29c15 100644 --- a/bootstrap/windows-48/Configuration.c +++ b/bootstrap/windows-48/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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/18] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/09/20] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/windows-48/Configuration.h b/bootstrap/windows-48/Configuration.h index e5d79317..6b8f5d99 100644 --- a/bootstrap/windows-48/Configuration.h +++ b/bootstrap/windows-48/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 ebbcbb49..6409cfb5 100644 --- a/bootstrap/windows-48/Console.c +++ b/bootstrap/windows-48/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 e5dc1566..8f5a2a2a 100644 --- a/bootstrap/windows-48/Console.h +++ b/bootstrap/windows-48/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 25e50dd9..d55dffcd 100644 --- a/bootstrap/windows-48/Files.c +++ b/bootstrap/windows-48/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 b499ee0a..8b2d7bab 100644 --- a/bootstrap/windows-48/Files.h +++ b/bootstrap/windows-48/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 b80b6666..08a21c58 100644 --- a/bootstrap/windows-48/Heap.c +++ b/bootstrap/windows-48/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tskSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/windows-48/Heap.h b/bootstrap/windows-48/Heap.h index 50308888..65b6b0b1 100644 --- a/bootstrap/windows-48/Heap.h +++ b/bootstrap/windows-48/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/20] 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 142b60f4..f61acc40 100644 --- a/bootstrap/windows-48/Modules.c +++ b/bootstrap/windows-48/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 2dc36a9b..6841c244 100644 --- a/bootstrap/windows-48/Modules.h +++ b/bootstrap/windows-48/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 47f2de21..13c64396 100644 --- a/bootstrap/windows-48/OPB.c +++ b/bootstrap/windows-48/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -221,18 +221,7 @@ OPT_Node OPB_EmptySet (void) static void OPB_SetIntType (OPT_Node node) { - int16 b; - int64 n; - if (node->conval->intval >= 0) { - n = node->conval->intval; - } else { - n = -(node->conval->intval + 1); - } - b = 1; - while ((b < 8 && __ASH(n, -(__ASHL(b, 3) - 1)) != 0)) { - b += 1; - } - node->typ = OPT_IntType(b); + node->typ = OPT_IntType(OPT_IntSize(node->conval->intval)); } OPT_Node OPB_NewIntConst (int64 intval) diff --git a/bootstrap/windows-48/OPB.h b/bootstrap/windows-48/OPB.h index 08d025bf..a57ace75 100644 --- a/bootstrap/windows-48/OPB.h +++ b/bootstrap/windows-48/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 c21e44a4..9923ccbc 100644 --- a/bootstrap/windows-48/OPC.c +++ b/bootstrap/windows-48/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/windows-48/OPC.h b/bootstrap/windows-48/OPC.h index 9e1ec652..83153512 100644 --- a/bootstrap/windows-48/OPC.h +++ b/bootstrap/windows-48/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 ba86c00a..558dde61 100644 --- a/bootstrap/windows-48/OPM.c +++ b/bootstrap/windows-48/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/windows-48/OPM.h b/bootstrap/windows-48/OPM.h index 504519da..c5298326 100644 --- a/bootstrap/windows-48/OPM.h +++ b/bootstrap/windows-48/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 44ce8ff1..5351781f 100644 --- a/bootstrap/windows-48/OPP.c +++ b/bootstrap/windows-48/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/windows-48/OPP.h b/bootstrap/windows-48/OPP.h index 22557b29..7cbdb873 100644 --- a/bootstrap/windows-48/OPP.h +++ b/bootstrap/windows-48/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 f80ca2b1..67bca013 100644 --- a/bootstrap/windows-48/OPS.c +++ b/bootstrap/windows-48/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 d33103c1..3f106d0c 100644 --- a/bootstrap/windows-48/OPS.h +++ b/bootstrap/windows-48/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 fa5401ee..c1bc93b1 100644 --- a/bootstrap/windows-48/OPT.c +++ b/bootstrap/windows-48/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -139,6 +139,7 @@ export void OPT_Init (OPS_Name name, SET opt); static void OPT_InitStruct (OPT_Struct *typ, int8 form); export void OPT_Insert (OPS_Name name, OPT_Object *obj); export void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old); +export int16 OPT_IntSize (int64 n); export OPT_Struct OPT_IntType (int32 size); export OPT_Const OPT_NewConst (void); export OPT_ConstExt OPT_NewExt (void); @@ -164,6 +165,21 @@ static void OPT_err (int16 n) OPM_err(n); } +int16 OPT_IntSize (int64 n) +{ + int16 _o_result; + int16 bytes; + if (n < 0) { + n = -(n + 1); + } + bytes = 1; + while ((bytes < 8 && __ASH(n, -(__ASHL(bytes, 3) - 1)) != 0)) { + bytes += 1; + } + _o_result = bytes; + return _o_result; +} + OPT_Struct OPT_IntType (int32 size) { OPT_Struct _o_result; diff --git a/bootstrap/windows-48/OPT.h b/bootstrap/windows-48/OPT.h index b6566702..fd0a538e 100644 --- a/bootstrap/windows-48/OPT.h +++ b/bootstrap/windows-48/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h @@ -94,6 +94,7 @@ import void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done); import void OPT_Init (OPS_Name name, SET opt); import void OPT_Insert (OPS_Name name, OPT_Object *obj); import void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old); +import int16 OPT_IntSize (int64 n); import OPT_Struct OPT_IntType (int32 size); import OPT_Const OPT_NewConst (void); import OPT_ConstExt OPT_NewExt (void); diff --git a/bootstrap/windows-48/OPV.c b/bootstrap/windows-48/OPV.c index cddb737c..ffe3eb71 100644 --- a/bootstrap/windows-48/OPV.c +++ b/bootstrap/windows-48/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 diff --git a/bootstrap/windows-48/OPV.h b/bootstrap/windows-48/OPV.h index 937f0ba6..33c1eeeb 100644 --- a/bootstrap/windows-48/OPV.h +++ b/bootstrap/windows-48/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 614e2cb6..35849e85 100644 --- a/bootstrap/windows-48/Platform.c +++ b/bootstrap/windows-48/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 cfea54a7..84dc9bd1 100644 --- a/bootstrap/windows-48/Platform.h +++ b/bootstrap/windows-48/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 8b263757..6982b582 100644 --- a/bootstrap/windows-48/Reals.c +++ b/bootstrap/windows-48/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 6ff22ad6..e79f35d7 100644 --- a/bootstrap/windows-48/Reals.h +++ b/bootstrap/windows-48/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 8758a988..b2d5f19a 100644 --- a/bootstrap/windows-48/Strings.c +++ b/bootstrap/windows-48/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 36e01e6c..ea987a3e 100644 --- a/bootstrap/windows-48/Strings.h +++ b/bootstrap/windows-48/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 e14d923b..f277a856 100644 --- a/bootstrap/windows-48/Texts.c +++ b/bootstrap/windows-48/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int16 #define LONGINT int32 @@ -221,7 +221,7 @@ export void Texts_Write (Texts_Writer *W, LONGINT *W__typ, CHAR ch); export void Texts_WriteDate (Texts_Writer *W, LONGINT *W__typ, int32 t, int32 d); export void Texts_WriteElem (Texts_Writer *W, LONGINT *W__typ, Texts_Elem e); export void Texts_WriteHex (Texts_Writer *W, LONGINT *W__typ, int32 x); -export void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n); +export void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n); export void Texts_WriteLn (Texts_Writer *W, LONGINT *W__typ); export void Texts_WriteLongReal (Texts_Writer *W, LONGINT *W__typ, LONGREAL x, int16 n); export void Texts_WriteLongRealHex (Texts_Writer *W, LONGINT *W__typ, LONGREAL x); @@ -1050,15 +1050,15 @@ void Texts_WriteString (Texts_Writer *W, LONGINT *W__typ, CHAR *s, LONGINT s__le __DEL(s); } -void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n) +void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n) { int16 i; - int32 x0; - CHAR a[22]; + int64 x0; + CHAR a[24]; i = 0; if (x < 0) { - if (x == (-2147483647-1)) { - Texts_WriteString(&*W, W__typ, (CHAR*)" -2147483648", 13); + if (x == (-9223372036854775807-1)) { + Texts_WriteString(&*W, W__typ, (CHAR*)" -9223372036854775808", 22); return; } else { n -= 1; @@ -1068,11 +1068,11 @@ void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n) x0 = x; } do { - a[__X(i, 22)] = (CHAR)((int)__MOD(x0, 10) + 48); + a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48); x0 = __DIV(x0, 10); i += 1; } while (!(x0 == 0)); - while (n > i) { + while (n > (int64)i) { Texts_Write(&*W, W__typ, ' '); n -= 1; } @@ -1081,7 +1081,7 @@ void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n) } do { i -= 1; - Texts_Write(&*W, W__typ, a[__X(i, 22)]); + Texts_Write(&*W, W__typ, a[__X(i, 24)]); } while (!(i == 0)); } diff --git a/bootstrap/windows-48/Texts.h b/bootstrap/windows-48/Texts.h index 45ca0bb5..b2a965f8 100644 --- a/bootstrap/windows-48/Texts.h +++ b/bootstrap/windows-48/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #ifndef Texts__h #define Texts__h @@ -159,7 +159,7 @@ import void Texts_Write (Texts_Writer *W, LONGINT *W__typ, CHAR ch); import void Texts_WriteDate (Texts_Writer *W, LONGINT *W__typ, int32 t, int32 d); import void Texts_WriteElem (Texts_Writer *W, LONGINT *W__typ, Texts_Elem e); import void Texts_WriteHex (Texts_Writer *W, LONGINT *W__typ, int32 x); -import void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int32 x, int32 n); +import void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n); import void Texts_WriteLn (Texts_Writer *W, LONGINT *W__typ); import void Texts_WriteLongReal (Texts_Writer *W, LONGINT *W__typ, LONGREAL x, int16 n); import void Texts_WriteLongRealHex (Texts_Writer *W, LONGINT *W__typ, LONGREAL x); diff --git a/bootstrap/windows-48/Vishap.c b/bootstrap/windows-48/Vishap.c index 1f322c5e..2d0b9dee 100644 --- a/bootstrap/windows-48/Vishap.c +++ b/bootstrap/windows-48/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/09/20] 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 689e3cdd..2bdf2af6 100644 --- a/bootstrap/windows-48/errors.c +++ b/bootstrap/windows-48/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 f5c1a708..b3535e92 100644 --- a/bootstrap/windows-48/errors.h +++ b/bootstrap/windows-48/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 c2339121..5245f35d 100644 --- a/bootstrap/windows-48/extTools.c +++ b/bootstrap/windows-48/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 6815aacb..414a05f0 100644 --- a/bootstrap/windows-48/extTools.h +++ b/bootstrap/windows-48/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 341502ec..4d312413 100644 --- a/bootstrap/windows-48/vt100.c +++ b/bootstrap/windows-48/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 f7615911..1ecf99b1 100644 --- a/bootstrap/windows-48/vt100.h +++ b/bootstrap/windows-48/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 ec75a6df..a5c4087d 100644 --- a/bootstrap/windows-88/Configuration.c +++ b/bootstrap/windows-88/Configuration.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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/18] for gcc LP64 on cygwin", Configuration_versionLong, 41); + __MOVE("1.95 [2016/09/20] for gcc LP64 on cygwin", Configuration_versionLong, 41); __ENDMOD; } diff --git a/bootstrap/windows-88/Configuration.h b/bootstrap/windows-88/Configuration.h index e5d79317..6b8f5d99 100644 --- a/bootstrap/windows-88/Configuration.h +++ b/bootstrap/windows-88/Configuration.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 1f28b96d..a18275f8 100644 --- a/bootstrap/windows-88/Console.c +++ b/bootstrap/windows-88/Console.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 23f894db..a1322efe 100644 --- a/bootstrap/windows-88/Console.h +++ b/bootstrap/windows-88/Console.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 d94e42ad..ead58244 100644 --- a/bootstrap/windows-88/Files.c +++ b/bootstrap/windows-88/Files.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 9ea6ac78..94cf47a0 100644 --- a/bootstrap/windows-88/Files.h +++ b/bootstrap/windows-88/Files.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 c99a229c..02dc0bbd 100644 --- a/bootstrap/windows-88/Heap.c +++ b/bootstrap/windows-88/Heap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin tskSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/windows-88/Heap.h b/bootstrap/windows-88/Heap.h index f9b4a041..aa22df29 100644 --- a/bootstrap/windows-88/Heap.h +++ b/bootstrap/windows-88/Heap.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tskSfF */ +/* voc 1.95 [2016/09/20] 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 662b84f9..60382d3c 100644 --- a/bootstrap/windows-88/Modules.c +++ b/bootstrap/windows-88/Modules.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 9f3d713d..4ef50204 100644 --- a/bootstrap/windows-88/Modules.h +++ b/bootstrap/windows-88/Modules.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 b271fa53..d94f4b29 100644 --- a/bootstrap/windows-88/OPB.c +++ b/bootstrap/windows-88/OPB.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -221,18 +221,7 @@ OPT_Node OPB_EmptySet (void) static void OPB_SetIntType (OPT_Node node) { - int32 b; - int64 n; - if (node->conval->intval >= 0) { - n = node->conval->intval; - } else { - n = -(node->conval->intval + 1); - } - b = 1; - while ((b < 8 && __ASH(n, -(__ASHL(b, 3) - 1)) != 0)) { - b += 1; - } - node->typ = OPT_IntType(b); + node->typ = OPT_IntType(OPT_IntSize(node->conval->intval)); } OPT_Node OPB_NewIntConst (int64 intval) diff --git a/bootstrap/windows-88/OPB.h b/bootstrap/windows-88/OPB.h index 185aa968..1330baf1 100644 --- a/bootstrap/windows-88/OPB.h +++ b/bootstrap/windows-88/OPB.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 689dfff4..b33dc59f 100644 --- a/bootstrap/windows-88/OPC.c +++ b/bootstrap/windows-88/OPC.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/windows-88/OPC.h b/bootstrap/windows-88/OPC.h index bf22de26..e749f6b6 100644 --- a/bootstrap/windows-88/OPC.h +++ b/bootstrap/windows-88/OPC.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 47c8a9be..39c62389 100644 --- a/bootstrap/windows-88/OPM.c +++ b/bootstrap/windows-88/OPM.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/windows-88/OPM.h b/bootstrap/windows-88/OPM.h index 9d977ff8..908a80ad 100644 --- a/bootstrap/windows-88/OPM.h +++ b/bootstrap/windows-88/OPM.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 5150cdbe..8573d6b1 100644 --- a/bootstrap/windows-88/OPP.c +++ b/bootstrap/windows-88/OPP.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/windows-88/OPP.h b/bootstrap/windows-88/OPP.h index 22557b29..7cbdb873 100644 --- a/bootstrap/windows-88/OPP.h +++ b/bootstrap/windows-88/OPP.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 7caa7493..a92e1feb 100644 --- a/bootstrap/windows-88/OPS.c +++ b/bootstrap/windows-88/OPS.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 6d67036e..d7c08330 100644 --- a/bootstrap/windows-88/OPS.h +++ b/bootstrap/windows-88/OPS.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin tspkaSfF */ +/* voc 1.95 [2016/09/20] 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 b588c3f1..6928030e 100644 --- a/bootstrap/windows-88/OPT.c +++ b/bootstrap/windows-88/OPT.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -138,6 +138,7 @@ export void OPT_Init (OPS_Name name, SET opt); static void OPT_InitStruct (OPT_Struct *typ, int8 form); export void OPT_Insert (OPS_Name name, OPT_Object *obj); export void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old); +export int32 OPT_IntSize (int64 n); export OPT_Struct OPT_IntType (int64 size); export OPT_Const OPT_NewConst (void); export OPT_ConstExt OPT_NewExt (void); @@ -163,6 +164,21 @@ static void OPT_err (int32 n) OPM_err(n); } +int32 OPT_IntSize (int64 n) +{ + int32 _o_result; + int32 bytes; + if (n < 0) { + n = -(n + 1); + } + bytes = 1; + while ((bytes < 8 && __ASH(n, -(__ASHL(bytes, 3) - 1)) != 0)) { + bytes += 1; + } + _o_result = bytes; + return _o_result; +} + OPT_Struct OPT_IntType (int64 size) { OPT_Struct _o_result; diff --git a/bootstrap/windows-88/OPT.h b/bootstrap/windows-88/OPT.h index 504e70b7..abb49dda 100644 --- a/bootstrap/windows-88/OPT.h +++ b/bootstrap/windows-88/OPT.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #ifndef OPT__h #define OPT__h @@ -93,6 +93,7 @@ import void OPT_Import (OPS_Name aliasName, OPS_Name name, BOOLEAN *done); import void OPT_Init (OPS_Name name, SET opt); import void OPT_Insert (OPS_Name name, OPT_Object *obj); import void OPT_InsertImport (OPT_Object obj, OPT_Object *root, OPT_Object *old); +import int32 OPT_IntSize (int64 n); import OPT_Struct OPT_IntType (int64 size); import OPT_Const OPT_NewConst (void); import OPT_ConstExt OPT_NewExt (void); diff --git a/bootstrap/windows-88/OPV.c b/bootstrap/windows-88/OPV.c index 04c24f09..48080e50 100644 --- a/bootstrap/windows-88/OPV.c +++ b/bootstrap/windows-88/OPV.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 diff --git a/bootstrap/windows-88/OPV.h b/bootstrap/windows-88/OPV.h index 937f0ba6..33c1eeeb 100644 --- a/bootstrap/windows-88/OPV.h +++ b/bootstrap/windows-88/OPV.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 5af3b5f2..a576c90e 100644 --- a/bootstrap/windows-88/Platform.c +++ b/bootstrap/windows-88/Platform.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 a94b93a8..7832ec0f 100644 --- a/bootstrap/windows-88/Platform.h +++ b/bootstrap/windows-88/Platform.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 08445989..e81db820 100644 --- a/bootstrap/windows-88/Reals.c +++ b/bootstrap/windows-88/Reals.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 44e13bae..dec142cf 100644 --- a/bootstrap/windows-88/Reals.h +++ b/bootstrap/windows-88/Reals.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 ad3ef185..6aa3846a 100644 --- a/bootstrap/windows-88/Strings.c +++ b/bootstrap/windows-88/Strings.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 23e3adb8..d1c9f056 100644 --- a/bootstrap/windows-88/Strings.h +++ b/bootstrap/windows-88/Strings.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 5a607fdd..37fac00b 100644 --- a/bootstrap/windows-88/Texts.c +++ b/bootstrap/windows-88/Texts.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #define INTEGER int32 #define LONGINT int64 @@ -1054,7 +1054,7 @@ void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n) { int32 i; int64 x0; - CHAR a[22]; + CHAR a[24]; i = 0; if (x < 0) { if (x == (-9223372036854775807-1)) { @@ -1068,7 +1068,7 @@ void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n) x0 = x; } do { - a[__X(i, 22)] = (CHAR)(__MOD(x0, 10) + 48); + a[__X(i, 24)] = (CHAR)(__MOD(x0, 10) + 48); x0 = __DIV(x0, 10); i += 1; } while (!(x0 == 0)); @@ -1081,7 +1081,7 @@ void Texts_WriteInt (Texts_Writer *W, LONGINT *W__typ, int64 x, int64 n) } do { i -= 1; - Texts_Write(&*W, W__typ, a[__X(i, 22)]); + Texts_Write(&*W, W__typ, a[__X(i, 24)]); } while (!(i == 0)); } diff --git a/bootstrap/windows-88/Texts.h b/bootstrap/windows-88/Texts.h index f18817ff..0f195ce8 100644 --- a/bootstrap/windows-88/Texts.h +++ b/bootstrap/windows-88/Texts.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 1bc7e5ed..00f0ac1a 100644 --- a/bootstrap/windows-88/Vishap.c +++ b/bootstrap/windows-88/Vishap.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkamSf */ +/* voc 1.95 [2016/09/20] 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 8d3792df..8396896b 100644 --- a/bootstrap/windows-88/errors.c +++ b/bootstrap/windows-88/errors.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 f5c1a708..b3535e92 100644 --- a/bootstrap/windows-88/errors.h +++ b/bootstrap/windows-88/errors.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 d7c28163..a4fbedda 100644 --- a/bootstrap/windows-88/extTools.c +++ b/bootstrap/windows-88/extTools.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 6815aacb..414a05f0 100644 --- a/bootstrap/windows-88/extTools.h +++ b/bootstrap/windows-88/extTools.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 a575d688..04503b55 100644 --- a/bootstrap/windows-88/vt100.c +++ b/bootstrap/windows-88/vt100.c @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] 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 f0786605..c27f0ae1 100644 --- a/bootstrap/windows-88/vt100.h +++ b/bootstrap/windows-88/vt100.h @@ -1,4 +1,4 @@ -/* voc 1.95 [2016/09/18] for gcc LP64 on cygwin xtspkaSfF */ +/* voc 1.95 [2016/09/20] for gcc LP64 on cygwin xtspkaSfF */ #ifndef vt100__h #define vt100__h diff --git a/src/compiler/OPB.Mod b/src/compiler/OPB.Mod index 09805f14..79c81b1c 100644 --- a/src/compiler/OPB.Mod +++ b/src/compiler/OPB.Mod @@ -105,12 +105,7 @@ MODULE OPB; (* RC 6.3.89 / 21.2.94 *) (* object model 17.1.93 *) END EmptySet; PROCEDURE SetIntType(node: OPT.Node); - VAR b: INTEGER; n: SYSTEM.INT64; - BEGIN - (* Determine number of bytes required to represent constant value *) - IF node.conval.intval >= 0 THEN n := node.conval.intval ELSE n := -(node.conval.intval+1) END; - b := 1; WHILE (b < 8) & (ASH(n, -(8*b-1)) # 0) DO INC(b) END; - node.typ := OPT.IntType(b) + BEGIN node.typ := OPT.IntType(OPT.IntSize(node.conval.intval)) END SetIntType; PROCEDURE NewIntConst*(intval: SYSTEM.INT64): OPT.Node; diff --git a/src/compiler/OPT.Mod b/src/compiler/OPT.Mod index c4b30065..7d67c2b5 100644 --- a/src/compiler/OPT.Mod +++ b/src/compiler/OPT.Mod @@ -212,6 +212,14 @@ VAR PROCEDURE err(n: INTEGER); BEGIN OPM.err(n) END err; +PROCEDURE IntSize*(n: SYSTEM.INT64):INTEGER; +(* Determines number of bytes required to store signed value n. *) + VAR bytes: INTEGER; +BEGIN + IF n < 0 THEN n := -(n+1) END; + bytes := 1; WHILE (bytes < 8) & (ASH(n, -(8*bytes-1)) # 0) DO INC(bytes) END; + RETURN bytes +END IntSize; PROCEDURE IntType*(size: LONGINT): Struct; (* Selects smallest standard integer type for given size in bytes *) diff --git a/src/library/s3/ethMD5.Mod b/src/library/s3/ethMD5.Mod index 32c31bd8..07a605cb 100644 --- a/src/library/s3/ethMD5.Mod +++ b/src/library/s3/ethMD5.Mod @@ -4,6 +4,8 @@ Refer to the "General ETH Oberon System Source License" contract available at: h MODULE ethMD5; (** portable *) (* ejz *) IMPORT SYSTEM; +(* todo. Use fixed size integers and sets. *) + (** The MD5 Message-Digest Algorithm (RFC1321) The algorithm takes as input a message of arbitrary length and produces @@ -29,10 +31,10 @@ under a public-key cryptosystem such as RSA. *) VAR cont: Context; BEGIN NEW(cont); - cont.buf[0] := 067452301H; - cont.buf[1] := 0EFCDAB89H; - cont.buf[2] := 098BADCFEH; - cont.buf[3] := 010325476H; + cont.buf[0] := 00000000067452301H; + cont.buf[1] := 0FFFFFFFFEFCDAB89H; + cont.buf[2] := 0FFFFFFFF98BADCFEH; + cont.buf[3] := 00000000010325476H; cont.bits := 0; RETURN cont END New; @@ -107,73 +109,73 @@ under a public-key cryptosystem such as RSA. *) BEGIN a := buf[0]; b := buf[1]; c := buf[2]; d := buf[3]; - STEP1(a, b, c, d, in[0]+0D76AA478H, 7); - STEP1(d, a, b, c, in[1]+0E8C7B756H, 12); - STEP1(c, d, a, b, in[2]+0242070DBH, 17); - STEP1(b, c, d, a, in[3]+0C1BDCEEEH, 22); - STEP1(a, b, c, d, in[4]+0F57C0FAFH, 7); - STEP1(d, a, b, c, in[5]+04787C62AH, 12); - STEP1(c, d, a, b, in[6]+0A8304613H, 17); - STEP1(b, c, d, a, in[7]+0FD469501H, 22); - STEP1(a, b, c, d, in[8]+0698098D8H, 7); - STEP1(d, a, b, c, in[9]+08B44F7AFH, 12); - STEP1(c, d, a, b, in[10]+0FFFF5BB1H, 17); - STEP1(b, c, d, a, in[11]+0895CD7BEH, 22); - STEP1(a, b, c, d, in[12]+06B901122H, 7); - STEP1(d, a, b, c, in[13]+0FD987193H, 12); - STEP1(c, d, a, b, in[14]+0A679438EH, 17); - STEP1(b, c, d, a, in[15]+049B40821H, 22); + STEP1(a, b, c, d, in[0] + 0FFFFFFFFD76AA478H, 7); + STEP1(d, a, b, c, in[1] + 0FFFFFFFFE8C7B756H, 12); + STEP1(c, d, a, b, in[2] + 000000000242070DBH, 17); + STEP1(b, c, d, a, in[3] + 0FFFFFFFFC1BDCEEEH, 22); + STEP1(a, b, c, d, in[4] + 0FFFFFFFFF57C0FAFH, 7); + STEP1(d, a, b, c, in[5] + 0000000004787C62AH, 12); + STEP1(c, d, a, b, in[6] + 0FFFFFFFFA8304613H, 17); + STEP1(b, c, d, a, in[7] + 0FFFFFFFFFD469501H, 22); + STEP1(a, b, c, d, in[8] + 000000000698098D8H, 7); + STEP1(d, a, b, c, in[9] + 0FFFFFFFF8B44F7AFH, 12); + STEP1(c, d, a, b, in[10] + 0FFFFFFFFFFFF5BB1H, 17); + STEP1(b, c, d, a, in[11] + 0FFFFFFFF895CD7BEH, 22); + STEP1(a, b, c, d, in[12] + 0000000006B901122H, 7); + STEP1(d, a, b, c, in[13] + 0FFFFFFFFFD987193H, 12); + STEP1(c, d, a, b, in[14] + 0FFFFFFFFA679438EH, 17); + STEP1(b, c, d, a, in[15] + 00000000049B40821H, 22); - STEP2(a, b, c, d, in[1]+0F61E2562H, 5); - STEP2(d, a, b, c, in[6]+0C040B340H, 9); - STEP2(c, d, a, b, in[11]+0265E5A51H, 14); - STEP2(b, c, d, a, in[0]+0E9B6C7AAH, 20); - STEP2(a, b, c, d, in[5]+0D62F105DH, 5); - STEP2(d, a, b, c, in[10]+02441453H, 9); - STEP2(c, d, a, b, in[15]+0D8A1E681H, 14); - STEP2(b, c, d, a, in[4]+0E7D3FBC8H, 20); - STEP2(a, b, c, d, in[9]+021E1CDE6H, 5); - STEP2(d, a, b, c, in[14]+0C33707D6H, 9); - STEP2(c, d, a, b, in[3]+0F4D50D87H, 14); - STEP2(b, c, d, a, in[8]+0455A14EDH, 20); - STEP2(a, b, c, d, in[13]+0A9E3E905H, 5); - STEP2(d, a, b, c, in[2]+0FCEFA3F8H, 9); - STEP2(c, d, a, b, in[7]+0676F02D9H, 14); - STEP2(b, c, d, a, in[12]+08D2A4C8AH, 20); + STEP2(a, b, c, d, in[1] + 0FFFFFFFFF61E2562H, 5); + STEP2(d, a, b, c, in[6] + 0FFFFFFFFC040B340H, 9); + STEP2(c, d, a, b, in[11] + 000000000265E5A51H, 14); + STEP2(b, c, d, a, in[0] + 0FFFFFFFFE9B6C7AAH, 20); + STEP2(a, b, c, d, in[5] + 0FFFFFFFFD62F105DH, 5); + STEP2(d, a, b, c, in[10] + 00000000002441453H, 9); + STEP2(c, d, a, b, in[15] + 0FFFFFFFFD8A1E681H, 14); + STEP2(b, c, d, a, in[4] + 0FFFFFFFFE7D3FBC8H, 20); + STEP2(a, b, c, d, in[9] + 00000000021E1CDE6H, 5); + STEP2(d, a, b, c, in[14] + 0FFFFFFFFC33707D6H, 9); + STEP2(c, d, a, b, in[3] + 0FFFFFFFFF4D50D87H, 14); + STEP2(b, c, d, a, in[8] + 000000000455A14EDH, 20); + STEP2(a, b, c, d, in[13] + 0FFFFFFFFA9E3E905H, 5); + STEP2(d, a, b, c, in[2] + 0FFFFFFFFFCEFA3F8H, 9); + STEP2(c, d, a, b, in[7] + 000000000676F02D9H, 14); + STEP2(b, c, d, a, in[12] + 0FFFFFFFF8D2A4C8AH, 20); - STEP3(a, b, c, d, in[5]+0FFFA3942H, 4); - STEP3(d, a, b, c, in[8]+08771F681H, 11); - STEP3(c, d, a, b, in[11]+06D9D6122H, 16); - STEP3(b, c, d, a, in[14]+0FDE5380CH, 23); - STEP3(a, b, c, d, in[1]+0A4BEEA44H, 4); - STEP3(d, a, b, c, in[4]+04BDECFA9H, 11); - STEP3(c, d, a, b, in[7]+0F6BB4B60H, 16); - STEP3(b, c, d, a, in[10]+0BEBFBC70H, 23); - STEP3(a, b, c, d, in[13]+0289B7EC6H, 4); - STEP3(d, a, b, c, in[0]+0EAA127FAH, 11); - STEP3(c, d, a, b, in[3]+0D4EF3085H, 16); - STEP3(b, c, d, a, in[6]+04881D05H, 23); - STEP3(a, b, c, d, in[9]+0D9D4D039H, 4); - STEP3(d, a, b, c, in[12]+0E6DB99E5H, 11); - STEP3(c, d, a, b, in[15]+01FA27CF8H, 16); - STEP3(b, c, d, a, in[2]+0C4AC5665H, 23); + STEP3(a, b, c, d, in[5] + 0FFFFFFFFFFFA3942H, 4); + STEP3(d, a, b, c, in[8] + 0FFFFFFFF8771F681H, 11); + STEP3(c, d, a, b, in[11] + 0000000006D9D6122H, 16); + STEP3(b, c, d, a, in[14] + 0FFFFFFFFFDE5380CH, 23); + STEP3(a, b, c, d, in[1] + 0FFFFFFFFA4BEEA44H, 4); + STEP3(d, a, b, c, in[4] + 0000000004BDECFA9H, 11); + STEP3(c, d, a, b, in[7] + 0FFFFFFFFF6BB4B60H, 16); + STEP3(b, c, d, a, in[10] + 0FFFFFFFFBEBFBC70H, 23); + STEP3(a, b, c, d, in[13] + 000000000289B7EC6H, 4); + STEP3(d, a, b, c, in[0] + 0FFFFFFFFEAA127FAH, 11); + STEP3(c, d, a, b, in[3] + 0FFFFFFFFD4EF3085H, 16); + STEP3(b, c, d, a, in[6] + 00000000004881D05H, 23); + STEP3(a, b, c, d, in[9] + 0FFFFFFFFD9D4D039H, 4); + STEP3(d, a, b, c, in[12] + 0FFFFFFFFE6DB99E5H, 11); + STEP3(c, d, a, b, in[15] + 0000000001FA27CF8H, 16); + STEP3(b, c, d, a, in[2] + 0FFFFFFFFC4AC5665H, 23); - STEP4(a, b, c, d, in[0]+0F4292244H, 6); - STEP4(d, a, b, c, in[7]+0432AFF97H, 10); - STEP4(c, d, a, b, in[14]+0AB9423A7H, 15); - STEP4(b, c, d, a, in[5]+0FC93A039H, 21); - STEP4(a, b, c, d, in[12]+0655B59C3H, 6); - STEP4(d, a, b, c, in[3]+08F0CCC92H, 10); - STEP4(c, d, a, b, in[10]+0FFEFF47DH, 15); - STEP4(b, c, d, a, in[1]+085845DD1H, 21); - STEP4(a, b, c, d, in[8]+06FA87E4FH, 6); - STEP4(d, a, b, c, in[15]+0FE2CE6E0H, 10); - STEP4(c, d, a, b, in[6]+0A3014314H, 15); - STEP4(b, c, d, a, in[13]+04E0811A1H, 21); - STEP4(a, b, c, d, in[4]+0F7537E82H, 6); - STEP4(d, a, b, c, in[11]+ 0BD3AF235H, 10); - STEP4(c, d, a, b, in[2]+02AD7D2BBH, 15); - STEP4(b, c, d, a, in[9]+0EB86D391H, 21); + STEP4(a, b, c, d, in[0] + 0FFFFFFFFF4292244H, 6); + STEP4(d, a, b, c, in[7] + 000000000432AFF97H, 10); + STEP4(c, d, a, b, in[14] + 0FFFFFFFFAB9423A7H, 15); + STEP4(b, c, d, a, in[5] + 0FFFFFFFFFC93A039H, 21); + STEP4(a, b, c, d, in[12] + 000000000655B59C3H, 6); + STEP4(d, a, b, c, in[3] + 0FFFFFFFF8F0CCC92H, 10); + STEP4(c, d, a, b, in[10] + 0FFFFFFFFFFEFF47DH, 15); + STEP4(b, c, d, a, in[1] + 0FFFFFFFF85845DD1H, 21); + STEP4(a, b, c, d, in[8] + 0000000006FA87E4FH, 6); + STEP4(d, a, b, c, in[15] + 0FFFFFFFFFE2CE6E0H, 10); + STEP4(c, d, a, b, in[6] + 0FFFFFFFFA3014314H, 15); + STEP4(b, c, d, a, in[13] + 0000000004E0811A1H, 21); + STEP4(a, b, c, d, in[4] + 0FFFFFFFFF7537E82H, 6); + STEP4(d, a, b, c, in[11] + 0FFFFFFFFBD3AF235H, 10); + STEP4(c, d, a, b, in[2] + 0000000002AD7D2BBH, 15); + STEP4(b, c, d, a, in[9] + 0FFFFFFFFEB86D391H, 21); INC(buf[0], a); INC(buf[1], b); INC(buf[2], c); INC(buf[3], d) diff --git a/src/test/confidence/planned-binary-change b/src/test/confidence/planned-binary-change index 9613b179..5a45ccfe 100644 --- a/src/test/confidence/planned-binary-change +++ b/src/test/confidence/planned-binary-change @@ -1 +1 @@ -14 Sep 2016 13:59:08 +20 Sep 2016 16:42:29 diff --git a/src/tools/make/vishap.make b/src/tools/make/vishap.make index 008180cb..faacf33f 100644 --- a/src/tools/make/vishap.make +++ b/src/tools/make/vishap.make @@ -335,7 +335,7 @@ misc: s3: @printf "\nMaking s3 library\n" cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethBTrees.Mod -# cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethMD5.Mod + cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethMD5.Mod cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethSets.Mod cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethZlib.Mod cd $(BUILDDIR); $(ROOTDIR)/$(VISHAP) -Ffs ../../src/library/s3/ethZlibBuffers.Mod