mirror of
https://github.com/vishapoberon/compiler.git
synced 2026-04-06 07:32:24 +00:00
Original meaning of VAL restored. Many library files disabled until use of VAL in 64 bits fixed.
This commit is contained in:
parent
8f82f6e47b
commit
80f5e51789
29 changed files with 261 additions and 174 deletions
|
|
@ -864,8 +864,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)(((LONGINT)((int)b[0] + __ASHL((int)b[1], 8)) + __ASHL((LONGINT)b[2], 16)) + __ASHL((LONGINT)b[3], 24));
|
||||
l = ((LONGINT)((int)b[0] + __ASHL((int)b[1], 8)) + __ASHL((LONGINT)b[2], 16)) + __ASHL((LONGINT)b[3], 24);
|
||||
*x = (SET)l;
|
||||
}
|
||||
|
||||
void Files_ReadReal (Files_Rider *R, LONGINT *R__typ, REAL *x)
|
||||
|
|
|
|||
|
|
@ -2237,6 +2237,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;
|
||||
|
|
|
|||
|
|
@ -541,16 +541,16 @@ 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, l, LONGINT);
|
||||
OPM_FPrint(&*fp, l);
|
||||
}
|
||||
|
||||
void OPM_FPrintLReal (LONGINT *fp, LONGREAL lr)
|
||||
{
|
||||
LONGINT l, h;
|
||||
__GET((LONGINT)(uintptr_t)&lr, l, LONGINT);
|
||||
__GET((LONGINT)(uintptr_t)&lr + 4, h, LONGINT);
|
||||
OPM_FPrint(&*fp, l);
|
||||
OPM_FPrint(&*fp, h);
|
||||
OPM_FPrint(&*fp, __VAL(LONGINT, lr));
|
||||
}
|
||||
|
||||
static void OPM_GetProperty (Texts_Scanner *S, LONGINT *S__typ, CHAR *name, LONGINT name__len, INTEGER *size, INTEGER *align)
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue