mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 08:42:24 +00:00
Some support in makefile for 32 bit model.
This commit is contained in:
parent
b158671cf8
commit
b40dc4e2f8
27 changed files with 141 additions and 116 deletions
|
|
@ -118,10 +118,10 @@ void Console_Hex (int32 i)
|
|||
|
||||
void Console_Read (CHAR *ch)
|
||||
{
|
||||
int32 n;
|
||||
address n;
|
||||
int16 error;
|
||||
Console_Flush();
|
||||
error = Platform_ReadBuf(0, (void*)&*ch, 1, &n);
|
||||
error = Platform_ReadBuf(0, (void*)&*ch, 1, (void*)&n);
|
||||
if (n != 1) {
|
||||
*ch = 0x00;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -663,7 +663,7 @@ void Files_ReadBytes (Files_Rider *r, LONGINT *r__typ, SYSTEM_BYTE *x, LONGINT x
|
|||
} else {
|
||||
min = n;
|
||||
}
|
||||
__MOVE((address)buf->data + offset, (address)x + xpos, min);
|
||||
__MOVE(((address)buf->data) + offset, ((address)x) + xpos, min);
|
||||
offset += min;
|
||||
(*r).offset = offset;
|
||||
xpos += min;
|
||||
|
|
@ -728,7 +728,7 @@ void Files_WriteBytes (Files_Rider *r, LONGINT *r__typ, SYSTEM_BYTE *x, LONGINT
|
|||
} else {
|
||||
min = n;
|
||||
}
|
||||
__MOVE((address)x + xpos, (address)buf->data + offset, min);
|
||||
__MOVE(((address)x) + xpos, ((address)buf->data) + offset, min);
|
||||
offset += min;
|
||||
(*r).offset = offset;
|
||||
if (offset > buf->size) {
|
||||
|
|
|
|||
|
|
@ -639,7 +639,7 @@ void OPB_MOp (int8 op, OPT_Node *x)
|
|||
} else {
|
||||
OPB_err(127);
|
||||
}
|
||||
z->typ = OPT_linttyp;
|
||||
z->typ = OPT_adrtyp;
|
||||
break;
|
||||
case 25:
|
||||
if ((f == 4 && z->class == 7)) {
|
||||
|
|
@ -1938,11 +1938,11 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno)
|
|||
case 24: case 25: case 28: case 31:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) {
|
||||
OPB_Convert(&x, OPT_linttyp);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_adrtyp->size)) {
|
||||
OPB_Convert(&x, OPT_adrtyp);
|
||||
} else if (!((__IN(x->typ->form, 0x0810, 32) && x->typ->size == OPM_AddressSize))) {
|
||||
OPB_err(111);
|
||||
x->typ = OPT_linttyp;
|
||||
x->typ = OPT_adrtyp;
|
||||
}
|
||||
break;
|
||||
case 26: case 27:
|
||||
|
|
@ -2067,7 +2067,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno)
|
|||
x->conval->intval += 1;
|
||||
}
|
||||
p = NewOp__53(12, 19, p, x);
|
||||
p->typ = OPT_linttyp;
|
||||
p->typ = OPT_adrtyp;
|
||||
} else {
|
||||
p = x;
|
||||
p->conval->intval = typ->n;
|
||||
|
|
@ -2211,11 +2211,11 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno)
|
|||
case 31:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) {
|
||||
OPB_Convert(&x, OPT_linttyp);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_adrtyp->size)) {
|
||||
OPB_Convert(&x, OPT_adrtyp);
|
||||
} else if (!((__IN(x->typ->form, 0x0810, 32) && x->typ->size == OPM_AddressSize))) {
|
||||
OPB_err(111);
|
||||
x->typ = OPT_linttyp;
|
||||
x->typ = OPT_adrtyp;
|
||||
}
|
||||
p->link = x;
|
||||
break;
|
||||
|
|
@ -2323,7 +2323,7 @@ void OPB_StFct (OPT_Node *par0, int8 fctno, int16 parno)
|
|||
p = p->left;
|
||||
dim += 1;
|
||||
}
|
||||
OPB_BindNodes(12, OPT_linttyp, &p, OPB_NewIntConst(dim));
|
||||
OPB_BindNodes(12, OPT_adrtyp, &p, OPB_NewIntConst(dim));
|
||||
p->subcl = 19;
|
||||
} else {
|
||||
p = OPB_NewIntConst(p->typ->n);
|
||||
|
|
@ -2450,8 +2450,12 @@ void OPB_Param (OPT_Node ap, OPT_Object fp)
|
|||
OPB_err(111);
|
||||
}
|
||||
} else if ((fp->typ == OPT_sysptrtyp && ap->typ->form == 11)) {
|
||||
} else if ((ap->typ != fp->typ && !((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e, 32) && ap->typ->size == 1)))))) {
|
||||
OPB_err(123);
|
||||
} else if (ap->typ != fp->typ) {
|
||||
if ((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e, 32) && ap->typ->size == 1)))) {
|
||||
} else if ((ap->typ == OPT_adrtyp && fp->typ == OPT_IntType(ap->typ->size))) {
|
||||
} else {
|
||||
OPB_err(123);
|
||||
}
|
||||
} else if ((fp->typ->form == 11 && ap->class == 5)) {
|
||||
OPB_err(123);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ typedef
|
|||
Platform_ArgPtr (*Platform_ArgVec)[1024];
|
||||
|
||||
typedef
|
||||
int32 (*Platform_ArgVecPtr)[1];
|
||||
address (*Platform_ArgVecPtr)[1];
|
||||
|
||||
typedef
|
||||
CHAR (*Platform_EnvPtr)[1024];
|
||||
|
|
@ -83,7 +83,7 @@ export void Platform_SetHalt (Platform_HaltProcedure p);
|
|||
export void Platform_SetInterruptHandler (Platform_SignalHandler handler);
|
||||
export void Platform_SetMTime (Platform_FileIdentity *target, LONGINT *target__typ, Platform_FileIdentity source);
|
||||
export void Platform_SetQuitHandler (Platform_SignalHandler handler);
|
||||
export int16 Platform_Size (int32 h, int32 *l);
|
||||
export int16 Platform_Size (int32 h, address *l);
|
||||
export int16 Platform_Sync (int32 h);
|
||||
export int16 Platform_System (CHAR *cmd, LONGINT cmd__len);
|
||||
static void Platform_TestLittleEndian (void);
|
||||
|
|
@ -155,7 +155,7 @@ extern void Heap_InitHeap();
|
|||
#define Platform_statdev() (LONGINT)s.st_dev
|
||||
#define Platform_statino() (LONGINT)s.st_ino
|
||||
#define Platform_statmtime() (LONGINT)s.st_mtime
|
||||
#define Platform_statsize() (LONGINT)s.st_size
|
||||
#define Platform_statsize() (address)s.st_size
|
||||
#define Platform_structstats() struct stat s
|
||||
#define Platform_system(str, str__len) system((char*)str)
|
||||
#define Platform_tmhour() (LONGINT)time->tm_hour
|
||||
|
|
@ -504,7 +504,7 @@ void Platform_MTimeAsClock (Platform_FileIdentity i, int32 *t, int32 *d)
|
|||
Platform_YMDHMStoClock(Platform_tmyear(), Platform_tmmon(), Platform_tmmday(), Platform_tmhour(), Platform_tmmin(), Platform_tmsec(), &*t, &*d);
|
||||
}
|
||||
|
||||
int16 Platform_Size (int32 h, int32 *l)
|
||||
int16 Platform_Size (int32 h, address *l)
|
||||
{
|
||||
int16 _o_result;
|
||||
Platform_structstats();
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ import void Platform_SetHalt (Platform_HaltProcedure p);
|
|||
import void Platform_SetInterruptHandler (Platform_SignalHandler handler);
|
||||
import void Platform_SetMTime (Platform_FileIdentity *target, LONGINT *target__typ, Platform_FileIdentity source);
|
||||
import void Platform_SetQuitHandler (Platform_SignalHandler handler);
|
||||
import int16 Platform_Size (int32 h, int32 *l);
|
||||
import int16 Platform_Size (int32 h, address *l);
|
||||
import int16 Platform_Sync (int32 h);
|
||||
import int16 Platform_System (CHAR *cmd, LONGINT cmd__len);
|
||||
import int32 Platform_Time (void);
|
||||
|
|
|
|||
|
|
@ -118,10 +118,10 @@ void Console_Hex (int32 i)
|
|||
|
||||
void Console_Read (CHAR *ch)
|
||||
{
|
||||
int32 n;
|
||||
address n;
|
||||
int16 error;
|
||||
Console_Flush();
|
||||
error = Platform_ReadBuf(0, (void*)&*ch, 1, &n);
|
||||
error = Platform_ReadBuf(0, (void*)&*ch, 1, (void*)&n);
|
||||
if (n != 1) {
|
||||
*ch = 0x00;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -663,7 +663,7 @@ void Files_ReadBytes (Files_Rider *r, LONGINT *r__typ, SYSTEM_BYTE *x, LONGINT x
|
|||
} else {
|
||||
min = n;
|
||||
}
|
||||
__MOVE((address)buf->data + offset, (address)x + xpos, min);
|
||||
__MOVE(((address)buf->data) + offset, ((address)x) + xpos, min);
|
||||
offset += min;
|
||||
(*r).offset = offset;
|
||||
xpos += min;
|
||||
|
|
@ -728,7 +728,7 @@ void Files_WriteBytes (Files_Rider *r, LONGINT *r__typ, SYSTEM_BYTE *x, LONGINT
|
|||
} else {
|
||||
min = n;
|
||||
}
|
||||
__MOVE((address)x + xpos, (address)buf->data + offset, min);
|
||||
__MOVE(((address)x) + xpos, ((address)buf->data) + offset, min);
|
||||
offset += min;
|
||||
(*r).offset = offset;
|
||||
if (offset > buf->size) {
|
||||
|
|
|
|||
|
|
@ -639,7 +639,7 @@ void OPB_MOp (int8 op, OPT_Node *x)
|
|||
} else {
|
||||
OPB_err(127);
|
||||
}
|
||||
z->typ = OPT_linttyp;
|
||||
z->typ = OPT_adrtyp;
|
||||
break;
|
||||
case 25:
|
||||
if ((f == 4 && z->class == 7)) {
|
||||
|
|
@ -1938,11 +1938,11 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno)
|
|||
case 24: case 25: case 28: case 31:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) {
|
||||
OPB_Convert(&x, OPT_linttyp);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_adrtyp->size)) {
|
||||
OPB_Convert(&x, OPT_adrtyp);
|
||||
} else if (!((__IN(x->typ->form, 0x0810, 32) && x->typ->size == OPM_AddressSize))) {
|
||||
OPB_err(111);
|
||||
x->typ = OPT_linttyp;
|
||||
x->typ = OPT_adrtyp;
|
||||
}
|
||||
break;
|
||||
case 26: case 27:
|
||||
|
|
@ -2067,7 +2067,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno)
|
|||
x->conval->intval += 1;
|
||||
}
|
||||
p = NewOp__53(12, 19, p, x);
|
||||
p->typ = OPT_linttyp;
|
||||
p->typ = OPT_adrtyp;
|
||||
} else {
|
||||
p = x;
|
||||
p->conval->intval = typ->n;
|
||||
|
|
@ -2211,11 +2211,11 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno)
|
|||
case 31:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) {
|
||||
OPB_Convert(&x, OPT_linttyp);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_adrtyp->size)) {
|
||||
OPB_Convert(&x, OPT_adrtyp);
|
||||
} else if (!((__IN(x->typ->form, 0x0810, 32) && x->typ->size == OPM_AddressSize))) {
|
||||
OPB_err(111);
|
||||
x->typ = OPT_linttyp;
|
||||
x->typ = OPT_adrtyp;
|
||||
}
|
||||
p->link = x;
|
||||
break;
|
||||
|
|
@ -2323,7 +2323,7 @@ void OPB_StFct (OPT_Node *par0, int8 fctno, int16 parno)
|
|||
p = p->left;
|
||||
dim += 1;
|
||||
}
|
||||
OPB_BindNodes(12, OPT_linttyp, &p, OPB_NewIntConst(dim));
|
||||
OPB_BindNodes(12, OPT_adrtyp, &p, OPB_NewIntConst(dim));
|
||||
p->subcl = 19;
|
||||
} else {
|
||||
p = OPB_NewIntConst(p->typ->n);
|
||||
|
|
@ -2450,8 +2450,12 @@ void OPB_Param (OPT_Node ap, OPT_Object fp)
|
|||
OPB_err(111);
|
||||
}
|
||||
} else if ((fp->typ == OPT_sysptrtyp && ap->typ->form == 11)) {
|
||||
} else if ((ap->typ != fp->typ && !((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e, 32) && ap->typ->size == 1)))))) {
|
||||
OPB_err(123);
|
||||
} else if (ap->typ != fp->typ) {
|
||||
if ((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e, 32) && ap->typ->size == 1)))) {
|
||||
} else if ((ap->typ == OPT_adrtyp && fp->typ == OPT_IntType(ap->typ->size))) {
|
||||
} else {
|
||||
OPB_err(123);
|
||||
}
|
||||
} else if ((fp->typ->form == 11 && ap->class == 5)) {
|
||||
OPB_err(123);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ typedef
|
|||
Platform_ArgPtr (*Platform_ArgVec)[1024];
|
||||
|
||||
typedef
|
||||
int32 (*Platform_ArgVecPtr)[1];
|
||||
address (*Platform_ArgVecPtr)[1];
|
||||
|
||||
typedef
|
||||
CHAR (*Platform_EnvPtr)[1024];
|
||||
|
|
@ -83,7 +83,7 @@ export void Platform_SetHalt (Platform_HaltProcedure p);
|
|||
export void Platform_SetInterruptHandler (Platform_SignalHandler handler);
|
||||
export void Platform_SetMTime (Platform_FileIdentity *target, LONGINT *target__typ, Platform_FileIdentity source);
|
||||
export void Platform_SetQuitHandler (Platform_SignalHandler handler);
|
||||
export int16 Platform_Size (int32 h, int32 *l);
|
||||
export int16 Platform_Size (int32 h, address *l);
|
||||
export int16 Platform_Sync (int32 h);
|
||||
export int16 Platform_System (CHAR *cmd, LONGINT cmd__len);
|
||||
static void Platform_TestLittleEndian (void);
|
||||
|
|
@ -155,7 +155,7 @@ extern void Heap_InitHeap();
|
|||
#define Platform_statdev() (LONGINT)s.st_dev
|
||||
#define Platform_statino() (LONGINT)s.st_ino
|
||||
#define Platform_statmtime() (LONGINT)s.st_mtime
|
||||
#define Platform_statsize() (LONGINT)s.st_size
|
||||
#define Platform_statsize() (address)s.st_size
|
||||
#define Platform_structstats() struct stat s
|
||||
#define Platform_system(str, str__len) system((char*)str)
|
||||
#define Platform_tmhour() (LONGINT)time->tm_hour
|
||||
|
|
@ -504,7 +504,7 @@ void Platform_MTimeAsClock (Platform_FileIdentity i, int32 *t, int32 *d)
|
|||
Platform_YMDHMStoClock(Platform_tmyear(), Platform_tmmon(), Platform_tmmday(), Platform_tmhour(), Platform_tmmin(), Platform_tmsec(), &*t, &*d);
|
||||
}
|
||||
|
||||
int16 Platform_Size (int32 h, int32 *l)
|
||||
int16 Platform_Size (int32 h, address *l)
|
||||
{
|
||||
int16 _o_result;
|
||||
Platform_structstats();
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ import void Platform_SetHalt (Platform_HaltProcedure p);
|
|||
import void Platform_SetInterruptHandler (Platform_SignalHandler handler);
|
||||
import void Platform_SetMTime (Platform_FileIdentity *target, LONGINT *target__typ, Platform_FileIdentity source);
|
||||
import void Platform_SetQuitHandler (Platform_SignalHandler handler);
|
||||
import int16 Platform_Size (int32 h, int32 *l);
|
||||
import int16 Platform_Size (int32 h, address *l);
|
||||
import int16 Platform_Sync (int32 h);
|
||||
import int16 Platform_System (CHAR *cmd, LONGINT cmd__len);
|
||||
import int32 Platform_Time (void);
|
||||
|
|
|
|||
|
|
@ -118,10 +118,10 @@ void Console_Hex (int64 i)
|
|||
|
||||
void Console_Read (CHAR *ch)
|
||||
{
|
||||
int64 n;
|
||||
address n;
|
||||
int32 error;
|
||||
Console_Flush();
|
||||
error = Platform_ReadBuf(0, (void*)&*ch, 1, &n);
|
||||
error = Platform_ReadBuf(0, (void*)&*ch, 1, (void*)&n);
|
||||
if (n != 1) {
|
||||
*ch = 0x00;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -663,7 +663,7 @@ void Files_ReadBytes (Files_Rider *r, LONGINT *r__typ, SYSTEM_BYTE *x, LONGINT x
|
|||
} else {
|
||||
min = n;
|
||||
}
|
||||
__MOVE((address)buf->data + offset, (address)x + xpos, min);
|
||||
__MOVE(((address)buf->data) + offset, ((address)x) + xpos, min);
|
||||
offset += min;
|
||||
(*r).offset = offset;
|
||||
xpos += min;
|
||||
|
|
@ -728,7 +728,7 @@ void Files_WriteBytes (Files_Rider *r, LONGINT *r__typ, SYSTEM_BYTE *x, LONGINT
|
|||
} else {
|
||||
min = n;
|
||||
}
|
||||
__MOVE((address)x + xpos, (address)buf->data + offset, min);
|
||||
__MOVE(((address)x) + xpos, ((address)buf->data) + offset, min);
|
||||
offset += min;
|
||||
(*r).offset = offset;
|
||||
if (offset > buf->size) {
|
||||
|
|
|
|||
|
|
@ -639,7 +639,7 @@ void OPB_MOp (int8 op, OPT_Node *x)
|
|||
} else {
|
||||
OPB_err(127);
|
||||
}
|
||||
z->typ = OPT_linttyp;
|
||||
z->typ = OPT_adrtyp;
|
||||
break;
|
||||
case 25:
|
||||
if ((f == 4 && z->class == 7)) {
|
||||
|
|
@ -1938,11 +1938,11 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno)
|
|||
case 24: case 25: case 28: case 31:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) {
|
||||
OPB_Convert(&x, OPT_linttyp);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_adrtyp->size)) {
|
||||
OPB_Convert(&x, OPT_adrtyp);
|
||||
} else if (!((__IN(x->typ->form, 0x0810, 64) && x->typ->size == (int64)OPM_AddressSize))) {
|
||||
OPB_err(111);
|
||||
x->typ = OPT_linttyp;
|
||||
x->typ = OPT_adrtyp;
|
||||
}
|
||||
break;
|
||||
case 26: case 27:
|
||||
|
|
@ -2067,7 +2067,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno)
|
|||
x->conval->intval += 1;
|
||||
}
|
||||
p = NewOp__53(12, 19, p, x);
|
||||
p->typ = OPT_linttyp;
|
||||
p->typ = OPT_adrtyp;
|
||||
} else {
|
||||
p = x;
|
||||
p->conval->intval = typ->n;
|
||||
|
|
@ -2211,11 +2211,11 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno)
|
|||
case 31:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) {
|
||||
OPB_Convert(&x, OPT_linttyp);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_adrtyp->size)) {
|
||||
OPB_Convert(&x, OPT_adrtyp);
|
||||
} else if (!((__IN(x->typ->form, 0x0810, 64) && x->typ->size == (int64)OPM_AddressSize))) {
|
||||
OPB_err(111);
|
||||
x->typ = OPT_linttyp;
|
||||
x->typ = OPT_adrtyp;
|
||||
}
|
||||
p->link = x;
|
||||
break;
|
||||
|
|
@ -2323,7 +2323,7 @@ void OPB_StFct (OPT_Node *par0, int8 fctno, int32 parno)
|
|||
p = p->left;
|
||||
dim += 1;
|
||||
}
|
||||
OPB_BindNodes(12, OPT_linttyp, &p, OPB_NewIntConst(dim));
|
||||
OPB_BindNodes(12, OPT_adrtyp, &p, OPB_NewIntConst(dim));
|
||||
p->subcl = 19;
|
||||
} else {
|
||||
p = OPB_NewIntConst(p->typ->n);
|
||||
|
|
@ -2450,8 +2450,12 @@ void OPB_Param (OPT_Node ap, OPT_Object fp)
|
|||
OPB_err(111);
|
||||
}
|
||||
} else if ((fp->typ == OPT_sysptrtyp && ap->typ->form == 11)) {
|
||||
} else if ((ap->typ != fp->typ && !((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e, 64) && ap->typ->size == 1)))))) {
|
||||
OPB_err(123);
|
||||
} else if (ap->typ != fp->typ) {
|
||||
if ((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e, 64) && ap->typ->size == 1)))) {
|
||||
} else if ((ap->typ == OPT_adrtyp && fp->typ == OPT_IntType(ap->typ->size))) {
|
||||
} else {
|
||||
OPB_err(123);
|
||||
}
|
||||
} else if ((fp->typ->form == 11 && ap->class == 5)) {
|
||||
OPB_err(123);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@ typedef
|
|||
Platform_ArgPtr (*Platform_ArgVec)[1024];
|
||||
|
||||
typedef
|
||||
int64 (*Platform_ArgVecPtr)[1];
|
||||
address (*Platform_ArgVecPtr)[1];
|
||||
|
||||
typedef
|
||||
CHAR (*Platform_EnvPtr)[1024];
|
||||
|
|
@ -83,7 +83,7 @@ export void Platform_SetHalt (Platform_HaltProcedure p);
|
|||
export void Platform_SetInterruptHandler (Platform_SignalHandler handler);
|
||||
export void Platform_SetMTime (Platform_FileIdentity *target, LONGINT *target__typ, Platform_FileIdentity source);
|
||||
export void Platform_SetQuitHandler (Platform_SignalHandler handler);
|
||||
export int32 Platform_Size (int64 h, int64 *l);
|
||||
export int32 Platform_Size (int64 h, address *l);
|
||||
export int32 Platform_Sync (int64 h);
|
||||
export int32 Platform_System (CHAR *cmd, LONGINT cmd__len);
|
||||
static void Platform_TestLittleEndian (void);
|
||||
|
|
@ -155,7 +155,7 @@ extern void Heap_InitHeap();
|
|||
#define Platform_statdev() (LONGINT)s.st_dev
|
||||
#define Platform_statino() (LONGINT)s.st_ino
|
||||
#define Platform_statmtime() (LONGINT)s.st_mtime
|
||||
#define Platform_statsize() (LONGINT)s.st_size
|
||||
#define Platform_statsize() (address)s.st_size
|
||||
#define Platform_structstats() struct stat s
|
||||
#define Platform_system(str, str__len) system((char*)str)
|
||||
#define Platform_tmhour() (LONGINT)time->tm_hour
|
||||
|
|
@ -504,7 +504,7 @@ void Platform_MTimeAsClock (Platform_FileIdentity i, int64 *t, int64 *d)
|
|||
Platform_YMDHMStoClock(Platform_tmyear(), Platform_tmmon(), Platform_tmmday(), Platform_tmhour(), Platform_tmmin(), Platform_tmsec(), &*t, &*d);
|
||||
}
|
||||
|
||||
int32 Platform_Size (int64 h, int64 *l)
|
||||
int32 Platform_Size (int64 h, address *l)
|
||||
{
|
||||
int32 _o_result;
|
||||
Platform_structstats();
|
||||
|
|
|
|||
|
|
@ -67,7 +67,7 @@ import void Platform_SetHalt (Platform_HaltProcedure p);
|
|||
import void Platform_SetInterruptHandler (Platform_SignalHandler handler);
|
||||
import void Platform_SetMTime (Platform_FileIdentity *target, LONGINT *target__typ, Platform_FileIdentity source);
|
||||
import void Platform_SetQuitHandler (Platform_SignalHandler handler);
|
||||
import int32 Platform_Size (int64 h, int64 *l);
|
||||
import int32 Platform_Size (int64 h, address *l);
|
||||
import int32 Platform_Sync (int64 h);
|
||||
import int32 Platform_System (CHAR *cmd, LONGINT cmd__len);
|
||||
import int64 Platform_Time (void);
|
||||
|
|
|
|||
|
|
@ -118,10 +118,10 @@ void Console_Hex (int32 i)
|
|||
|
||||
void Console_Read (CHAR *ch)
|
||||
{
|
||||
int32 n;
|
||||
address n;
|
||||
int16 error;
|
||||
Console_Flush();
|
||||
error = Platform_ReadBuf(Platform_StdIn, (void*)&*ch, 1, &n);
|
||||
error = Platform_ReadBuf(Platform_StdIn, (void*)&*ch, 1, (void*)&n);
|
||||
if (n != 1) {
|
||||
*ch = 0x00;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -663,7 +663,7 @@ void Files_ReadBytes (Files_Rider *r, LONGINT *r__typ, SYSTEM_BYTE *x, LONGINT x
|
|||
} else {
|
||||
min = n;
|
||||
}
|
||||
__MOVE((address)buf->data + offset, (address)x + xpos, min);
|
||||
__MOVE(((address)buf->data) + offset, ((address)x) + xpos, min);
|
||||
offset += min;
|
||||
(*r).offset = offset;
|
||||
xpos += min;
|
||||
|
|
@ -728,7 +728,7 @@ void Files_WriteBytes (Files_Rider *r, LONGINT *r__typ, SYSTEM_BYTE *x, LONGINT
|
|||
} else {
|
||||
min = n;
|
||||
}
|
||||
__MOVE((address)x + xpos, (address)buf->data + offset, min);
|
||||
__MOVE(((address)x) + xpos, ((address)buf->data) + offset, min);
|
||||
offset += min;
|
||||
(*r).offset = offset;
|
||||
if (offset > buf->size) {
|
||||
|
|
|
|||
|
|
@ -639,7 +639,7 @@ void OPB_MOp (int8 op, OPT_Node *x)
|
|||
} else {
|
||||
OPB_err(127);
|
||||
}
|
||||
z->typ = OPT_linttyp;
|
||||
z->typ = OPT_adrtyp;
|
||||
break;
|
||||
case 25:
|
||||
if ((f == 4 && z->class == 7)) {
|
||||
|
|
@ -1938,11 +1938,11 @@ void OPB_StPar0 (OPT_Node *par0, int16 fctno)
|
|||
case 24: case 25: case 28: case 31:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) {
|
||||
OPB_Convert(&x, OPT_linttyp);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_adrtyp->size)) {
|
||||
OPB_Convert(&x, OPT_adrtyp);
|
||||
} else if (!((__IN(x->typ->form, 0x0810, 32) && x->typ->size == OPM_AddressSize))) {
|
||||
OPB_err(111);
|
||||
x->typ = OPT_linttyp;
|
||||
x->typ = OPT_adrtyp;
|
||||
}
|
||||
break;
|
||||
case 26: case 27:
|
||||
|
|
@ -2067,7 +2067,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno)
|
|||
x->conval->intval += 1;
|
||||
}
|
||||
p = NewOp__53(12, 19, p, x);
|
||||
p->typ = OPT_linttyp;
|
||||
p->typ = OPT_adrtyp;
|
||||
} else {
|
||||
p = x;
|
||||
p->conval->intval = typ->n;
|
||||
|
|
@ -2211,11 +2211,11 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno)
|
|||
case 31:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) {
|
||||
OPB_Convert(&x, OPT_linttyp);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_adrtyp->size)) {
|
||||
OPB_Convert(&x, OPT_adrtyp);
|
||||
} else if (!((__IN(x->typ->form, 0x0810, 32) && x->typ->size == OPM_AddressSize))) {
|
||||
OPB_err(111);
|
||||
x->typ = OPT_linttyp;
|
||||
x->typ = OPT_adrtyp;
|
||||
}
|
||||
p->link = x;
|
||||
break;
|
||||
|
|
@ -2323,7 +2323,7 @@ void OPB_StFct (OPT_Node *par0, int8 fctno, int16 parno)
|
|||
p = p->left;
|
||||
dim += 1;
|
||||
}
|
||||
OPB_BindNodes(12, OPT_linttyp, &p, OPB_NewIntConst(dim));
|
||||
OPB_BindNodes(12, OPT_adrtyp, &p, OPB_NewIntConst(dim));
|
||||
p->subcl = 19;
|
||||
} else {
|
||||
p = OPB_NewIntConst(p->typ->n);
|
||||
|
|
@ -2450,8 +2450,12 @@ void OPB_Param (OPT_Node ap, OPT_Object fp)
|
|||
OPB_err(111);
|
||||
}
|
||||
} else if ((fp->typ == OPT_sysptrtyp && ap->typ->form == 11)) {
|
||||
} else if ((ap->typ != fp->typ && !((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e, 32) && ap->typ->size == 1)))))) {
|
||||
OPB_err(123);
|
||||
} else if (ap->typ != fp->typ) {
|
||||
if ((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e, 32) && ap->typ->size == 1)))) {
|
||||
} else if ((ap->typ == OPT_adrtyp && fp->typ == OPT_IntType(ap->typ->size))) {
|
||||
} else {
|
||||
OPB_err(123);
|
||||
}
|
||||
} else if ((fp->typ->form == 11 && ap->class == 5)) {
|
||||
OPB_err(123);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -118,10 +118,10 @@ void Console_Hex (int64 i)
|
|||
|
||||
void Console_Read (CHAR *ch)
|
||||
{
|
||||
int64 n;
|
||||
address n;
|
||||
int32 error;
|
||||
Console_Flush();
|
||||
error = Platform_ReadBuf(Platform_StdIn, (void*)&*ch, 1, &n);
|
||||
error = Platform_ReadBuf(Platform_StdIn, (void*)&*ch, 1, (void*)&n);
|
||||
if (n != 1) {
|
||||
*ch = 0x00;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -663,7 +663,7 @@ void Files_ReadBytes (Files_Rider *r, LONGINT *r__typ, SYSTEM_BYTE *x, LONGINT x
|
|||
} else {
|
||||
min = n;
|
||||
}
|
||||
__MOVE((address)buf->data + offset, (address)x + xpos, min);
|
||||
__MOVE(((address)buf->data) + offset, ((address)x) + xpos, min);
|
||||
offset += min;
|
||||
(*r).offset = offset;
|
||||
xpos += min;
|
||||
|
|
@ -728,7 +728,7 @@ void Files_WriteBytes (Files_Rider *r, LONGINT *r__typ, SYSTEM_BYTE *x, LONGINT
|
|||
} else {
|
||||
min = n;
|
||||
}
|
||||
__MOVE((address)x + xpos, (address)buf->data + offset, min);
|
||||
__MOVE(((address)x) + xpos, ((address)buf->data) + offset, min);
|
||||
offset += min;
|
||||
(*r).offset = offset;
|
||||
if (offset > buf->size) {
|
||||
|
|
|
|||
|
|
@ -639,7 +639,7 @@ void OPB_MOp (int8 op, OPT_Node *x)
|
|||
} else {
|
||||
OPB_err(127);
|
||||
}
|
||||
z->typ = OPT_linttyp;
|
||||
z->typ = OPT_adrtyp;
|
||||
break;
|
||||
case 25:
|
||||
if ((f == 4 && z->class == 7)) {
|
||||
|
|
@ -1938,11 +1938,11 @@ void OPB_StPar0 (OPT_Node *par0, int32 fctno)
|
|||
case 24: case 25: case 28: case 31:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) {
|
||||
OPB_Convert(&x, OPT_linttyp);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_adrtyp->size)) {
|
||||
OPB_Convert(&x, OPT_adrtyp);
|
||||
} else if (!((__IN(x->typ->form, 0x0810, 64) && x->typ->size == (int64)OPM_AddressSize))) {
|
||||
OPB_err(111);
|
||||
x->typ = OPT_linttyp;
|
||||
x->typ = OPT_adrtyp;
|
||||
}
|
||||
break;
|
||||
case 26: case 27:
|
||||
|
|
@ -2067,7 +2067,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno)
|
|||
x->conval->intval += 1;
|
||||
}
|
||||
p = NewOp__53(12, 19, p, x);
|
||||
p->typ = OPT_linttyp;
|
||||
p->typ = OPT_adrtyp;
|
||||
} else {
|
||||
p = x;
|
||||
p->conval->intval = typ->n;
|
||||
|
|
@ -2211,11 +2211,11 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno)
|
|||
case 31:
|
||||
if (x->class == 8 || x->class == 9) {
|
||||
OPB_err(126);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_linttyp->size)) {
|
||||
OPB_Convert(&x, OPT_linttyp);
|
||||
} else if ((((x->class == 7 && f == 4)) && x->typ->size < OPT_adrtyp->size)) {
|
||||
OPB_Convert(&x, OPT_adrtyp);
|
||||
} else if (!((__IN(x->typ->form, 0x0810, 64) && x->typ->size == (int64)OPM_AddressSize))) {
|
||||
OPB_err(111);
|
||||
x->typ = OPT_linttyp;
|
||||
x->typ = OPT_adrtyp;
|
||||
}
|
||||
p->link = x;
|
||||
break;
|
||||
|
|
@ -2323,7 +2323,7 @@ void OPB_StFct (OPT_Node *par0, int8 fctno, int32 parno)
|
|||
p = p->left;
|
||||
dim += 1;
|
||||
}
|
||||
OPB_BindNodes(12, OPT_linttyp, &p, OPB_NewIntConst(dim));
|
||||
OPB_BindNodes(12, OPT_adrtyp, &p, OPB_NewIntConst(dim));
|
||||
p->subcl = 19;
|
||||
} else {
|
||||
p = OPB_NewIntConst(p->typ->n);
|
||||
|
|
@ -2450,8 +2450,12 @@ void OPB_Param (OPT_Node ap, OPT_Object fp)
|
|||
OPB_err(111);
|
||||
}
|
||||
} else if ((fp->typ == OPT_sysptrtyp && ap->typ->form == 11)) {
|
||||
} else if ((ap->typ != fp->typ && !((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e, 64) && ap->typ->size == 1)))))) {
|
||||
OPB_err(123);
|
||||
} else if (ap->typ != fp->typ) {
|
||||
if ((fp->typ->form == 1 && ((__IN(ap->typ->form, 0x1e, 64) && ap->typ->size == 1)))) {
|
||||
} else if ((ap->typ == OPT_adrtyp && fp->typ == OPT_IntType(ap->typ->size))) {
|
||||
} else {
|
||||
OPB_err(123);
|
||||
}
|
||||
} else if ((fp->typ->form == 11 && ap->class == 5)) {
|
||||
OPB_err(123);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue