Original meaning of VAL restored. Many library files disabled until use of VAL in 64 bits fixed.

This commit is contained in:
David Brown 2016-08-16 20:30:05 +01:00
parent 8f82f6e47b
commit 80f5e51789
29 changed files with 261 additions and 174 deletions

View file

@ -865,8 +865,10 @@ void Files_ReadLInt (Files_Rider *R, LONGINT *R__typ, LONGINT *x)
void Files_ReadSet (Files_Rider *R, LONGINT *R__typ, SET *x)
{
CHAR b[4];
LONGINT l;
Files_ReadBytes(&*R, R__typ, (void*)b, ((LONGINT)(4)), ((LONGINT)(4)));
*x = (SET)((((int)b[0] + __ASHL((int)b[1], 8)) + __ASHL((int)b[2], 16)) + __ASHL((int)b[3], 24));
l = (((int)b[0] + __ASHL((int)b[1], 8)) + __ASHL((int)b[2], 16)) + __ASHL((int)b[3], 24);
*x = (SET)l;
}
void Files_ReadReal (Files_Rider *R, LONGINT *R__typ, REAL *x)

View file

@ -2238,6 +2238,9 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, SHORTINT fctno)
if (((x->class == 8 || x->class == 9) || __IN(f, 0x1401)) || x->typ->comp == 3) {
OPB_err(126);
}
if (x->typ->size < p->typ->size) {
OPB_err(-308);
}
t = OPT_NewNode(11);
t->subcl = 29;
t->left = x;

View file

@ -542,7 +542,11 @@ void OPM_FPrintSet (LONGINT *fp, SET set)
void OPM_FPrintReal (LONGINT *fp, REAL real)
{
OPM_FPrint(&*fp, __VAL(LONGINT, real));
INTEGER i;
LONGINT l;
__GET((LONGINT)(uintptr_t)&real, i, INTEGER);
l = i;
OPM_FPrint(&*fp, l);
}
void OPM_FPrintLReal (LONGINT *fp, LONGREAL lr)

View file

@ -134,8 +134,11 @@ static int __str_cmp(CHAR *x, CHAR *y){
/* SYSTEM ops */
#define __VAL(t, x) ((t)(x))
#define __VALP(t, x) ((t)(uintptr_t)(x))
//#define __VAL(t, x) ((t)(x))
//#define __VALP(t, x) ((t)(uintptr_t)(x))
#define __VAL(t, x) (*(t*)&(x))
#define __VALP(t, x) (*(t*)&(x))
#define __GET(a, x, t) x= *(t*)(uintptr_t)(a)
#define __PUT(a, x, t) *(t*)(uintptr_t)(a)=x