Use SYSTEM.ADDRESS in libraries. Build all with -O2. Support INC(a,b) for any int a,b that support a:=a+b.

This commit is contained in:
David Brown 2016-09-23 13:04:24 +01:00
parent f1cbbdba28
commit 22a4f8e263
92 changed files with 2752 additions and 2695 deletions

View file

@ -2024,7 +2024,7 @@ void OPB_StPar1 (OPT_Node *par0, OPT_Node x, int8 fctno)
p->typ = OPT_notyp;
} else {
if (x->typ != p->typ) {
if ((x->class == 7 && f == 4)) {
if ((f == 4 && (x->class == 7 || (p->typ->form == 4 && x->typ->size <= p->typ->size)))) {
OPB_Convert(&x, p->typ);
} else {
OPB_err(111);

View file

@ -1124,8 +1124,8 @@ export void *OPM__init(void)
OPM_AddressSize = 8;
OPM_Alignment = 8;
OPM_ShortintSize = 1;
OPM_IntegerSize = 4;
OPM_LongintSize = 8;
OPM_SetSize = 8;
OPM_IntegerSize = 2;
OPM_LongintSize = 4;
OPM_SetSize = 4;
__ENDMOD;
}

View file

@ -92,7 +92,7 @@ export BOOLEAN Platform_TimedOut (int16 e);
export BOOLEAN Platform_TooManyFiles (int16 e);
export int16 Platform_Truncate (int32 h, int32 l);
export int16 Platform_Unlink (CHAR *n, LONGINT n__len);
export int16 Platform_Write (int32 h, address p, address l);
export int16 Platform_Write (int32 h, address p, int32 l);
static void Platform_YMDHMStoClock (int32 ye, int32 mo, int32 da, int32 ho, int32 mi, int32 se, int32 *t, int32 *d);
static void Platform_errch (CHAR c);
static void Platform_errint (int32 l);
@ -144,7 +144,7 @@ extern void Heap_InitHeap();
#define Platform_opennew(n, n__len) open((char*)n, O_CREAT | O_TRUNC | O_RDWR, 0664)
#define Platform_openro(n, n__len) open((char*)n, O_RDONLY)
#define Platform_openrw(n, n__len) open((char*)n, O_RDWR)
#define Platform_readfile(fd, p, l) read(fd, (void*)(address)(p), l)
#define Platform_readfile(fd, p, l) (LONGINT)read(fd, (void*)(address)(p), l)
#define Platform_rename(o, o__len, n, n__len) rename((char*)o, (char*)n)
#define Platform_sectotm(s) struct tm *time = localtime((time_t*)&s)
#define Platform_seekcur() SEEK_CUR
@ -547,7 +547,7 @@ int16 Platform_ReadBuf (int32 h, SYSTEM_BYTE *b, LONGINT b__len, int32 *n)
__RETCHK;
}
int16 Platform_Write (int32 h, address p, address l)
int16 Platform_Write (int32 h, address p, int32 l)
{
int16 _o_result;
address written;

View file

@ -75,7 +75,7 @@ import BOOLEAN Platform_TimedOut (int16 e);
import BOOLEAN Platform_TooManyFiles (int16 e);
import int16 Platform_Truncate (int32 h, int32 l);
import int16 Platform_Unlink (CHAR *n, LONGINT n__len);
import int16 Platform_Write (int32 h, address p, address l);
import int16 Platform_Write (int32 h, address p, int32 l);
import BOOLEAN Platform_getEnv (CHAR *var, LONGINT var__len, CHAR *val, LONGINT val__len);
import void *Platform__init(void);