mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 19:12:25 +00:00
Define integer sizes before including SYSTEM.h
This commit is contained in:
parent
682fa59e42
commit
ebfc60f49d
208 changed files with 1164 additions and 787 deletions
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
||||
|
|
@ -13,6 +18,6 @@ export void *Configuration__init(void)
|
|||
__DEFMOD;
|
||||
__REGMOD("Configuration", 0);
|
||||
/* BEGIN */
|
||||
__MOVE("1.95 [2016/09/04] for gcc LP64 on cygwin", Configuration_versionLong, 41);
|
||||
__MOVE("1.95 [2016/09/06] for gcc LP64 on cygwin", Configuration_versionLong, 41);
|
||||
__ENDMOD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Configuration__h
|
||||
#define Configuration__h
|
||||
|
|
@ -12,4 +12,4 @@ import CHAR Configuration_versionLong[41];
|
|||
import void *Configuration__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Configuration
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Platform.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Console__h
|
||||
#define Console__h
|
||||
|
|
@ -20,4 +20,4 @@ import void Console_String (CHAR *s, LONGINT s__len);
|
|||
import void *Console__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Console
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin tspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "Console.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin tspkaSfF */
|
||||
|
||||
#ifndef Files__h
|
||||
#define Files__h
|
||||
|
|
@ -67,4 +67,4 @@ import void Files_WriteString (Files_Rider *R, LONGINT *R__typ, CHAR *x, LONGINT
|
|||
import void *Files__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Files
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin tskSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin tskSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
|
||||
struct Heap__1 {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin tskSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin tskSfF */
|
||||
|
||||
#ifndef Heap__h
|
||||
#define Heap__h
|
||||
|
|
@ -22,7 +22,7 @@ typedef
|
|||
|
||||
typedef
|
||||
struct Heap_ModuleDesc {
|
||||
LONGINT _prvt0;
|
||||
int32 _prvt0;
|
||||
char _prvt1[44];
|
||||
} Heap_ModuleDesc;
|
||||
|
||||
|
|
@ -51,4 +51,4 @@ import void Heap_Unlock (void);
|
|||
import void *Heap__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Heap
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Console.h"
|
||||
#include "Heap.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Modules__h
|
||||
#define Modules__h
|
||||
|
|
@ -51,4 +51,4 @@ import void *Modules__init(void);
|
|||
#define Modules_modules() (Modules_Module)Heap_modules
|
||||
#define Modules_setmodules(m) Heap_modules = m
|
||||
|
||||
#endif
|
||||
#endif // Modules
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "OPM.h"
|
||||
#include "OPS.h"
|
||||
|
|
@ -1912,7 +1917,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno)
|
|||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if (f == 4) {
|
||||
if (x->typ->size != OPM_LIntSize) {
|
||||
if (x->typ->size != OPT_linttyp->size) {
|
||||
OPB_Convert(&x, OPT_linttyp);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPB__h
|
||||
#define OPB__h
|
||||
|
|
@ -46,4 +46,4 @@ import void OPB_TypTest (OPT_Node *x, OPT_Object obj, BOOLEAN guard);
|
|||
import void *OPB__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPB
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "OPM.h"
|
||||
|
|
@ -834,7 +839,7 @@ void OPC_TDescDecl (OPT_Struct typ)
|
|||
OPC_Str1((CHAR*)", #), {", 8, typ->size);
|
||||
nofptrs = 0;
|
||||
OPC_PutPtrOffsets(typ, 0, &nofptrs);
|
||||
OPC_Str1((CHAR*)"#}}", 4, -((nofptrs + 1) * OPM_LIntSize));
|
||||
OPC_Str1((CHAR*)"#}}", 4, -((nofptrs + 1) * OPM_PointerSize));
|
||||
OPC_EndStat();
|
||||
}
|
||||
|
||||
|
|
@ -917,12 +922,20 @@ static void OPC_FillGap (int32 gap, int32 off, int32 align, int32 *n, int32 *cur
|
|||
if ((*curAlign < align && gap - (adr - off) >= align)) {
|
||||
gap -= (adr - off) + align;
|
||||
OPC_BegStat();
|
||||
if (align == OPM_IntSize) {
|
||||
OPM_WriteString((CHAR*)"INTEGER", 8);
|
||||
} else if (align == OPM_LIntSize) {
|
||||
OPM_WriteString((CHAR*)"LONGINT", 8);
|
||||
} else if (align == OPM_LRealSize) {
|
||||
OPM_WriteString((CHAR*)"LONGREAL", 9);
|
||||
switch (align) {
|
||||
case 2:
|
||||
OPM_WriteString((CHAR*)"int16", 6);
|
||||
break;
|
||||
case 4:
|
||||
OPM_WriteString((CHAR*)"int32", 6);
|
||||
break;
|
||||
case 8:
|
||||
OPM_WriteString((CHAR*)"int64", 6);
|
||||
break;
|
||||
default:
|
||||
OPM_LogWLn();
|
||||
OPM_LogWStr((CHAR*)"Unexpected enclosing alignment in FillGap.", 43);
|
||||
break;
|
||||
}
|
||||
OPC_Str1((CHAR*)" _prvt#", 8, *n);
|
||||
*n += 1;
|
||||
|
|
@ -1210,7 +1223,8 @@ void OPC_GenHdr (OPT_Node n)
|
|||
OPM_WriteLn();
|
||||
OPC_CProcDefs(OPT_topScope->right, 1);
|
||||
OPM_WriteLn();
|
||||
OPM_WriteString((CHAR*)"#endif", 7);
|
||||
OPM_WriteString((CHAR*)"#endif // ", 11);
|
||||
OPM_WriteStringVar((void*)OPM_modName, 32);
|
||||
OPM_WriteLn();
|
||||
}
|
||||
|
||||
|
|
@ -1297,10 +1311,6 @@ void OPC_GenHdrIncludes (void)
|
|||
OPM_WriteString((CHAR*)"__h", 4);
|
||||
OPM_WriteLn();
|
||||
OPM_WriteLn();
|
||||
if (OPM_LIntSize == 8) {
|
||||
OPM_WriteString((CHAR*)"#define LARGE", 14);
|
||||
OPM_WriteLn();
|
||||
}
|
||||
OPC_Include((CHAR*)"SYSTEM", 7);
|
||||
OPC_IncludeImports(OPT_topScope->right, 1);
|
||||
OPM_WriteLn();
|
||||
|
|
@ -1310,10 +1320,17 @@ void OPC_GenBdy (OPT_Node n)
|
|||
{
|
||||
OPM_currFile = 1;
|
||||
OPC_GenHeaderMsg();
|
||||
if (OPM_LIntSize == 8) {
|
||||
OPM_WriteString((CHAR*)"#define LARGE", 14);
|
||||
OPM_WriteLn();
|
||||
}
|
||||
OPM_WriteString((CHAR*)"#define INTEGER int", 20);
|
||||
OPM_WriteInt(__ASHL(OPT_inttyp->size, 3));
|
||||
OPM_WriteLn();
|
||||
OPM_WriteString((CHAR*)"#define LONGINT int", 20);
|
||||
OPM_WriteInt(__ASHL(OPT_linttyp->size, 3));
|
||||
OPM_WriteLn();
|
||||
OPM_WriteString((CHAR*)"#define SET uint", 21);
|
||||
OPM_WriteInt(__ASHL(OPT_settyp->size, 3));
|
||||
OPM_WriteLn();
|
||||
OPM_WriteLn();
|
||||
OPC_Include((CHAR*)"SYSTEM", 7);
|
||||
OPC_IncludeImports(OPT_topScope->right, 0);
|
||||
OPM_WriteLn();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPC__h
|
||||
#define OPC__h
|
||||
|
|
@ -48,4 +48,4 @@ import void OPC_TypeOf (OPT_Object ap);
|
|||
import void *OPC__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPC
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "Console.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPM__h
|
||||
#define OPM__h
|
||||
|
|
@ -62,4 +62,4 @@ import void OPM_err (int16 n);
|
|||
import void *OPM__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPM
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "OPB.h"
|
||||
#include "OPM.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPP__h
|
||||
#define OPP__h
|
||||
|
|
@ -13,4 +13,4 @@ import void OPP_Module (OPT_Node *prog, SET opt);
|
|||
import void *OPP__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPP
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin tspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "OPM.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin tspkaSfF */
|
||||
|
||||
#ifndef OPS__h
|
||||
#define OPS__h
|
||||
|
|
@ -25,4 +25,4 @@ import void OPS_Init (void);
|
|||
import void *OPS__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPS
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "OPM.h"
|
||||
#include "OPS.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPT__h
|
||||
#define OPT__h
|
||||
|
|
@ -103,4 +103,4 @@ import OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, int16 dir);
|
|||
import void *OPT__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPT
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "OPC.h"
|
||||
#include "OPM.h"
|
||||
|
|
@ -16,7 +21,6 @@ static int16 OPV_stamp;
|
|||
static int32 OPV_recno;
|
||||
static OPV_ExitInfo OPV_exit;
|
||||
static int16 OPV_nofExitLabels;
|
||||
static BOOLEAN OPV_naturalAlignment;
|
||||
|
||||
export LONGINT *OPV_ExitInfo__typ;
|
||||
|
||||
|
|
@ -34,7 +38,6 @@ export void OPV_Init (void);
|
|||
static void OPV_InitTDescs (OPT_Node n);
|
||||
static void OPV_Len (OPT_Node n, int32 dim);
|
||||
export void OPV_Module (OPT_Node prog);
|
||||
static int32 OPV_NaturalAlignment (int32 size, int32 max);
|
||||
static void OPV_NewArr (OPT_Node d, OPT_Node x);
|
||||
static void OPV_ParIntLiteral (int32 n, int32 size);
|
||||
static int16 OPV_Precedence (int16 class, int16 subclass, int16 form, int16 comp);
|
||||
|
|
@ -51,24 +54,6 @@ static void OPV_expr (OPT_Node n, int16 prec);
|
|||
static void OPV_stat (OPT_Node n, OPT_Object outerProc);
|
||||
|
||||
|
||||
static int32 OPV_NaturalAlignment (int32 size, int32 max)
|
||||
{
|
||||
int32 _o_result;
|
||||
int32 i;
|
||||
if (size >= max) {
|
||||
_o_result = max;
|
||||
return _o_result;
|
||||
} else {
|
||||
i = 1;
|
||||
while (i < size) {
|
||||
i += i;
|
||||
}
|
||||
_o_result = i;
|
||||
return _o_result;
|
||||
}
|
||||
__RETCHK;
|
||||
}
|
||||
|
||||
void OPV_TypSize (OPT_Struct typ)
|
||||
{
|
||||
int16 f, c;
|
||||
|
|
@ -108,9 +93,6 @@ void OPV_TypSize (OPT_Struct typ)
|
|||
if (offset == 0) {
|
||||
offset = 1;
|
||||
}
|
||||
if (OPM_RecSize == 0) {
|
||||
base = OPV_NaturalAlignment(offset, OPC_SizeAlignment(OPM_RecSize));
|
||||
}
|
||||
OPC_Align(&offset, base);
|
||||
if ((typ->strobj == NIL && __MASK(typ->align, -65536) == 0)) {
|
||||
OPV_recno += 1;
|
||||
|
|
@ -568,7 +550,7 @@ static void OPV_design (OPT_Node n, int16 prec)
|
|||
OPT_Struct typ = NIL;
|
||||
int16 class, designPrec, comp;
|
||||
OPT_Node d = NIL, x = NIL;
|
||||
int16 dims, i, _for__28;
|
||||
int16 dims, i, _for__27;
|
||||
comp = n->typ->comp;
|
||||
obj = n->obj;
|
||||
class = n->class;
|
||||
|
|
@ -644,9 +626,9 @@ static void OPV_design (OPT_Node n, int16 prec)
|
|||
}
|
||||
x = x->left;
|
||||
}
|
||||
_for__28 = dims;
|
||||
_for__27 = dims;
|
||||
i = 1;
|
||||
while (i <= _for__28) {
|
||||
while (i <= _for__27) {
|
||||
OPM_Write(')');
|
||||
i += 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPV__h
|
||||
#define OPV__h
|
||||
|
|
@ -16,4 +16,4 @@ import void OPV_TypSize (OPT_Struct typ);
|
|||
import void *OPV__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPV
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
|
||||
typedef
|
||||
|
|
@ -728,7 +733,6 @@ static void Platform_DisplayHaltCode (int32 code)
|
|||
|
||||
void Platform_Halt (int32 code)
|
||||
{
|
||||
int16 e;
|
||||
Platform_HaltCode = code;
|
||||
if (Platform_HaltHandler != NIL) {
|
||||
(*Platform_HaltHandler)(code);
|
||||
|
|
@ -745,7 +749,6 @@ void Platform_Halt (int32 code)
|
|||
|
||||
void Platform_AssertFail (int32 code)
|
||||
{
|
||||
int16 e;
|
||||
Platform_errstring((CHAR*)"Assertion failure.", 19);
|
||||
if (code != 0) {
|
||||
Platform_errstring((CHAR*)" ASSERT code ", 14);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Platform__h
|
||||
#define Platform__h
|
||||
|
|
@ -80,4 +80,4 @@ import BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT
|
|||
import void *Platform__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Platform
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Reals__h
|
||||
#define Reals__h
|
||||
|
|
@ -20,4 +20,4 @@ import LONGREAL Reals_TenL (int16 e);
|
|||
import void *Reals__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Reals
|
||||
|
|
|
|||
|
|
@ -1,6 +1,24 @@
|
|||
#ifndef SYSTEM__h
|
||||
#define SYSTEM__h
|
||||
|
||||
|
||||
|
||||
#ifndef LONGINT
|
||||
#if (__SIZEOF_POINTER__ == 8) || defined(_WIN64)
|
||||
#define INTEGER int32
|
||||
#define LONGINT int64
|
||||
#define SET uint64
|
||||
#else
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Declare memcpy in a way compatible with C compilers intrinsic
|
||||
// built in implementations.
|
||||
|
||||
|
|
@ -22,10 +40,12 @@ void *memcpy(void *dest, const void *source, size_t size);
|
|||
|
||||
// Declare fixed size versions of basic intger types
|
||||
|
||||
#if defined(_WIN64)
|
||||
#if (__SIZEOF_POINTER__ < 8) || defined(_WIN64)
|
||||
// ILP32 or LLP64
|
||||
typedef long long int64;
|
||||
typedef unsigned long long uint64;
|
||||
#else
|
||||
// LP64
|
||||
typedef long int64;
|
||||
typedef unsigned long uint64;
|
||||
#endif
|
||||
|
|
@ -67,29 +87,10 @@ typedef float REAL;
|
|||
typedef double LONGREAL;
|
||||
typedef void* SYSTEM_PTR;
|
||||
|
||||
#define uSET SET
|
||||
|
||||
|
||||
|
||||
// For 32 bit builds, the size of LONGINT depends on a make option:
|
||||
|
||||
#if (__SIZEOF_POINTER__ == 8) || defined(LARGE) || defined(_WIN64)
|
||||
typedef int32 INTEGER;
|
||||
typedef int64 LONGINT;
|
||||
typedef uint64 SET;
|
||||
typedef uint64 uSET;
|
||||
#else
|
||||
typedef int16 INTEGER;
|
||||
typedef int32 LONGINT;
|
||||
typedef uint32 SET;
|
||||
typedef uint32 uSET;
|
||||
#endif
|
||||
|
||||
|
||||
// Temporary defs while bootstrapping
|
||||
|
||||
#define uLONGINT uint64
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Strings__h
|
||||
#define Strings__h
|
||||
|
|
@ -20,4 +20,4 @@ import void Strings_Replace (CHAR *source, LONGINT source__len, int16 pos, CHAR
|
|||
import void *Strings__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Strings
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Files.h"
|
||||
#include "Modules.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Texts__h
|
||||
#define Texts__h
|
||||
|
|
@ -30,7 +30,7 @@ typedef
|
|||
|
||||
typedef
|
||||
struct Texts_RunDesc {
|
||||
LONGINT _prvt0;
|
||||
int32 _prvt0;
|
||||
char _prvt1[15];
|
||||
} Texts_RunDesc;
|
||||
|
||||
|
|
@ -169,4 +169,4 @@ import void Texts_WriteString (Texts_Writer *W, LONGINT *W__typ, CHAR *s, LONGIN
|
|||
import void *Texts__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Texts
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkamSf */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkamSf */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "Heap.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
|
||||
typedef
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef errors__h
|
||||
#define errors__h
|
||||
|
|
@ -15,4 +15,4 @@ import errors_string errors_errors[350];
|
|||
import void *errors__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // errors
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "Console.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef extTools__h
|
||||
#define extTools__h
|
||||
|
|
@ -13,4 +13,4 @@ import void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEA
|
|||
import void *extTools__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // extTools
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Console.h"
|
||||
#include "Strings.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef vt100__h
|
||||
#define vt100__h
|
||||
|
|
@ -34,4 +34,4 @@ import void vt100_SetAttr (CHAR *attr, LONGINT attr__len);
|
|||
import void *vt100__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // vt100
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
||||
|
|
@ -13,6 +18,6 @@ export void *Configuration__init(void)
|
|||
__DEFMOD;
|
||||
__REGMOD("Configuration", 0);
|
||||
/* BEGIN */
|
||||
__MOVE("1.95 [2016/09/04] for gcc LP64 on cygwin", Configuration_versionLong, 41);
|
||||
__MOVE("1.95 [2016/09/06] for gcc LP64 on cygwin", Configuration_versionLong, 41);
|
||||
__ENDMOD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Configuration__h
|
||||
#define Configuration__h
|
||||
|
|
@ -12,4 +12,4 @@ import CHAR Configuration_versionLong[41];
|
|||
import void *Configuration__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Configuration
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Platform.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Console__h
|
||||
#define Console__h
|
||||
|
|
@ -20,4 +20,4 @@ import void Console_String (CHAR *s, LONGINT s__len);
|
|||
import void *Console__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Console
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin tspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "Console.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin tspkaSfF */
|
||||
|
||||
#ifndef Files__h
|
||||
#define Files__h
|
||||
|
|
@ -67,4 +67,4 @@ import void Files_WriteString (Files_Rider *R, LONGINT *R__typ, CHAR *x, LONGINT
|
|||
import void *Files__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Files
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin tskSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin tskSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
|
||||
struct Heap__1 {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin tskSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin tskSfF */
|
||||
|
||||
#ifndef Heap__h
|
||||
#define Heap__h
|
||||
|
|
@ -22,7 +22,7 @@ typedef
|
|||
|
||||
typedef
|
||||
struct Heap_ModuleDesc {
|
||||
LONGINT _prvt0;
|
||||
int32 _prvt0;
|
||||
char _prvt1[44];
|
||||
} Heap_ModuleDesc;
|
||||
|
||||
|
|
@ -51,4 +51,4 @@ import void Heap_Unlock (void);
|
|||
import void *Heap__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Heap
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Console.h"
|
||||
#include "Heap.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Modules__h
|
||||
#define Modules__h
|
||||
|
|
@ -51,4 +51,4 @@ import void *Modules__init(void);
|
|||
#define Modules_modules() (Modules_Module)Heap_modules
|
||||
#define Modules_setmodules(m) Heap_modules = m
|
||||
|
||||
#endif
|
||||
#endif // Modules
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "OPM.h"
|
||||
#include "OPS.h"
|
||||
|
|
@ -1912,7 +1917,7 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno)
|
|||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if (f == 4) {
|
||||
if (x->typ->size != OPM_LIntSize) {
|
||||
if (x->typ->size != OPT_linttyp->size) {
|
||||
OPB_Convert(&x, OPT_linttyp);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPB__h
|
||||
#define OPB__h
|
||||
|
|
@ -46,4 +46,4 @@ import void OPB_TypTest (OPT_Node *x, OPT_Object obj, BOOLEAN guard);
|
|||
import void *OPB__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPB
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "OPM.h"
|
||||
|
|
@ -834,7 +839,7 @@ void OPC_TDescDecl (OPT_Struct typ)
|
|||
OPC_Str1((CHAR*)", #), {", 8, typ->size);
|
||||
nofptrs = 0;
|
||||
OPC_PutPtrOffsets(typ, 0, &nofptrs);
|
||||
OPC_Str1((CHAR*)"#}}", 4, -((nofptrs + 1) * OPM_LIntSize));
|
||||
OPC_Str1((CHAR*)"#}}", 4, -((nofptrs + 1) * OPM_PointerSize));
|
||||
OPC_EndStat();
|
||||
}
|
||||
|
||||
|
|
@ -917,12 +922,20 @@ static void OPC_FillGap (int32 gap, int32 off, int32 align, int32 *n, int32 *cur
|
|||
if ((*curAlign < align && gap - (adr - off) >= align)) {
|
||||
gap -= (adr - off) + align;
|
||||
OPC_BegStat();
|
||||
if (align == OPM_IntSize) {
|
||||
OPM_WriteString((CHAR*)"INTEGER", 8);
|
||||
} else if (align == OPM_LIntSize) {
|
||||
OPM_WriteString((CHAR*)"LONGINT", 8);
|
||||
} else if (align == OPM_LRealSize) {
|
||||
OPM_WriteString((CHAR*)"LONGREAL", 9);
|
||||
switch (align) {
|
||||
case 2:
|
||||
OPM_WriteString((CHAR*)"int16", 6);
|
||||
break;
|
||||
case 4:
|
||||
OPM_WriteString((CHAR*)"int32", 6);
|
||||
break;
|
||||
case 8:
|
||||
OPM_WriteString((CHAR*)"int64", 6);
|
||||
break;
|
||||
default:
|
||||
OPM_LogWLn();
|
||||
OPM_LogWStr((CHAR*)"Unexpected enclosing alignment in FillGap.", 43);
|
||||
break;
|
||||
}
|
||||
OPC_Str1((CHAR*)" _prvt#", 8, *n);
|
||||
*n += 1;
|
||||
|
|
@ -1210,7 +1223,8 @@ void OPC_GenHdr (OPT_Node n)
|
|||
OPM_WriteLn();
|
||||
OPC_CProcDefs(OPT_topScope->right, 1);
|
||||
OPM_WriteLn();
|
||||
OPM_WriteString((CHAR*)"#endif", 7);
|
||||
OPM_WriteString((CHAR*)"#endif // ", 11);
|
||||
OPM_WriteStringVar((void*)OPM_modName, 32);
|
||||
OPM_WriteLn();
|
||||
}
|
||||
|
||||
|
|
@ -1297,10 +1311,6 @@ void OPC_GenHdrIncludes (void)
|
|||
OPM_WriteString((CHAR*)"__h", 4);
|
||||
OPM_WriteLn();
|
||||
OPM_WriteLn();
|
||||
if (OPM_LIntSize == 8) {
|
||||
OPM_WriteString((CHAR*)"#define LARGE", 14);
|
||||
OPM_WriteLn();
|
||||
}
|
||||
OPC_Include((CHAR*)"SYSTEM", 7);
|
||||
OPC_IncludeImports(OPT_topScope->right, 1);
|
||||
OPM_WriteLn();
|
||||
|
|
@ -1310,10 +1320,17 @@ void OPC_GenBdy (OPT_Node n)
|
|||
{
|
||||
OPM_currFile = 1;
|
||||
OPC_GenHeaderMsg();
|
||||
if (OPM_LIntSize == 8) {
|
||||
OPM_WriteString((CHAR*)"#define LARGE", 14);
|
||||
OPM_WriteLn();
|
||||
}
|
||||
OPM_WriteString((CHAR*)"#define INTEGER int", 20);
|
||||
OPM_WriteInt(__ASHL(OPT_inttyp->size, 3));
|
||||
OPM_WriteLn();
|
||||
OPM_WriteString((CHAR*)"#define LONGINT int", 20);
|
||||
OPM_WriteInt(__ASHL(OPT_linttyp->size, 3));
|
||||
OPM_WriteLn();
|
||||
OPM_WriteString((CHAR*)"#define SET uint", 21);
|
||||
OPM_WriteInt(__ASHL(OPT_settyp->size, 3));
|
||||
OPM_WriteLn();
|
||||
OPM_WriteLn();
|
||||
OPC_Include((CHAR*)"SYSTEM", 7);
|
||||
OPC_IncludeImports(OPT_topScope->right, 0);
|
||||
OPM_WriteLn();
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPC__h
|
||||
#define OPC__h
|
||||
|
|
@ -48,4 +48,4 @@ import void OPC_TypeOf (OPT_Object ap);
|
|||
import void *OPC__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPC
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "Console.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPM__h
|
||||
#define OPM__h
|
||||
|
|
@ -62,4 +62,4 @@ import void OPM_err (int16 n);
|
|||
import void *OPM__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPM
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "OPB.h"
|
||||
#include "OPM.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPP__h
|
||||
#define OPP__h
|
||||
|
|
@ -13,4 +13,4 @@ import void OPP_Module (OPT_Node *prog, SET opt);
|
|||
import void *OPP__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPP
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin tspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "OPM.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin tspkaSfF */
|
||||
|
||||
#ifndef OPS__h
|
||||
#define OPS__h
|
||||
|
|
@ -25,4 +25,4 @@ import void OPS_Init (void);
|
|||
import void *OPS__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPS
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "OPM.h"
|
||||
#include "OPS.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPT__h
|
||||
#define OPT__h
|
||||
|
|
@ -103,4 +103,4 @@ import OPT_Struct OPT_ShorterOrLongerType (OPT_Struct x, int16 dir);
|
|||
import void *OPT__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPT
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "OPC.h"
|
||||
#include "OPM.h"
|
||||
|
|
@ -16,7 +21,6 @@ static int16 OPV_stamp;
|
|||
static int32 OPV_recno;
|
||||
static OPV_ExitInfo OPV_exit;
|
||||
static int16 OPV_nofExitLabels;
|
||||
static BOOLEAN OPV_naturalAlignment;
|
||||
|
||||
export LONGINT *OPV_ExitInfo__typ;
|
||||
|
||||
|
|
@ -34,7 +38,6 @@ export void OPV_Init (void);
|
|||
static void OPV_InitTDescs (OPT_Node n);
|
||||
static void OPV_Len (OPT_Node n, int32 dim);
|
||||
export void OPV_Module (OPT_Node prog);
|
||||
static int32 OPV_NaturalAlignment (int32 size, int32 max);
|
||||
static void OPV_NewArr (OPT_Node d, OPT_Node x);
|
||||
static void OPV_ParIntLiteral (int32 n, int32 size);
|
||||
static int16 OPV_Precedence (int16 class, int16 subclass, int16 form, int16 comp);
|
||||
|
|
@ -51,24 +54,6 @@ static void OPV_expr (OPT_Node n, int16 prec);
|
|||
static void OPV_stat (OPT_Node n, OPT_Object outerProc);
|
||||
|
||||
|
||||
static int32 OPV_NaturalAlignment (int32 size, int32 max)
|
||||
{
|
||||
int32 _o_result;
|
||||
int32 i;
|
||||
if (size >= max) {
|
||||
_o_result = max;
|
||||
return _o_result;
|
||||
} else {
|
||||
i = 1;
|
||||
while (i < size) {
|
||||
i += i;
|
||||
}
|
||||
_o_result = i;
|
||||
return _o_result;
|
||||
}
|
||||
__RETCHK;
|
||||
}
|
||||
|
||||
void OPV_TypSize (OPT_Struct typ)
|
||||
{
|
||||
int16 f, c;
|
||||
|
|
@ -108,9 +93,6 @@ void OPV_TypSize (OPT_Struct typ)
|
|||
if (offset == 0) {
|
||||
offset = 1;
|
||||
}
|
||||
if (OPM_RecSize == 0) {
|
||||
base = OPV_NaturalAlignment(offset, OPC_SizeAlignment(OPM_RecSize));
|
||||
}
|
||||
OPC_Align(&offset, base);
|
||||
if ((typ->strobj == NIL && __MASK(typ->align, -65536) == 0)) {
|
||||
OPV_recno += 1;
|
||||
|
|
@ -568,7 +550,7 @@ static void OPV_design (OPT_Node n, int16 prec)
|
|||
OPT_Struct typ = NIL;
|
||||
int16 class, designPrec, comp;
|
||||
OPT_Node d = NIL, x = NIL;
|
||||
int16 dims, i, _for__28;
|
||||
int16 dims, i, _for__27;
|
||||
comp = n->typ->comp;
|
||||
obj = n->obj;
|
||||
class = n->class;
|
||||
|
|
@ -644,9 +626,9 @@ static void OPV_design (OPT_Node n, int16 prec)
|
|||
}
|
||||
x = x->left;
|
||||
}
|
||||
_for__28 = dims;
|
||||
_for__27 = dims;
|
||||
i = 1;
|
||||
while (i <= _for__28) {
|
||||
while (i <= _for__27) {
|
||||
OPM_Write(')');
|
||||
i += 1;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPV__h
|
||||
#define OPV__h
|
||||
|
|
@ -16,4 +16,4 @@ import void OPV_TypSize (OPT_Struct typ);
|
|||
import void *OPV__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPV
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
|
||||
typedef
|
||||
|
|
@ -728,7 +733,6 @@ static void Platform_DisplayHaltCode (int32 code)
|
|||
|
||||
void Platform_Halt (int32 code)
|
||||
{
|
||||
int16 e;
|
||||
Platform_HaltCode = code;
|
||||
if (Platform_HaltHandler != NIL) {
|
||||
(*Platform_HaltHandler)(code);
|
||||
|
|
@ -745,7 +749,6 @@ void Platform_Halt (int32 code)
|
|||
|
||||
void Platform_AssertFail (int32 code)
|
||||
{
|
||||
int16 e;
|
||||
Platform_errstring((CHAR*)"Assertion failure.", 19);
|
||||
if (code != 0) {
|
||||
Platform_errstring((CHAR*)" ASSERT code ", 14);
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Platform__h
|
||||
#define Platform__h
|
||||
|
|
@ -80,4 +80,4 @@ import BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT
|
|||
import void *Platform__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Platform
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Reals__h
|
||||
#define Reals__h
|
||||
|
|
@ -20,4 +20,4 @@ import LONGREAL Reals_TenL (int16 e);
|
|||
import void *Reals__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Reals
|
||||
|
|
|
|||
|
|
@ -1,6 +1,24 @@
|
|||
#ifndef SYSTEM__h
|
||||
#define SYSTEM__h
|
||||
|
||||
|
||||
|
||||
#ifndef LONGINT
|
||||
#if (__SIZEOF_POINTER__ == 8) || defined(_WIN64)
|
||||
#define INTEGER int32
|
||||
#define LONGINT int64
|
||||
#define SET uint64
|
||||
#else
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
#endif
|
||||
#endif
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
// Declare memcpy in a way compatible with C compilers intrinsic
|
||||
// built in implementations.
|
||||
|
||||
|
|
@ -22,10 +40,12 @@ void *memcpy(void *dest, const void *source, size_t size);
|
|||
|
||||
// Declare fixed size versions of basic intger types
|
||||
|
||||
#if defined(_WIN64)
|
||||
#if (__SIZEOF_POINTER__ < 8) || defined(_WIN64)
|
||||
// ILP32 or LLP64
|
||||
typedef long long int64;
|
||||
typedef unsigned long long uint64;
|
||||
#else
|
||||
// LP64
|
||||
typedef long int64;
|
||||
typedef unsigned long uint64;
|
||||
#endif
|
||||
|
|
@ -67,29 +87,10 @@ typedef float REAL;
|
|||
typedef double LONGREAL;
|
||||
typedef void* SYSTEM_PTR;
|
||||
|
||||
#define uSET SET
|
||||
|
||||
|
||||
|
||||
// For 32 bit builds, the size of LONGINT depends on a make option:
|
||||
|
||||
#if (__SIZEOF_POINTER__ == 8) || defined(LARGE) || defined(_WIN64)
|
||||
typedef int32 INTEGER;
|
||||
typedef int64 LONGINT;
|
||||
typedef uint64 SET;
|
||||
typedef uint64 uSET;
|
||||
#else
|
||||
typedef int16 INTEGER;
|
||||
typedef int32 LONGINT;
|
||||
typedef uint32 SET;
|
||||
typedef uint32 uSET;
|
||||
#endif
|
||||
|
||||
|
||||
// Temporary defs while bootstrapping
|
||||
|
||||
#define uLONGINT uint64
|
||||
|
||||
|
||||
|
||||
// ----------------------------------------------------------------------
|
||||
// ----------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Strings__h
|
||||
#define Strings__h
|
||||
|
|
@ -20,4 +20,4 @@ import void Strings_Replace (CHAR *source, LONGINT source__len, int16 pos, CHAR
|
|||
import void *Strings__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Strings
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Files.h"
|
||||
#include "Modules.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Texts__h
|
||||
#define Texts__h
|
||||
|
|
@ -30,7 +30,7 @@ typedef
|
|||
|
||||
typedef
|
||||
struct Texts_RunDesc {
|
||||
LONGINT _prvt0;
|
||||
int32 _prvt0;
|
||||
char _prvt1[15];
|
||||
} Texts_RunDesc;
|
||||
|
||||
|
|
@ -86,7 +86,7 @@ typedef
|
|||
Texts_FontsFont fnt;
|
||||
int8 col, voff;
|
||||
Texts_Elem elem;
|
||||
LONGREAL _prvt0;
|
||||
int64 _prvt0;
|
||||
char _prvt1[24];
|
||||
CHAR nextCh;
|
||||
int16 line, class;
|
||||
|
|
@ -170,4 +170,4 @@ import void Texts_WriteString (Texts_Writer *W, LONGINT *W__typ, CHAR *s, LONGIN
|
|||
import void *Texts__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Texts
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkamSf */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkamSf */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "Heap.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
|
||||
typedef
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef errors__h
|
||||
#define errors__h
|
||||
|
|
@ -15,4 +15,4 @@ import errors_string errors_errors[350];
|
|||
import void *errors__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // errors
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "Console.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef extTools__h
|
||||
#define extTools__h
|
||||
|
|
@ -13,4 +13,4 @@ import void extTools_LinkMain (CHAR *moduleName, LONGINT moduleName__len, BOOLEA
|
|||
import void *extTools__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // extTools
|
||||
|
|
|
|||
|
|
@ -1,4 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int16
|
||||
#define LONGINT int32
|
||||
#define SET uint32
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Console.h"
|
||||
#include "Strings.h"
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef vt100__h
|
||||
#define vt100__h
|
||||
|
|
@ -34,4 +34,4 @@ import void vt100_SetAttr (CHAR *attr, LONGINT attr__len);
|
|||
import void *vt100__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // vt100
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#define LARGE
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int32
|
||||
#define LONGINT int64
|
||||
#define SET uint64
|
||||
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
||||
|
|
@ -14,6 +18,6 @@ export void *Configuration__init(void)
|
|||
__DEFMOD;
|
||||
__REGMOD("Configuration", 0);
|
||||
/* BEGIN */
|
||||
__MOVE("1.95 [2016/09/04] for gcc LP64 on cygwin", Configuration_versionLong, 41);
|
||||
__MOVE("1.95 [2016/09/06] for gcc LP64 on cygwin", Configuration_versionLong, 41);
|
||||
__ENDMOD;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Configuration__h
|
||||
#define Configuration__h
|
||||
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
||||
|
|
@ -13,4 +12,4 @@ import CHAR Configuration_versionLong[41];
|
|||
import void *Configuration__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Configuration
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#define LARGE
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int32
|
||||
#define LONGINT int64
|
||||
#define SET uint64
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Platform.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Console__h
|
||||
#define Console__h
|
||||
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
||||
|
|
@ -21,4 +20,4 @@ import void Console_String (CHAR *s, LONGINT s__len);
|
|||
import void *Console__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Console
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin tspkaSfF */
|
||||
#define LARGE
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin tspkaSfF */
|
||||
|
||||
#define INTEGER int32
|
||||
#define LONGINT int64
|
||||
#define SET uint64
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "Console.h"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin tspkaSfF */
|
||||
|
||||
#ifndef Files__h
|
||||
#define Files__h
|
||||
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
|
||||
typedef
|
||||
|
|
@ -68,4 +67,4 @@ import void Files_WriteString (Files_Rider *R, LONGINT *R__typ, CHAR *x, LONGINT
|
|||
import void *Files__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Files
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin tskSfF */
|
||||
#define LARGE
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin tskSfF */
|
||||
|
||||
#define INTEGER int32
|
||||
#define LONGINT int64
|
||||
#define SET uint64
|
||||
|
||||
#include "SYSTEM.h"
|
||||
|
||||
struct Heap__1 {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin tskSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin tskSfF */
|
||||
|
||||
#ifndef Heap__h
|
||||
#define Heap__h
|
||||
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
|
||||
typedef
|
||||
|
|
@ -23,7 +22,7 @@ typedef
|
|||
|
||||
typedef
|
||||
struct Heap_ModuleDesc {
|
||||
LONGINT _prvt0;
|
||||
int64 _prvt0;
|
||||
char _prvt1[72];
|
||||
} Heap_ModuleDesc;
|
||||
|
||||
|
|
@ -52,4 +51,4 @@ import void Heap_Unlock (void);
|
|||
import void *Heap__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // Heap
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#define LARGE
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int32
|
||||
#define LONGINT int64
|
||||
#define SET uint64
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Console.h"
|
||||
#include "Heap.h"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef Modules__h
|
||||
#define Modules__h
|
||||
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
|
||||
typedef
|
||||
|
|
@ -52,4 +51,4 @@ import void *Modules__init(void);
|
|||
#define Modules_modules() (Modules_Module)Heap_modules
|
||||
#define Modules_setmodules(m) Heap_modules = m
|
||||
|
||||
#endif
|
||||
#endif // Modules
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#define LARGE
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int32
|
||||
#define LONGINT int64
|
||||
#define SET uint64
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "OPM.h"
|
||||
#include "OPS.h"
|
||||
|
|
@ -1913,7 +1917,7 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno)
|
|||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if (f == 4) {
|
||||
if (x->typ->size != (int64)OPM_LIntSize) {
|
||||
if (x->typ->size != OPT_linttyp->size) {
|
||||
OPB_Convert(&x, OPT_linttyp);
|
||||
}
|
||||
} else {
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPB__h
|
||||
#define OPB__h
|
||||
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
#include "OPS.h"
|
||||
#include "OPT.h"
|
||||
|
|
@ -47,4 +46,4 @@ import void OPB_TypTest (OPT_Node *x, OPT_Object obj, BOOLEAN guard);
|
|||
import void *OPB__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPB
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#define LARGE
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int32
|
||||
#define LONGINT int64
|
||||
#define SET uint64
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "OPM.h"
|
||||
|
|
@ -835,7 +839,7 @@ void OPC_TDescDecl (OPT_Struct typ)
|
|||
OPC_Str1((CHAR*)", #), {", 8, typ->size);
|
||||
nofptrs = 0;
|
||||
OPC_PutPtrOffsets(typ, 0, &nofptrs);
|
||||
OPC_Str1((CHAR*)"#}}", 4, -((nofptrs + 1) * (int64)OPM_LIntSize));
|
||||
OPC_Str1((CHAR*)"#}}", 4, -((nofptrs + 1) * (int64)OPM_PointerSize));
|
||||
OPC_EndStat();
|
||||
}
|
||||
|
||||
|
|
@ -918,12 +922,20 @@ static void OPC_FillGap (int64 gap, int64 off, int64 align, int64 *n, int64 *cur
|
|||
if ((*curAlign < align && gap - (adr - off) >= align)) {
|
||||
gap -= (adr - off) + align;
|
||||
OPC_BegStat();
|
||||
if (align == (int64)OPM_IntSize) {
|
||||
OPM_WriteString((CHAR*)"INTEGER", 8);
|
||||
} else if (align == (int64)OPM_LIntSize) {
|
||||
OPM_WriteString((CHAR*)"LONGINT", 8);
|
||||
} else if (align == (int64)OPM_LRealSize) {
|
||||
OPM_WriteString((CHAR*)"LONGREAL", 9);
|
||||
switch (align) {
|
||||
case 2:
|
||||
OPM_WriteString((CHAR*)"int16", 6);
|
||||
break;
|
||||
case 4:
|
||||
OPM_WriteString((CHAR*)"int32", 6);
|
||||
break;
|
||||
case 8:
|
||||
OPM_WriteString((CHAR*)"int64", 6);
|
||||
break;
|
||||
default:
|
||||
OPM_LogWLn();
|
||||
OPM_LogWStr((CHAR*)"Unexpected enclosing alignment in FillGap.", 43);
|
||||
break;
|
||||
}
|
||||
OPC_Str1((CHAR*)" _prvt#", 8, *n);
|
||||
*n += 1;
|
||||
|
|
@ -1211,7 +1223,8 @@ void OPC_GenHdr (OPT_Node n)
|
|||
OPM_WriteLn();
|
||||
OPC_CProcDefs(OPT_topScope->right, 1);
|
||||
OPM_WriteLn();
|
||||
OPM_WriteString((CHAR*)"#endif", 7);
|
||||
OPM_WriteString((CHAR*)"#endif // ", 11);
|
||||
OPM_WriteStringVar((void*)OPM_modName, 32);
|
||||
OPM_WriteLn();
|
||||
}
|
||||
|
||||
|
|
@ -1298,10 +1311,6 @@ void OPC_GenHdrIncludes (void)
|
|||
OPM_WriteString((CHAR*)"__h", 4);
|
||||
OPM_WriteLn();
|
||||
OPM_WriteLn();
|
||||
if (OPM_LIntSize == 8) {
|
||||
OPM_WriteString((CHAR*)"#define LARGE", 14);
|
||||
OPM_WriteLn();
|
||||
}
|
||||
OPC_Include((CHAR*)"SYSTEM", 7);
|
||||
OPC_IncludeImports(OPT_topScope->right, 1);
|
||||
OPM_WriteLn();
|
||||
|
|
@ -1311,10 +1320,17 @@ void OPC_GenBdy (OPT_Node n)
|
|||
{
|
||||
OPM_currFile = 1;
|
||||
OPC_GenHeaderMsg();
|
||||
if (OPM_LIntSize == 8) {
|
||||
OPM_WriteString((CHAR*)"#define LARGE", 14);
|
||||
OPM_WriteLn();
|
||||
}
|
||||
OPM_WriteString((CHAR*)"#define INTEGER int", 20);
|
||||
OPM_WriteInt(__ASHL(OPT_inttyp->size, 3));
|
||||
OPM_WriteLn();
|
||||
OPM_WriteString((CHAR*)"#define LONGINT int", 20);
|
||||
OPM_WriteInt(__ASHL(OPT_linttyp->size, 3));
|
||||
OPM_WriteLn();
|
||||
OPM_WriteString((CHAR*)"#define SET uint", 21);
|
||||
OPM_WriteInt(__ASHL(OPT_settyp->size, 3));
|
||||
OPM_WriteLn();
|
||||
OPM_WriteLn();
|
||||
OPC_Include((CHAR*)"SYSTEM", 7);
|
||||
OPC_IncludeImports(OPT_topScope->right, 0);
|
||||
OPM_WriteLn();
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPC__h
|
||||
#define OPC__h
|
||||
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
#include "OPT.h"
|
||||
|
||||
|
|
@ -49,4 +48,4 @@ import void OPC_TypeOf (OPT_Object ap);
|
|||
import void *OPC__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPC
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#define LARGE
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int32
|
||||
#define LONGINT int64
|
||||
#define SET uint64
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "Configuration.h"
|
||||
#include "Console.h"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPM__h
|
||||
#define OPM__h
|
||||
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
|
||||
|
||||
|
|
@ -63,4 +62,4 @@ import void OPM_err (int32 n);
|
|||
import void *OPM__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPM
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
#define LARGE
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#define INTEGER int32
|
||||
#define LONGINT int64
|
||||
#define SET uint64
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "OPB.h"
|
||||
#include "OPM.h"
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin xtspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin xtspkaSfF */
|
||||
|
||||
#ifndef OPP__h
|
||||
#define OPP__h
|
||||
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
#include "OPT.h"
|
||||
|
||||
|
|
@ -14,4 +13,4 @@ import void OPP_Module (OPT_Node *prog, SET opt);
|
|||
import void *OPP__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPP
|
||||
|
|
|
|||
|
|
@ -1,5 +1,9 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin tspkaSfF */
|
||||
#define LARGE
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin tspkaSfF */
|
||||
|
||||
#define INTEGER int32
|
||||
#define LONGINT int64
|
||||
#define SET uint64
|
||||
|
||||
#include "SYSTEM.h"
|
||||
#include "OPM.h"
|
||||
|
||||
|
|
|
|||
|
|
@ -1,9 +1,8 @@
|
|||
/* voc 1.95 [2016/09/04] for gcc LP64 on cygwin tspkaSfF */
|
||||
/* voc 1.95 [2016/09/06] for gcc LP64 on cygwin tspkaSfF */
|
||||
|
||||
#ifndef OPS__h
|
||||
#define OPS__h
|
||||
|
||||
#define LARGE
|
||||
#include "SYSTEM.h"
|
||||
|
||||
typedef
|
||||
|
|
@ -26,4 +25,4 @@ import void OPS_Init (void);
|
|||
import void *OPS__init(void);
|
||||
|
||||
|
||||
#endif
|
||||
#endif // OPS
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Add a link
Reference in a new issue