Moving Heap.Mod to SYSTEM.UINTPTR. Only 64 bit working for now.

This commit is contained in:
David Brown 2016-09-03 11:56:17 +01:00
parent 11de6b8512
commit cdd8a26481
205 changed files with 656 additions and 650 deletions

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#define LARGE
#include "SYSTEM.h"
@ -14,6 +14,6 @@ export void *Configuration__init(void)
__DEFMOD;
__REGMOD("Configuration", 0);
/* BEGIN */
__MOVE("1.95 [2016/09/02] for gcc LP64 on cygwin", Configuration_versionLong, 41);
__MOVE("1.95 [2016/09/03] for gcc LP64 on cygwin", Configuration_versionLong, 41);
__ENDMOD;
}

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Configuration__h
#define Configuration__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#define LARGE
#include "SYSTEM.h"
#include "Platform.h"
@ -22,7 +22,7 @@ export void Console_String (CHAR *s, LONGINT s__len);
void Console_Flush (void)
{
int32 error;
error = Platform_Write(Platform_StdOut, (SYSTEM_ADRINT)Console_line, Console_pos);
error = Platform_Write(Platform_StdOut, (uintptr)Console_line, Console_pos);
Console_pos = 0;
}

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Console__h
#define Console__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin tspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin tspkaSfF */
#define LARGE
#include "SYSTEM.h"
#include "Configuration.h"
@ -258,7 +258,7 @@ static void Files_Flush (Files_Buffer buf)
if (buf->org != f->pos) {
error = Platform_Seek(f->fd, buf->org, Platform_SeekSet);
}
error = Platform_Write(f->fd, (SYSTEM_ADRINT)buf->data, buf->size);
error = Platform_Write(f->fd, (uintptr)buf->data, buf->size);
if (error != 0) {
Files_Err((CHAR*)"error writing file", 19, f, error);
}
@ -657,7 +657,7 @@ void Files_ReadBytes (Files_Rider *r, LONGINT *r__typ, SYSTEM_BYTE *x, LONGINT x
} else {
min = n;
}
__MOVE((SYSTEM_ADRINT)buf->data + offset, (SYSTEM_ADRINT)x + xpos, min);
__MOVE((uintptr)buf->data + offset, (uintptr)x + xpos, min);
offset += min;
(*r).offset = offset;
xpos += min;
@ -722,7 +722,7 @@ void Files_WriteBytes (Files_Rider *r, LONGINT *r__typ, SYSTEM_BYTE *x, LONGINT
} else {
min = n;
}
__MOVE((SYSTEM_ADRINT)x + xpos, (SYSTEM_ADRINT)buf->data + offset, min);
__MOVE((uintptr)x + xpos, (uintptr)buf->data + offset, min);
offset += min;
(*r).offset = offset;
if (offset > buf->size) {
@ -773,15 +773,15 @@ void Files_Rename (CHAR *old, LONGINT old__len, CHAR *new, LONGINT new__len, int
*res = 3;
return;
}
error = Platform_Read(fdold, (SYSTEM_ADRINT)buf, 4096, &n);
error = Platform_Read(fdold, (uintptr)buf, 4096, &n);
while (n > 0) {
error = Platform_Write(fdnew, (SYSTEM_ADRINT)buf, n);
error = Platform_Write(fdnew, (uintptr)buf, n);
if (error != 0) {
ignore = Platform_Close(fdold);
ignore = Platform_Close(fdnew);
Files_Err((CHAR*)"cannot move file", 17, NIL, error);
}
error = Platform_Read(fdold, (SYSTEM_ADRINT)buf, 4096, &n);
error = Platform_Read(fdold, (uintptr)buf, 4096, &n);
}
ignore = Platform_Close(fdold);
ignore = Platform_Close(fdnew);
@ -839,7 +839,7 @@ static void Files_FlipBytes (SYSTEM_BYTE *src, LONGINT src__len, SYSTEM_BYTE *de
j += 1;
}
} else {
__MOVE((SYSTEM_ADRINT)src, (SYSTEM_ADRINT)dest, src__len);
__MOVE((uintptr)src, (uintptr)dest, src__len);
}
}
@ -1009,7 +1009,7 @@ static void Files_Finalize (SYSTEM_PTR o)
{
Files_File f = NIL;
int64 res;
f = (Files_File)(SYSTEM_ADRINT)o;
f = (Files_File)(uintptr)o;
if (f->fd >= 0) {
Files_CloseOSFile(f);
if (f->tempFile) {
@ -1022,7 +1022,7 @@ void Files_SetSearchPath (CHAR *path, LONGINT path__len)
{
__DUP(path, path__len, CHAR);
if (Strings_Length(path, path__len) != 0) {
Files_SearchPath = __NEWARR(NIL, 1, 1, 1, 1, ((SYSTEM_ADRINT)((Strings_Length(path, path__len) + 1))));
Files_SearchPath = __NEWARR(NIL, 1, 1, 1, 1, ((uintptr)((Strings_Length(path, path__len) + 1))));
__COPY(path, Files_SearchPath->data, Files_SearchPath->len[0]);
} else {
Files_SearchPath = NIL;

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin tspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin tspkaSfF */
#ifndef Files__h
#define Files__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin tskSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin tskSfF */
#define LARGE
#include "SYSTEM.h"
@ -35,7 +35,7 @@ typedef
typedef
struct Heap_FinDesc {
Heap_FinNode next;
int64 obj;
uintptr obj;
BOOLEAN marked;
Heap_Finalizer finalize;
} Heap_FinDesc;
@ -61,10 +61,10 @@ typedef
export SYSTEM_PTR Heap_modules;
static int64 Heap_freeList[10];
static int64 Heap_bigBlocks;
export int64 Heap_allocated;
export uintptr Heap_allocated;
static BOOLEAN Heap_firstTry;
static int64 Heap_heap, Heap_heapend;
export int64 Heap_heapsize;
static uintptr Heap_heap, Heap_heapend;
export uintptr Heap_heapsize;
static Heap_FinNode Heap_fin;
static int32 Heap_lockdepth;
static BOOLEAN Heap_interrupted;
@ -88,12 +88,12 @@ static void Heap_Mark (int64 q);
static void Heap_MarkCandidates (int64 n, int64 *cand, LONGINT cand__len);
static void Heap_MarkP (SYSTEM_PTR p);
static void Heap_MarkStack (int64 n, int64 *cand, LONGINT cand__len);
export SYSTEM_PTR Heap_NEWBLK (int64 size);
export SYSTEM_PTR Heap_NEWREC (int64 tag);
static int64 Heap_NewChunk (int64 blksz);
export SYSTEM_PTR Heap_NEWBLK (uintptr size);
export SYSTEM_PTR Heap_NEWREC (uintptr tag);
static uintptr Heap_NewChunk (uintptr blksz);
export void Heap_REGCMD (Heap_Module m, Heap_CmdName name, Heap_Command cmd);
export SYSTEM_PTR Heap_REGMOD (Heap_ModuleName name, Heap_EnumProc enumPtrs);
export void Heap_REGTYP (Heap_Module m, int64 typ);
export void Heap_REGTYP (Heap_Module m, uintptr typ);
export void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize);
static void Heap_Scan (void);
static void Heap_Sift (int64 l, int64 r, int64 *a, LONGINT a__len);
@ -102,7 +102,7 @@ export void Heap_Unlock (void);
extern void *Heap__init();
extern LONGINT Platform_MainStackFrame;
extern uintptr Platform_OSAllocate(uintptr size);
#define Heap_FetchAddress(pointer) (LONGINT)(SYSTEM_ADRINT)(*((void**)((SYSTEM_ADRINT)pointer)))
#define Heap_FetchAddress(pointer) (uintptr)(*((void**)((uintptr)pointer)))
#define Heap_HeapModuleInit() Heap__init()
#define Heap_OSAllocate(size) Platform_OSAllocate(size)
#define Heap_PlatformHalt(code) Platform_Halt(code)
@ -135,7 +135,7 @@ SYSTEM_PTR Heap_REGMOD (Heap_ModuleName name, Heap_EnumProc enumPtrs)
__COPY(name, m->name, 20);
m->refcnt = 0;
m->enumPtrs = enumPtrs;
m->next = (Heap_Module)(SYSTEM_ADRINT)Heap_modules;
m->next = (Heap_Module)(uintptr)Heap_modules;
Heap_modules = (SYSTEM_PTR)m;
_o_result = (void*)m;
return _o_result;
@ -155,7 +155,7 @@ void Heap_REGCMD (Heap_Module m, Heap_CmdName name, Heap_Command cmd)
m->cmds = c;
}
void Heap_REGTYP (Heap_Module m, int64 typ)
void Heap_REGTYP (Heap_Module m, uintptr typ)
{
__PUT(typ, m->types, int64);
m->types = typ;
@ -166,15 +166,15 @@ void Heap_INCREF (Heap_Module m)
m->refcnt += 1;
}
static int64 Heap_NewChunk (int64 blksz)
static uintptr Heap_NewChunk (uintptr blksz)
{
int64 _o_result;
int64 chnk;
uintptr _o_result;
uintptr chnk;
chnk = Heap_OSAllocate(blksz + 24);
if (chnk != 0) {
__PUT(chnk + 8, chnk + (24 + blksz), int64);
__PUT(chnk + 24, chnk + 32, int64);
__PUT(chnk + 32, blksz, int64);
__PUT(chnk + 8, chnk + (24 + blksz), uintptr);
__PUT(chnk + 24, chnk + 32, uintptr);
__PUT(chnk + 32, blksz, uintptr);
__PUT(chnk + 40, -8, int64);
__PUT(chnk + 48, Heap_bigBlocks, int64);
Heap_bigBlocks = chnk + 24;
@ -195,7 +195,7 @@ static void Heap_ExtendHeap (int64 blksz)
chnk = Heap_NewChunk(size);
if (chnk != 0) {
if (chnk < Heap_heap) {
__PUT(chnk, Heap_heap, int64);
__PUT(chnk, Heap_heap, uintptr);
Heap_heap = chnk;
} else {
j = Heap_heap;
@ -213,10 +213,10 @@ static void Heap_ExtendHeap (int64 blksz)
}
}
SYSTEM_PTR Heap_NEWREC (int64 tag)
SYSTEM_PTR Heap_NEWREC (uintptr tag)
{
SYSTEM_PTR _o_result;
int64 i, i0, di, blksz, restsize, t, adr, end, next, prev;
uintptr i, i0, di, blksz, restsize, t, adr, end, next, prev;
SYSTEM_PTR new;
Heap_Lock();
blksz = Heap_FetchAddress(tag);
@ -236,10 +236,10 @@ SYSTEM_PTR Heap_NEWREC (int64 tag)
di = i - i0;
restsize = __ASHL(di, 5);
end = adr + restsize;
__PUT(end + 8, blksz, int64);
__PUT(end + 8, blksz, uintptr);
__PUT(end + 16, -8, int64);
__PUT(end, end + 8, int64);
__PUT(adr + 8, restsize, int64);
__PUT(adr + 8, restsize, uintptr);
__PUT(adr + 24, Heap_freeList[di], int64);
Heap_freeList[di] = adr;
adr += restsize;
@ -280,21 +280,21 @@ SYSTEM_PTR Heap_NEWREC (int64 tag)
}
restsize = t - blksz;
end = adr + restsize;
__PUT(end + 8, blksz, int64);
__PUT(end + 8, blksz, uintptr);
__PUT(end + 16, -8, int64);
__PUT(end, end + 8, int64);
if (restsize > 288) {
__PUT(adr + 8, restsize, int64);
__PUT(adr + 8, restsize, uintptr);
} else {
next = Heap_FetchAddress(adr + 24);
if (prev == 0) {
Heap_bigBlocks = next;
} else {
__PUT(prev + 24, next, int64);
__PUT(prev + 24, next, uintptr);
}
if (restsize > 0) {
di = __ASHR(restsize, 5);
__PUT(adr + 8, restsize, int64);
__PUT(adr + 8, restsize, uintptr);
__PUT(adr + 24, Heap_freeList[di], int64);
Heap_freeList[di] = adr;
}
@ -311,28 +311,28 @@ SYSTEM_PTR Heap_NEWREC (int64 tag)
i += 32;
}
__PUT(adr + 24, 0, int64);
__PUT(adr, tag, int64);
__PUT(adr, tag, uintptr);
__PUT(adr + 8, 0, int64);
__PUT(adr + 16, 0, int64);
Heap_allocated += blksz;
Heap_Unlock();
_o_result = (SYSTEM_PTR)(SYSTEM_ADRINT)(adr + 8);
_o_result = (SYSTEM_PTR)(uintptr)(adr + 8);
return _o_result;
}
SYSTEM_PTR Heap_NEWBLK (int64 size)
SYSTEM_PTR Heap_NEWBLK (uintptr size)
{
SYSTEM_PTR _o_result;
int64 blksz, tag;
uintptr blksz, tag;
SYSTEM_PTR new;
Heap_Lock();
blksz = __ASHL(__ASHR(size + 63, 5), 5);
new = Heap_NEWREC((SYSTEM_ADRINT)&blksz);
tag = ((int64)(SYSTEM_ADRINT)new + blksz) - 24;
new = Heap_NEWREC((uintptr)&blksz);
tag = (((int64)(uintptr)new) + blksz) - 24;
__PUT(tag - 8, 0, int64);
__PUT(tag, blksz, int64);
__PUT(tag, blksz, uintptr);
__PUT(tag + 8, -8, int64);
__PUT((int64)(SYSTEM_ADRINT)new - 8, tag, int64);
__PUT((int64)(uintptr)new - 8, tag, uintptr);
Heap_Unlock();
_o_result = new;
return _o_result;
@ -361,7 +361,7 @@ static void Heap_Mark (int64 q)
__GET(tag, offset, int64);
fld = q + offset;
p = Heap_FetchAddress(fld);
__PUT(fld, (SYSTEM_PTR)(SYSTEM_ADRINT)n, SYSTEM_PTR);
__PUT(fld, (SYSTEM_PTR)(uintptr)n, SYSTEM_PTR);
} else {
fld = q + offset;
n = Heap_FetchAddress(fld);
@ -370,7 +370,7 @@ static void Heap_Mark (int64 q)
if (!__ODD(tagbits)) {
__PUT(n - 8, tagbits + 1, int64);
__PUT(q - 8, tag + 1, int64);
__PUT(fld, (SYSTEM_PTR)(SYSTEM_ADRINT)p, SYSTEM_PTR);
__PUT(fld, (SYSTEM_PTR)(uintptr)p, SYSTEM_PTR);
p = q;
q = n;
tag = tagbits;
@ -385,12 +385,12 @@ static void Heap_Mark (int64 q)
static void Heap_MarkP (SYSTEM_PTR p)
{
Heap_Mark((int64)(SYSTEM_ADRINT)p);
Heap_Mark((int64)(uintptr)p);
}
static void Heap_Scan (void)
{
int64 chnk, adr, end, start, tag, i, size, freesize;
uintptr chnk, adr, end, start, tag, i, size, freesize;
Heap_bigBlocks = 0;
i = 1;
while (i < 9) {
@ -408,8 +408,8 @@ static void Heap_Scan (void)
if (__ODD(tag)) {
if (freesize > 0) {
start = adr - freesize;
__PUT(start, start + 8, int64);
__PUT(start + 8, freesize, int64);
__PUT(start, start + 8, uintptr);
__PUT(start + 8, freesize, uintptr);
__PUT(start + 16, -8, int64);
i = __ASHR(freesize, 5);
freesize = 0;
@ -422,7 +422,7 @@ static void Heap_Scan (void)
}
}
tag -= 1;
__PUT(adr, tag, int64);
__PUT(adr, tag, uintptr);
size = Heap_FetchAddress(tag);
Heap_allocated += size;
adr += size;
@ -434,8 +434,8 @@ static void Heap_Scan (void)
}
if (freesize > 0) {
start = adr - freesize;
__PUT(start, start + 8, int64);
__PUT(start + 8, freesize, int64);
__PUT(start, start + 8, uintptr);
__PUT(start + 8, freesize, uintptr);
__PUT(start + 16, -8, int64);
i = __ASHR(freesize, 5);
freesize = 0;
@ -554,7 +554,7 @@ static void Heap_Finalize (void)
} else {
prev->next = n->next;
}
(*n->finalize)((SYSTEM_PTR)(SYSTEM_ADRINT)n->obj);
(*n->finalize)((SYSTEM_PTR)(uintptr)n->obj);
if (prev == NIL) {
n = Heap_fin;
} else {
@ -573,7 +573,7 @@ void Heap_FINALL (void)
while (Heap_fin != NIL) {
n = Heap_fin;
Heap_fin = Heap_fin->next;
(*n->finalize)((SYSTEM_PTR)(SYSTEM_ADRINT)n->obj);
(*n->finalize)((SYSTEM_PTR)(uintptr)n->obj);
}
}
@ -590,9 +590,9 @@ static void Heap_MarkStack (int64 n, int64 *cand, LONGINT cand__len)
}
if (n == 0) {
nofcand = 0;
sp = (SYSTEM_ADRINT)&frame;
sp = (uintptr)&frame;
stack0 = Heap_PlatformMainStackFrame();
inc = (SYSTEM_ADRINT)&align.p - (SYSTEM_ADRINT)&align;
inc = (uintptr)&align.p - (uintptr)&align;
if (sp > stack0) {
inc = -inc;
}
@ -623,7 +623,7 @@ void Heap_GC (BOOLEAN markStack)
int64 cand[10000];
if (Heap_lockdepth == 0 || (Heap_lockdepth == 1 && !markStack)) {
Heap_Lock();
m = (Heap_Module)(SYSTEM_ADRINT)Heap_modules;
m = (Heap_Module)(uintptr)Heap_modules;
while (m != NIL) {
if (m->enumPtrs != NIL) {
(*m->enumPtrs)(Heap_MarkP);
@ -700,7 +700,7 @@ void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize)
{
Heap_FinNode f;
__NEW(f, Heap_FinDesc);
f->obj = (int64)(SYSTEM_ADRINT)obj;
f->obj = (int64)(uintptr)obj;
f->finalize = finalize;
f->marked = 1;
f->next = Heap_fin;

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin tskSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin tskSfF */
#ifndef Heap__h
#define Heap__h
@ -32,7 +32,7 @@ typedef
import SYSTEM_PTR Heap_modules;
import int64 Heap_allocated, Heap_heapsize;
import uintptr Heap_allocated, Heap_heapsize;
import int32 Heap_FileCount;
import LONGINT *Heap_ModuleDesc__typ;
@ -42,11 +42,11 @@ import void Heap_GC (BOOLEAN markStack);
import void Heap_INCREF (Heap_Module m);
import void Heap_InitHeap (void);
import void Heap_Lock (void);
import SYSTEM_PTR Heap_NEWBLK (int64 size);
import SYSTEM_PTR Heap_NEWREC (int64 tag);
import SYSTEM_PTR Heap_NEWBLK (uintptr size);
import SYSTEM_PTR Heap_NEWREC (uintptr tag);
import void Heap_REGCMD (Heap_Module m, Heap_CmdName name, Heap_Command cmd);
import SYSTEM_PTR Heap_REGMOD (Heap_ModuleName name, Heap_EnumProc enumPtrs);
import void Heap_REGTYP (Heap_Module m, int64 typ);
import void Heap_REGTYP (Heap_Module m, uintptr typ);
import void Heap_RegisterFinalizer (SYSTEM_PTR obj, Heap_Finalizer finalize);
import void Heap_Unlock (void);
import void *Heap__init(void);

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#define LARGE
#include "SYSTEM.h"
#include "Console.h"

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Modules__h
#define Modules__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#define LARGE
#include "SYSTEM.h"
#include "OPM.h"
@ -2197,7 +2197,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno)
if (((x->class == 8 || x->class == 9) || __IN(f, 0x0501)) || x->typ->comp == 3) {
OPB_err(126);
}
if (x->typ->size < p->typ->size) {
if ((x->class != 7 && x->typ->size < p->typ->size)) {
OPB_err(-308);
}
t = OPT_NewNode(11);

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPB__h
#define OPB__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#define LARGE
#include "SYSTEM.h"
#include "Configuration.h"

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPC__h
#define OPC__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#define LARGE
#include "SYSTEM.h"
#include "Configuration.h"
@ -545,7 +545,7 @@ void OPM_FPrintReal (int64 *fp, REAL real)
{
int32 i;
int64 l;
__GET((SYSTEM_ADRINT)&real, i, int32);
__GET((uintptr)&real, i, int32);
l = i;
OPM_FPrint(&*fp, l);
}

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPM__h
#define OPM__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#define LARGE
#include "SYSTEM.h"
#include "OPB.h"

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPP__h
#define OPP__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin tspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin tspkaSfF */
#define LARGE
#include "SYSTEM.h"
#include "OPM.h"

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin tspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin tspkaSfF */
#ifndef OPS__h
#define OPS__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#define LARGE
#include "SYSTEM.h"
#include "OPM.h"

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPT__h
#define OPT__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#define LARGE
#include "SYSTEM.h"
#include "OPC.h"
@ -940,7 +940,7 @@ static void OPV_expr (OPT_Node n, int32 prec)
OPM_Write(')');
break;
case 24:
OPM_WriteString((CHAR*)"(SYSTEM_ADRINT)", 16);
OPM_WriteString((CHAR*)"(uintptr)", 10);
if (l->class == 1) {
OPC_CompleteIdent(l->obj);
} else {
@ -956,7 +956,7 @@ static void OPV_expr (OPT_Node n, int32 prec)
OPC_Ident(n->typ->strobj);
OPM_Write(')');
if (__IN(n->typ->form, 0x1800) || __IN(l->typ->form, 0x1800)) {
OPM_WriteString((CHAR*)"(SYSTEM_ADRINT)", 16);
OPM_WriteString((CHAR*)"(uintptr)", 10);
}
OPV_expr(l, exprPrec);
} else {
@ -1328,7 +1328,7 @@ static void OPV_NewArr (OPT_Node d, OPT_Node x)
if (x->class == 7) {
OPC_IntLiteral(x->conval->intval, OPM_PointerSize);
} else {
OPM_WriteString((CHAR*)"((SYSTEM_ADRINT)(", 18);
OPM_WriteString((CHAR*)"((uintptr)(", 12);
OPV_expr(x, 10);
OPM_WriteString((CHAR*)"))", 3);
}

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#ifndef OPV__h
#define OPV__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#define LARGE
#include "SYSTEM.h"
@ -242,7 +242,7 @@ void Platform_Init (int32 argc, int64 argvadr)
Platform_ArgVecPtr av = NIL;
Platform_MainStackFrame = argvadr;
Platform_ArgCount = argc;
av = (Platform_ArgVecPtr)(SYSTEM_ADRINT)argvadr;
av = (Platform_ArgVecPtr)(uintptr)argvadr;
Platform_ArgVector = (*av)[0];
Platform_HaltCode = -128;
Platform_HeapInitHeap();
@ -281,7 +281,7 @@ void Platform_GetArg (int32 n, CHAR *val, LONGINT val__len)
{
Platform_ArgVec av = NIL;
if (n < Platform_ArgCount) {
av = (Platform_ArgVec)(SYSTEM_ADRINT)Platform_ArgVector;
av = (Platform_ArgVec)(uintptr)Platform_ArgVector;
__COPY(*(*av)[__X(n, 1024)], val, val__len);
}
}
@ -560,7 +560,7 @@ int32 Platform_ReadBuf (int64 h, SYSTEM_BYTE *b, LONGINT b__len, int64 *n)
int32 _o_result;
int32 result;
*n = 0;
result = Platform_readfile(h, (SYSTEM_ADRINT)b, b__len, &*n);
result = Platform_readfile(h, (uintptr)b, b__len, &*n);
if (result == 0) {
*n = 0;
_o_result = Platform_err();
@ -796,7 +796,7 @@ static void Platform_TestLittleEndian (void)
{
int32 i;
i = 1;
__GET((SYSTEM_ADRINT)&i, Platform_LittleEndian, BOOLEAN);
__GET((uintptr)&i, Platform_LittleEndian, BOOLEAN);
}
__TDESC(Platform_FileIdentity, 1, 0) = {__TDFLDS("FileIdentity", 40), {-8}};

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Platform__h
#define Platform__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#define LARGE
#include "SYSTEM.h"
@ -59,7 +59,7 @@ int32 Reals_Expo (REAL x)
{
int32 _o_result;
int32 i;
__GET((SYSTEM_ADRINT)&x + 2, i, int32);
__GET((uintptr)&x + 2, i, int32);
_o_result = __MASK(__ASHR(i, 7), -256);
return _o_result;
}
@ -67,17 +67,17 @@ int32 Reals_Expo (REAL x)
void Reals_SetExpo (REAL *x, int32 ex)
{
CHAR c;
__GET((SYSTEM_ADRINT)x + 3, c, CHAR);
__PUT((SYSTEM_ADRINT)x + 3, (CHAR)(__ASHL(__ASHR(c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR);
__GET((SYSTEM_ADRINT)x + 2, c, CHAR);
__PUT((SYSTEM_ADRINT)x + 2, (CHAR)(__MASK(c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR);
__GET((uintptr)x + 3, c, CHAR);
__PUT((uintptr)x + 3, (CHAR)(__ASHL(__ASHR(c, 7), 7) + __MASK(__ASHR(ex, 1), -128)), CHAR);
__GET((uintptr)x + 2, c, CHAR);
__PUT((uintptr)x + 2, (CHAR)(__MASK(c, -128) + __ASHL(__MASK(ex, -2), 7)), CHAR);
}
int32 Reals_ExpoL (LONGREAL x)
{
int32 _o_result;
int32 i;
__GET((SYSTEM_ADRINT)&x + 6, i, int32);
__GET((uintptr)&x + 6, i, int32);
_o_result = __MASK(__ASHR(i, 4), -2048);
return _o_result;
}

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Reals__h
#define Reals__h

View file

@ -39,8 +39,8 @@ typedef unsigned short int uint16;
typedef signed char int8;
typedef unsigned char uint8;
#define uintptr size_t
//#define uintptr size_t
#define uintptr int64
// The compiler uses 'import' and 'export' which translate to 'extern' and
// nothing respectively.
@ -255,8 +255,8 @@ extern void Platform_AssertFail(LONGINT x);
// Memory allocation
extern SYSTEM_PTR Heap_NEWBLK (LONGINT size);
extern SYSTEM_PTR Heap_NEWREC (LONGINT tag);
extern SYSTEM_PTR Heap_NEWBLK (uintptr size);
extern SYSTEM_PTR Heap_NEWREC (uintptr tag);
extern SYSTEM_PTR SYSTEM_NEWARR(LONGINT*, LONGINT, int, int, int, ...);
#define __SYSNEW(p, len) p = Heap_NEWBLK((LONGINT)(len))

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#define LARGE
#include "SYSTEM.h"

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Strings__h
#define Strings__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#define LARGE
#include "SYSTEM.h"
#include "Files.h"

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#ifndef Texts__h
#define Texts__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkamSf */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkamSf */
#define LARGE
#include "SYSTEM.h"
#include "Configuration.h"

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#define LARGE
#include "SYSTEM.h"

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#ifndef errors__h
#define errors__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#define LARGE
#include "SYSTEM.h"
#include "Configuration.h"

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#ifndef extTools__h
#define extTools__h

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#define LARGE
#include "SYSTEM.h"
#include "Console.h"

View file

@ -1,4 +1,4 @@
/* voc 1.95 [2016/09/02] for gcc LP64 on cygwin xtspkaSfF */
/* voc 1.95 [2016/09/03] for gcc LP64 on cygwin xtspkaSfF */
#ifndef vt100__h
#define vt100__h