projects
/
unix-history
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
tags
|
clone url
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
onyx optimizations
[unix-history]
/
usr
/
src
/
usr.bin
/
pascal
/
px
/
interp.c
diff --git
a/usr/src/usr.bin/pascal/px/interp.c
b/usr/src/usr.bin/pascal/px/interp.c
index
4e26669
..
76932f0
100644
(file)
--- a/
usr/src/usr.bin/pascal/px/interp.c
+++ b/
usr/src/usr.bin/pascal/px/interp.c
@@
-1,8
+1,10
@@
/* Copyright (c) 1979 Regents of the University of California */
/* Copyright (c) 1979 Regents of the University of California */
-static char sccsid[] = "@(#)interp.c 1.
4
%G%";
+static char sccsid[] = "@(#)interp.c 1.
10
%G%";
#include <math.h>
#include <math.h>
+#include "whoami.h"
+#include "objfmt.h"
#include "vars.h"
#include "panics.h"
#include "h02opcs.h"
#include "vars.h"
#include "panics.h"
#include "h02opcs.h"
@@
-19,45
+21,35
@@
long _lino = 0;
int _argc;
char **_argv;
long _mode;
int _argc;
char **_argv;
long _mode;
-
long
_runtst = TRUE;
-
long
_nodump = FALSE;
+
bool
_runtst = TRUE;
+
bool
_nodump = FALSE;
long _stlim = 500000;
long _stcnt = 0;
long _seed = 1;
long _stlim = 500000;
long _stcnt = 0;
long _seed = 1;
+#ifdef VAX
char *_minptr = (char *)0x7fffffff;
char *_minptr = (char *)0x7fffffff;
+#else
+char *_minptr = (char *)0xffff;
+#endif VAX
char *_maxptr = (char *)0;
long *_pcpcount = (long *)0;
long _cntrs = 0;
long _rtns = 0;
char *_maxptr = (char *)0;
long *_pcpcount = (long *)0;
long _cntrs = 0;
long _rtns = 0;
-/*
- * file record variables
- */
-long _filefre = PREDEF;
-struct iorechd _fchain = {
- 0, 0, 0, 0, /* only use fchain field */
- INPUT /* fchain */
-};
-struct iorec *_actfile[MAXFILES] = {
- INPUT,
- OUTPUT,
- ERR
-};
-
/*
* standard files
*/
char _inwin, _outwin, _errwin;
/*
* standard files
*/
char _inwin, _outwin, _errwin;
-struct iorechd
input
= {
- &_
inwin,
/* fileptr */
+struct iorechd
_err
= {
+ &_
errwin,
/* fileptr */
0, /* lcount */
0x7fffffff, /* llimit */
0, /* lcount */
0x7fffffff, /* llimit */
- &_iob[
0
], /* fbuf */
-
OUTPUT
, /* fchain */
+ &_iob[
2
], /* fbuf */
+
FILNIL
, /* fchain */
STDLVL, /* flev */
STDLVL, /* flev */
- "
standard input",
/* pfname */
- FTEXT | F
READ | SYNC,
/* funit */
-
0
, /* fblk */
+ "
Message file",
/* pfname */
+ FTEXT | F
WRITE | EOFF,
/* funit */
+
2
, /* fblk */
1 /* fsize */
};
struct iorechd output = {
1 /* fsize */
};
struct iorechd output = {
@@
-72,19
+64,33
@@
struct iorechd output = {
1, /* fblk */
1 /* fsize */
};
1, /* fblk */
1 /* fsize */
};
-struct iorechd
_err
= {
- &_
errwin,
/* fileptr */
+struct iorechd
input
= {
+ &_
inwin,
/* fileptr */
0, /* lcount */
0x7fffffff, /* llimit */
0, /* lcount */
0x7fffffff, /* llimit */
- &_iob[
2
], /* fbuf */
-
FILNIL
, /* fchain */
+ &_iob[
0
], /* fbuf */
+
OUTPUT
, /* fchain */
STDLVL, /* flev */
STDLVL, /* flev */
- "
Message file",
/* pfname */
- FTEXT | F
WRITE | EOFF,
/* funit */
-
2
, /* fblk */
+ "
standard input",
/* pfname */
+ FTEXT | F
READ | SYNC,
/* funit */
+
0
, /* fblk */
1 /* fsize */
};
1 /* fsize */
};
+/*
+ * file record variables
+ */
+long _filefre = PREDEF;
+struct iorechd _fchain = {
+ 0, 0, 0, 0, /* only use fchain field */
+ INPUT /* fchain */
+};
+struct iorec *_actfile[MAXFILES] = {
+ INPUT,
+ OUTPUT,
+ ERR
+};
+
/*
* Px profile array
*/
/*
* Px profile array
*/
@@
-110,17
+116,25
@@
interpreter(base)
/*
* the following variables are used as scratch
*/
/*
* the following variables are used as scratch
*/
-
double td, td1
;
+
register char *tcp
;
register long tl, tl1, tl2;
register long tl, tl1, tl2;
+ double td, td1;
+ struct sze8 t8;
long *tlp;
long *tlp;
-
short *tsp, *tsp1
;
-
register char *tcp
;
+
register short *tsp, *tsp1, ts
;
+
bool tb
;
char *tcp1;
struct stack *tstp;
struct formalrtn *tfp;
union progcntr tpc;
struct iorec **ip;
char *tcp1;
struct stack *tstp;
struct formalrtn *tfp;
union progcntr tpc;
struct iorec **ip;
+ /*
+ * Setup sets up any hardware specific parameters before
+ * starting the interpreter. Typically this is inline replaced
+ * by interp.sed to utilize specific machine instructions.
+ */
+ setup();
/*
* necessary only on systems which do not initialize
* memory to zero
/*
* necessary only on systems which do not initialize
* memory to zero
@@
-130,11
+144,11
@@
interpreter(base)
/*
* set up global environment, then ``call'' the main program
*/
/*
* set up global environment, then ``call'' the main program
*/
- _display.frame[0].locvars = pushsp(
2 * sizeof(struct iorec *
));
- _display.frame[0].locvars +=
8; /* local offsets are negative */
- *(struct iorec **)(_display.frame[0].locvars
- 4
) = OUTPUT;
- *(struct iorec **)(_display.frame[0].locvars
- 8
) = INPUT;
- stp = (struct stack *)pushsp(
sizeof(struct stack
));
+ _display.frame[0].locvars = pushsp(
(long)(2 * sizeof(struct iorec *)
));
+ _display.frame[0].locvars +=
2 * sizeof(struct iorec *);
+ *(struct iorec **)(_display.frame[0].locvars
+ OUTPUT_OFF
) = OUTPUT;
+ *(struct iorec **)(_display.frame[0].locvars
+ INPUT_OFF
) = INPUT;
+ stp = (struct stack *)pushsp(
(long)(sizeof(struct stack)
));
_dp = &_display.frame[0];
pc.cp = base;
for(;;) {
_dp = &_display.frame[0];
pc.cp = base;
for(;;) {
@@
-147,9
+161,6
@@
interpreter(base)
_profcnts[*pc.ucp]++;
# endif PROFILE
switch (*pc.ucp++) {
_profcnts[*pc.ucp]++;
# endif PROFILE
switch (*pc.ucp++) {
- default:
- panic(PBADOP);
- continue;
case O_NODUMP:
_nodump = TRUE;
/* and fall through */
case O_NODUMP:
_nodump = TRUE;
/* and fall through */
@@
-164,15
+175,15
@@
interpreter(base)
disableovrflo();
if (_runtst)
enableovrflo();
disableovrflo();
if (_runtst)
enableovrflo();
- pc.cp += tl + /* skip over proc hdr info */
- sizeof(struct hdr) - 4;
+ pc.cp += (int)tl; /* skip over proc hdr info */
stp->file = curfile; /* save active file */
tcp = pushsp(tl1); /* tcp = new top of stack */
stp->file = curfile; /* save active file */
tcp = pushsp(tl1); /* tcp = new top of stack */
- blkclr(tl1, tcp); /* zero stack frame */
- tcp += tl1; /* offsets of locals are neg */
+ if (_runtst) /* zero stack frame */
+ blkclr(tl1, tcp);
+ tcp += (int)tl1; /* offsets of locals are neg */
_dp->locvars = tcp; /* set new display pointer */
_dp->stp = stp;
_dp->locvars = tcp; /* set new display pointer */
_dp->stp = stp;
- stp->tos = pushsp(
0); /* set top of stack
pointer */
+ stp->tos = pushsp(
(long)0); /* set tos
pointer */
continue;
case O_END:
PCLOSE(_dp->locvars); /* flush & close local files */
continue;
case O_END:
PCLOSE(_dp->locvars); /* flush & close local files */
@@
-197,7
+208,8
@@
interpreter(base)
tcp = base + *pc.lp++;/* calc new entry point */
tcp += sizeof(short);
tcp = base + *(long *)tcp;
tcp = base + *pc.lp++;/* calc new entry point */
tcp += sizeof(short);
tcp = base + *(long *)tcp;
- stp = (struct stack *)pushsp(sizeof(struct stack));
+ stp = (struct stack *)
+ pushsp((long)(sizeof(struct stack)));
stp->lino = _lino; /* save lino, pc, dp */
stp->pc.cp = pc.cp;
stp->dp = _dp;
stp->lino = _lino; /* save lino, pc, dp */
stp->pc.cp = pc.cp;
stp->dp = _dp;
@@
-209,7
+221,8
@@
interpreter(base)
if (tl == 0)
tl = *pc.lp++;
tfp = (struct formalrtn *)popaddr();
if (tl == 0)
tl = *pc.lp++;
tfp = (struct formalrtn *)popaddr();
- stp = (struct stack *)pushsp(sizeof(struct stack));
+ stp = (struct stack *)
+ pushsp((long)(sizeof(struct stack)));
stp->lino = _lino; /* save lino, pc, dp */
stp->pc.cp = pc.cp;
stp->dp = _dp;
stp->lino = _lino; /* save lino, pc, dp */
stp->pc.cp = pc.cp;
stp->dp = _dp;
@@
-226,20
+239,20
@@
interpreter(base)
}
}
_dp = &_display.frame[tfp->cbn];/* new display ptr */
}
}
_dp = &_display.frame[tfp->cbn];/* new display ptr */
- blkcpy(
sizeof(struct disp) * tfp->cbn
,
+ blkcpy(
tfp->cbn * sizeof(struct disp)
,
&_display.frame[1], &tfp->disp[tfp->cbn]);
&_display.frame[1], &tfp->disp[tfp->cbn]);
- blkcpy(
sizeof(struct disp) * tfp->cbn
,
+ blkcpy(
tfp->cbn * sizeof(struct disp)
,
&tfp->disp[0], &_display.frame[1]);
continue;
case O_FRTN:
tl = *pc.cp++; /* tl = size of return obj */
if (tl == 0)
tl = *pc.usp++;
&tfp->disp[0], &_display.frame[1]);
continue;
case O_FRTN:
tl = *pc.cp++; /* tl = size of return obj */
if (tl == 0)
tl = *pc.usp++;
- tcp = pushsp(
0
);
+ tcp = pushsp(
(long)(0)
);
tfp = *(struct formalrtn **)(tcp + tl);
blkcpy(tl, tcp, tcp + sizeof(struct formalrtn *));
tfp = *(struct formalrtn **)(tcp + tl);
blkcpy(tl, tcp, tcp + sizeof(struct formalrtn *));
- popsp(
sizeof(struct formalrtn *
));
- blkcpy(
sizeof(struct disp) * tfp->cbn
,
+ popsp(
(long)(sizeof(struct formalrtn *)
));
+ blkcpy(
tfp->cbn * sizeof(struct disp)
,
&tfp->disp[tfp->cbn], &_display.frame[1]);
continue;
case O_FSAV:
&tfp->disp[tfp->cbn], &_display.frame[1]);
continue;
case O_FSAV:
@@
-248,15
+261,15
@@
interpreter(base)
tcp = base + *pc.lp++;/* calc new entry point */
tcp += sizeof(short);
tfp->entryaddr = base + *(long *)tcp;
tcp = base + *pc.lp++;/* calc new entry point */
tcp += sizeof(short);
tfp->entryaddr = base + *(long *)tcp;
- blkcpy(
sizeof(struct disp) * tfp->cbn
,
+ blkcpy(
tfp->cbn * sizeof(struct disp)
,
&_display.frame[1], &tfp->disp[0]);
pushaddr(tfp);
continue;
case O_SDUP2:
pc.cp++;
tl = pop2();
&_display.frame[1], &tfp->disp[0]);
pushaddr(tfp);
continue;
case O_SDUP2:
pc.cp++;
tl = pop2();
- push2(
tl
);
- push2(
tl
);
+ push2(
(short)(tl)
);
+ push2(
(short)(tl)
);
continue;
case O_SDUP4:
pc.cp++;
continue;
case O_SDUP4:
pc.cp++;
@@
-287,15
+300,19
@@
interpreter(base)
stp = _dp->stp;
}
/* pop locals, stack frame, parms, and return values */
stp = _dp->stp;
}
/* pop locals, stack frame, parms, and return values */
- popsp(
stp->tos - pushsp(0
));
+ popsp(
(long)(stp->tos - pushsp((long)(0))
));
continue;
case O_LINO:
continue;
case O_LINO:
- if (_dp->stp->tos != pushsp(
0
))
+ if (_dp->stp->tos != pushsp(
(long)(0)
))
panic(PSTKNEMP);
_lino = *pc.cp++; /* set line number */
if (_lino == 0)
_lino = *pc.sp++;
panic(PSTKNEMP);
_lino = *pc.cp++; /* set line number */
if (_lino == 0)
_lino = *pc.sp++;
- LINO(); /* inc statement count */
+ if (_runtst) {
+ LINO(); /* inc statement count */
+ continue;
+ }
+ _stcnt++;
continue;
case O_PUSH:
tl = *pc.cp++;
continue;
case O_PUSH:
tl = *pc.cp++;
@@
-303,7
+320,8
@@
interpreter(base)
tl = *pc.usp++;
tl = (-tl + 1) & ~1;
tcp = pushsp(tl);
tl = *pc.usp++;
tl = (-tl + 1) & ~1;
tcp = pushsp(tl);
- blkclr(tl, tcp);
+ if (_runtst)
+ blkclr(tl, tcp);
continue;
case O_IF:
pc.cp++;
continue;
case O_IF:
pc.cp++;
@@
-357,62
+375,62
@@
interpreter(base)
tl2 = *pc.cp++; /* tc has jump opcode */
tl = *pc.usp++; /* tl has comparison length */
tl1 = (tl + 1) & ~1; /* tl1 has arg stack length */
tl2 = *pc.cp++; /* tc has jump opcode */
tl = *pc.usp++; /* tl has comparison length */
tl1 = (tl + 1) & ~1; /* tl1 has arg stack length */
- tcp = pushsp(
0);
/* tcp pts to first arg */
+ tcp = pushsp(
(long)(0));
/* tcp pts to first arg */
switch (tl2) {
case releq:
switch (tl2) {
case releq:
- t
l
= RELEQ(tl, tcp + tl1, tcp);
+ t
b
= RELEQ(tl, tcp + tl1, tcp);
break;
case relne:
break;
case relne:
- t
l
= RELNE(tl, tcp + tl1, tcp);
+ t
b
= RELNE(tl, tcp + tl1, tcp);
break;
case rellt:
break;
case rellt:
- t
l
= RELSLT(tl, tcp + tl1, tcp);
+ t
b
= RELSLT(tl, tcp + tl1, tcp);
break;
case relgt:
break;
case relgt:
- t
l
= RELSGT(tl, tcp + tl1, tcp);
+ t
b
= RELSGT(tl, tcp + tl1, tcp);
break;
case relle:
break;
case relle:
- t
l
= RELSLE(tl, tcp + tl1, tcp);
+ t
b
= RELSLE(tl, tcp + tl1, tcp);
break;
case relge:
break;
case relge:
- t
l
= RELSGE(tl, tcp + tl1, tcp);
+ t
b
= RELSGE(tl, tcp + tl1, tcp);
break;
default:
panic(PSYSTEM);
break;
}
popsp(tl1 << 1);
break;
default:
panic(PSYSTEM);
break;
}
popsp(tl1 << 1);
- push2(
tl
);
+ push2(
(short)(tb)
);
continue;
case O_RELT:
tl2 = *pc.cp++; /* tc has jump opcode */
tl1 = *pc.usp++; /* tl1 has comparison length */
continue;
case O_RELT:
tl2 = *pc.cp++; /* tc has jump opcode */
tl1 = *pc.usp++; /* tl1 has comparison length */
- tcp = pushsp(
0);
/* tcp pts to first arg */
+ tcp = pushsp(
(long)(0));
/* tcp pts to first arg */
switch (tl2) {
case releq:
switch (tl2) {
case releq:
- t
l
= RELEQ(tl1, tcp + tl1, tcp);
+ t
b
= RELEQ(tl1, tcp + tl1, tcp);
break;
case relne:
break;
case relne:
- t
l
= RELNE(tl1, tcp + tl1, tcp);
+ t
b
= RELNE(tl1, tcp + tl1, tcp);
break;
case rellt:
break;
case rellt:
- t
l
= RELTLT(tl1, tcp + tl1, tcp);
+ t
b
= RELTLT(tl1, tcp + tl1, tcp);
break;
case relgt:
break;
case relgt:
- t
l
= RELTGT(tl1, tcp + tl1, tcp);
+ t
b
= RELTGT(tl1, tcp + tl1, tcp);
break;
case relle:
break;
case relle:
- t
l
= RELTLE(tl1, tcp + tl1, tcp);
+ t
b
= RELTLE(tl1, tcp + tl1, tcp);
break;
case relge:
break;
case relge:
- t
l
= RELTGE(tl1, tcp + tl1, tcp);
+ t
b
= RELTGE(tl1, tcp + tl1, tcp);
break;
default:
panic(PSYSTEM);
break;
}
popsp(tl1 << 1);
break;
default:
panic(PSYSTEM);
break;
}
popsp(tl1 << 1);
- push2(
tl
);
+ push2(
(short)(tb)
);
continue;
case O_REL28:
td = pop2();
continue;
case O_REL28:
td = pop2();
@@
-511,15
+529,15
@@
interpreter(base)
continue;
case O_AS8:
pc.cp++;
continue;
case O_AS8:
pc.cp++;
- t
d = pop
8();
- *(
double *)popaddr() = td
;
+ t
8 = popsze
8();
+ *(
struct sze8 *)popaddr() = t8
;
continue;
case O_AS:
tl = *pc.cp++;
if (tl == 0)
tl = *pc.usp++;
tl1 = (tl + 1) & ~1;
continue;
case O_AS:
tl = *pc.cp++;
if (tl == 0)
tl = *pc.usp++;
tl1 = (tl + 1) & ~1;
- tcp = pushsp(
0
);
+ tcp = pushsp(
(long)(0)
);
blkcpy(tl, tcp, *(char **)(tcp + tl1));
popsp(tl1 + sizeof(char *));
continue;
blkcpy(tl, tcp, *(char **)(tcp + tl1));
popsp(tl1 + sizeof(char *));
continue;
@@
-559,7
+577,7
@@
interpreter(base)
tl = *pc.cp++;
if (tl == 0)
tl = *pc.usp++;
tl = *pc.cp++;
if (tl == 0)
tl = *pc.usp++;
- push
4(pop4
() + tl);
+ push
addr(popaddr
() + tl);
continue;
case O_NIL:
pc.cp++;
continue;
case O_NIL:
pc.cp++;
@@
-567,7
+585,7
@@
interpreter(base)
continue;
case O_ADD2:
pc.cp++;
continue;
case O_ADD2:
pc.cp++;
- push4(
pop2() + pop2(
));
+ push4(
(long)(pop2() + pop2()
));
continue;
case O_ADD4:
pc.cp++;
continue;
case O_ADD4:
pc.cp++;
@@
-645,7
+663,7
@@
interpreter(base)
continue;
case O_MUL2:
pc.cp++;
continue;
case O_MUL2:
pc.cp++;
- push4(
pop2() * pop2(
));
+ push4(
(long)(pop2() * pop2()
));
continue;
case O_MUL4:
pc.cp++;
continue;
case O_MUL4:
pc.cp++;
@@
-694,7
+712,7
@@
interpreter(base)
continue;
case O_NEG2:
pc.cp++;
continue;
case O_NEG2:
pc.cp++;
- push4(
-pop2(
));
+ push4(
(long)(-pop2()
));
continue;
case O_NEG4:
pc.cp++;
continue;
case O_NEG4:
pc.cp++;
@@
-764,7
+782,7
@@
interpreter(base)
continue;
case O_STOI:
pc.cp++;
continue;
case O_STOI:
pc.cp++;
- push4(
pop2(
));
+ push4(
(long)(pop2()
));
continue;
case O_STOD:
pc.cp++;
continue;
case O_STOD:
pc.cp++;
@@
-778,7
+796,7
@@
interpreter(base)
continue;
case O_ITOS:
pc.cp++;
continue;
case O_ITOS:
pc.cp++;
- push2(
pop4(
));
+ push2(
(short)(pop4()
));
continue;
case O_DVD2:
pc.cp++;
continue;
case O_DVD2:
pc.cp++;
@@
-822,11
+840,11
@@
interpreter(base)
continue;
case O_RV1:
tcp = _display.raw[*pc.ucp++];
continue;
case O_RV1:
tcp = _display.raw[*pc.ucp++];
- push2(
*(tcp + *pc.sp++
));
+ push2(
(short)(*(tcp + *pc.sp++)
));
continue;
case O_RV14:
tcp = _display.raw[*pc.ucp++];
continue;
case O_RV14:
tcp = _display.raw[*pc.ucp++];
- push4(
*(tcp + *pc.sp++
));
+ push4(
(long)(*(tcp + *pc.sp++)
));
continue;
case O_RV2:
tcp = _display.raw[*pc.ucp++];
continue;
case O_RV2:
tcp = _display.raw[*pc.ucp++];
@@
-834,7
+852,7
@@
interpreter(base)
continue;
case O_RV24:
tcp = _display.raw[*pc.ucp++];
continue;
case O_RV24:
tcp = _display.raw[*pc.ucp++];
- push4(
*(short *)(tcp + *pc.sp++
));
+ push4(
(long)(*(short *)(tcp + *pc.sp++)
));
continue;
case O_RV4:
tcp = _display.raw[*pc.ucp++];
continue;
case O_RV4:
tcp = _display.raw[*pc.ucp++];
@@
-842,13
+860,13
@@
interpreter(base)
continue;
case O_RV8:
tcp = _display.raw[*pc.ucp++];
continue;
case O_RV8:
tcp = _display.raw[*pc.ucp++];
- push
8(*(double
*)(tcp + *pc.sp++));
+ push
sze8(*(struct sze8
*)(tcp + *pc.sp++));
continue;
case O_RV:
tcp = _display.raw[*pc.ucp++];
tcp += *pc.sp++;
tl = *pc.usp++;
continue;
case O_RV:
tcp = _display.raw[*pc.ucp++];
tcp += *pc.sp++;
tl = *pc.usp++;
- tcp1 = pushsp(
tl
);
+ tcp1 = pushsp(
(tl + 1) & ~1
);
blkcpy(tl, tcp, tcp1);
continue;
case O_LV:
blkcpy(tl, tcp, tcp1);
continue;
case O_LV:
@@
-857,11
+875,11
@@
interpreter(base)
continue;
case O_LRV1:
tcp = _display.raw[*pc.ucp++];
continue;
case O_LRV1:
tcp = _display.raw[*pc.ucp++];
- push2(
*(tcp + *pc.lp++
));
+ push2(
(short)(*(tcp + *pc.lp++)
));
continue;
case O_LRV14:
tcp = _display.raw[*pc.ucp++];
continue;
case O_LRV14:
tcp = _display.raw[*pc.ucp++];
- push4(
*(tcp + *pc.lp++
));
+ push4(
(long)(*(tcp + *pc.lp++)
));
continue;
case O_LRV2:
tcp = _display.raw[*pc.ucp++];
continue;
case O_LRV2:
tcp = _display.raw[*pc.ucp++];
@@
-869,7
+887,7
@@
interpreter(base)
continue;
case O_LRV24:
tcp = _display.raw[*pc.ucp++];
continue;
case O_LRV24:
tcp = _display.raw[*pc.ucp++];
- push4(
*(short *)(tcp + *pc.lp++
));
+ push4(
(long)(*(short *)(tcp + *pc.lp++)
));
continue;
case O_LRV4:
tcp = _display.raw[*pc.ucp++];
continue;
case O_LRV4:
tcp = _display.raw[*pc.ucp++];
@@
-877,13
+895,13
@@
interpreter(base)
continue;
case O_LRV8:
tcp = _display.raw[*pc.ucp++];
continue;
case O_LRV8:
tcp = _display.raw[*pc.ucp++];
- push
8(*(double
*)(tcp + *pc.lp++));
+ push
sze8(*(struct sze8
*)(tcp + *pc.lp++));
continue;
case O_LRV:
tcp = _display.raw[*pc.ucp++];
continue;
case O_LRV:
tcp = _display.raw[*pc.ucp++];
- tcp += *pc.lp++;
+ tcp +=
(int)
*pc.lp++;
tl = *pc.usp++;
tl = *pc.usp++;
- tcp1 = pushsp(
tl
);
+ tcp1 = pushsp(
(tl + 1) & ~1
);
blkcpy(tl, tcp, tcp1);
continue;
case O_LLV:
blkcpy(tl, tcp, tcp1);
continue;
case O_LLV:
@@
-892,11
+910,11
@@
interpreter(base)
continue;
case O_IND1:
pc.cp++;
continue;
case O_IND1:
pc.cp++;
- push2(
*popaddr(
));
+ push2(
(short)(*popaddr()
));
continue;
case O_IND14:
pc.cp++;
continue;
case O_IND14:
pc.cp++;
- push4(
*popaddr(
));
+ push4(
(long)(*popaddr()
));
continue;
case O_IND2:
pc.cp++;
continue;
case O_IND2:
pc.cp++;
@@
-904,7
+922,7
@@
interpreter(base)
continue;
case O_IND24:
pc.cp++;
continue;
case O_IND24:
pc.cp++;
- push4(
*(short *)(popaddr(
)));
+ push4(
(long)(*(short *)(popaddr()
)));
continue;
case O_IND4:
pc.cp++;
continue;
case O_IND4:
pc.cp++;
@@
-912,7
+930,7
@@
interpreter(base)
continue;
case O_IND8:
pc.cp++;
continue;
case O_IND8:
pc.cp++;
- push
8(*(double
*)(popaddr()));
+ push
sze8(*(struct sze8
*)(popaddr()));
continue;
case O_IND:
tl = *pc.cp++;
continue;
case O_IND:
tl = *pc.cp++;
@@
-923,10
+941,10
@@
interpreter(base)
blkcpy(tl, tcp, tcp1);
continue;
case O_CON1:
blkcpy(tl, tcp, tcp1);
continue;
case O_CON1:
- push2(
*pc.cp++
);
+ push2(
(short)(*pc.cp++)
);
continue;
case O_CON14:
continue;
case O_CON14:
- push4(
*pc.cp++
);
+ push4(
(long)(*pc.cp++)
);
continue;
case O_CON2:
pc.cp++;
continue;
case O_CON2:
pc.cp++;
@@
-934,7
+952,7
@@
interpreter(base)
continue;
case O_CON24:
pc.cp++;
continue;
case O_CON24:
pc.cp++;
- push4(
*pc.sp++
);
+ push4(
(long)(*pc.sp++)
);
continue;
case O_CON4:
pc.cp++;
continue;
case O_CON4:
pc.cp++;
@@
-942,7
+960,7
@@
interpreter(base)
continue;
case O_CON8:
pc.cp++;
continue;
case O_CON8:
pc.cp++;
- push8(*pc.dp++);
+ push8(*pc.d
b
p++);
continue;
case O_CON:
tl = *pc.cp++;
continue;
case O_CON:
tl = *pc.cp++;
@@
-951,7
+969,16
@@
interpreter(base)
tl = (tl + 1) & ~1;
tcp = pushsp(tl);
blkcpy(tl, pc.cp, tcp);
tl = (tl + 1) & ~1;
tcp = pushsp(tl);
blkcpy(tl, pc.cp, tcp);
- pc.cp += tl;
+ pc.cp += (int)tl;
+ continue;
+ case O_CONG:
+ tl = *pc.cp++;
+ if (tl == 0)
+ tl = *pc.usp++;
+ tl1 = (tl + 1) & ~1;
+ tcp = pushsp(tl1);
+ blkcpy(tl1, pc.cp, tcp);
+ pc.cp += (int)((tl + 2) & ~1);
continue;
case O_LVCON:
tl = *pc.cp++;
continue;
case O_LVCON:
tl = *pc.cp++;
@@
-959,14
+986,14
@@
interpreter(base)
tl = *pc.usp++;
tl = (tl + 1) & ~1;
pushaddr(pc.cp);
tl = *pc.usp++;
tl = (tl + 1) & ~1;
pushaddr(pc.cp);
- pc.cp += tl;
+ pc.cp +=
(int)
tl;
continue;
case O_RANG2:
tl = *pc.cp++;
if (tl == 0)
tl = *pc.sp++;
tl1 = pop2();
continue;
case O_RANG2:
tl = *pc.cp++;
if (tl == 0)
tl = *pc.sp++;
tl1 = pop2();
- push2(
RANG4(tl1, tl, *pc.sp++
));
+ push2(
(short)(RANG4(tl1, tl, *pc.sp++)
));
continue;
case O_RANG42:
tl = *pc.cp++;
continue;
case O_RANG42:
tl = *pc.cp++;
@@
-980,7
+1007,7
@@
interpreter(base)
if (tl == 0)
tl = *pc.sp++;
tl1 = pop2();
if (tl == 0)
tl = *pc.sp++;
tl1 = pop2();
- push2(
RSNG4(tl1, tl
));
+ push2(
(short)(RSNG4(tl1, tl)
));
continue;
case O_RSNG42:
tl = *pc.cp++;
continue;
case O_RSNG42:
tl = *pc.cp++;
@@
-999,7
+1026,7
@@
interpreter(base)
pc.cp++;
tl = *pc.lp++;
tl1 = pop2();
pc.cp++;
tl = *pc.lp++;
tl1 = pop2();
- push2(
RANG4(tl1, tl, *pc.lp++
));
+ push2(
(short)(RANG4(tl1, tl, *pc.lp++)
));
continue;
case O_RSNG4:
pc.cp++;
continue;
case O_RSNG4:
pc.cp++;
@@
-1009,20
+1036,20
@@
interpreter(base)
case O_RSNG24:
pc.cp++;
tl = pop2();
case O_RSNG24:
pc.cp++;
tl = pop2();
- push2(
RSNG4(tl, *pc.lp++
));
+ push2(
(short)(RSNG4(tl, *pc.lp++)
));
continue;
case O_STLIM:
pc.cp++;
STLIM();
continue;
case O_STLIM:
pc.cp++;
STLIM();
- pop
args(1
);
+ pop
sp((long)(sizeof(long))
);
continue;
case O_LLIMIT:
pc.cp++;
LLIMIT();
continue;
case O_LLIMIT:
pc.cp++;
LLIMIT();
- pop
args(2
);
+ pop
sp((long)(sizeof(char *)+sizeof(long))
);
continue;
case O_BUFF:
continue;
case O_BUFF:
- BUFF(
*pc.cp++
);
+ BUFF(
(long)(*pc.cp++)
);
continue;
case O_HALT:
pc.cp++;
continue;
case O_HALT:
pc.cp++;
@@
-1032,7
+1059,7
@@
interpreter(base)
pc.cp++;
_cntrs = *pc.lp++;
_rtns = *pc.lp++;
pc.cp++;
_cntrs = *pc.lp++;
_rtns = *pc.lp++;
-
_pcpcount = (long *)calloc(_cntrs + 1,
sizeof(long));
+
NEWZ(&_pcpcount, (_cntrs + 1) *
sizeof(long));
continue;
case O_COUNT:
pc.cp++;
continue;
case O_COUNT:
pc.cp++;
@@
-1049,7
+1076,7
@@
interpreter(base)
if (tl1 == *tcp++)
break;
if (tl == 0) /* default case => error */
if (tl1 == *tcp++)
break;
if (tl == 0) /* default case => error */
- ERROR(ECASE, tl
2
);
+ ERROR(ECASE, tl
1
);
pc.cp += *(tsp - tl);
continue;
case O_CASE2OP:
pc.cp += *(tsp - tl);
continue;
case O_CASE2OP:
@@
-1063,7
+1090,7
@@
interpreter(base)
if (tl1 == *tsp1++)
break;
if (tl == 0) /* default case => error */
if (tl1 == *tsp1++)
break;
if (tl == 0) /* default case => error */
- ERROR(ECASE, tl
2
);
+ ERROR(ECASE, tl
1
);
pc.cp += *(tsp - tl);
continue;
case O_CASE4OP:
pc.cp += *(tsp - tl);
continue;
case O_CASE4OP:
@@
-1077,14
+1104,14
@@
interpreter(base)
if (tl1 == *tlp++)
break;
if (tl == 0) /* default case => error */
if (tl1 == *tlp++)
break;
if (tl == 0) /* default case => error */
- ERROR(ECASE, tl
2
);
+ ERROR(ECASE, tl
1
);
pc.cp += *(tsp - tl);
continue;
case O_ADDT:
tl = *pc.cp++; /* tl has comparison length */
if (tl == 0)
tl = *pc.usp++;
pc.cp += *(tsp - tl);
continue;
case O_ADDT:
tl = *pc.cp++; /* tl has comparison length */
if (tl == 0)
tl = *pc.usp++;
- tcp = pushsp(
0);
/* tcp pts to first arg */
+ tcp = pushsp(
(long)(0));
/* tcp pts to first arg */
ADDT(tcp + tl, tcp + tl, tcp, tl >> 2);
popsp(tl);
continue;
ADDT(tcp + tl, tcp + tl, tcp, tl >> 2);
popsp(tl);
continue;
@@
-1092,7
+1119,7
@@
interpreter(base)
tl = *pc.cp++; /* tl has comparison length */
if (tl == 0)
tl = *pc.usp++;
tl = *pc.cp++; /* tl has comparison length */
if (tl == 0)
tl = *pc.usp++;
- tcp = pushsp(
0);
/* tcp pts to first arg */
+ tcp = pushsp(
(long)(0));
/* tcp pts to first arg */
SUBT(tcp + tl, tcp + tl, tcp, tl >> 2);
popsp(tl);
continue;
SUBT(tcp + tl, tcp + tl, tcp, tl >> 2);
popsp(tl);
continue;
@@
-1100,7
+1127,7
@@
interpreter(base)
tl = *pc.cp++; /* tl has comparison length */
if (tl == 0)
tl = *pc.usp++;
tl = *pc.cp++; /* tl has comparison length */
if (tl == 0)
tl = *pc.usp++;
- tcp = pushsp(
0);
/* tcp pts to first arg */
+ tcp = pushsp(
(long)(0));
/* tcp pts to first arg */
MULT(tcp + tl, tcp + tl, tcp, tl >> 2);
popsp(tl);
continue;
MULT(tcp + tl, tcp + tl, tcp, tl >> 2);
popsp(tl);
continue;
@@
-1108,46
+1135,47
@@
interpreter(base)
tl = *pc.cp++; /* tl has number of args */
if (tl == 0)
tl = *pc.usp++;
tl = *pc.cp++; /* tl has number of args */
if (tl == 0)
tl = *pc.usp++;
- t
l1
= INCT();
- pop
args(tl
);
- push2(
tl1
);
+ t
b
= INCT();
+ pop
sp(tl*sizeof(long)
);
+ push2(
(short)(tb)
);
continue;
case O_CTTOT:
tl = *pc.cp++; /* tl has number of args */
if (tl == 0)
tl = *pc.usp++;
tl1 = tl * sizeof(long);
continue;
case O_CTTOT:
tl = *pc.cp++; /* tl has number of args */
if (tl == 0)
tl = *pc.usp++;
tl1 = tl * sizeof(long);
- tcp = pushsp(
0) + tl1; /* tcp pts to result space
*/
+ tcp = pushsp(
(long)(0)) + tl1; /* tcp pts to result
*/
CTTOT(tcp);
CTTOT(tcp);
- pop
args(tl
);
+ pop
sp(tl*sizeof(long)
);
continue;
case O_CARD:
tl = *pc.cp++; /* tl has comparison length */
if (tl == 0)
tl = *pc.usp++;
continue;
case O_CARD:
tl = *pc.cp++; /* tl has comparison length */
if (tl == 0)
tl = *pc.usp++;
- tcp = pushsp(
0);
/* tcp pts to set */
+ tcp = pushsp(
(long)(0));
/* tcp pts to set */
tl1 = CARD(tcp, tl);
popsp(tl);
tl1 = CARD(tcp, tl);
popsp(tl);
- push2(
tl1
);
+ push2(
(short)(tl1)
);
continue;
case O_IN:
tl = *pc.cp++; /* tl has comparison length */
if (tl == 0)
tl = *pc.usp++;
tl1 = pop4(); /* tl1 is the element */
continue;
case O_IN:
tl = *pc.cp++; /* tl has comparison length */
if (tl == 0)
tl = *pc.usp++;
tl1 = pop4(); /* tl1 is the element */
- tcp = pushsp(
0);
/* tcp pts to set */
+ tcp = pushsp(
(long)(0));
/* tcp pts to set */
tl2 = *pc.usp++; /* lower bound */
tl2 = *pc.usp++; /* lower bound */
- t
l1 = IN(tl1, tl2, *pc.usp++
, tcp);
+ t
b = IN(tl1, tl2, (long)(*pc.usp++)
, tcp);
popsp(tl);
popsp(tl);
- push2(
tl1
);
+ push2(
(short)(tb)
);
continue;
case O_ASRT:
pc.cp++;
continue;
case O_ASRT:
pc.cp++;
- ASRT(pop2(), "");
+ ts = pop2();
+ ASRT(ts, "");
continue;
case O_FOR1U:
pc.cp++;
continue;
case O_FOR1U:
pc.cp++;
- tcp =
(char *)pop4();
/* tcp = ptr to index var */
+ tcp =
popaddr();
/* tcp = ptr to index var */
if (*tcp < pop4()) { /* still going up */
tl = *tcp + 1; /* inc index var */
tl1 = *pc.sp++; /* index lower bound */
if (*tcp < pop4()) { /* still going up */
tl = *tcp + 1; /* inc index var */
tl1 = *pc.sp++; /* index lower bound */
@@
-1162,7
+1190,7
@@
interpreter(base)
continue;
case O_FOR2U:
pc.cp++;
continue;
case O_FOR2U:
pc.cp++;
- tsp = (short *)pop
4();
/* tsp = ptr to index var */
+ tsp = (short *)pop
addr();
/* tsp = ptr to index var */
if (*tsp < pop4()) { /* still going up */
tl = *tsp + 1; /* inc index var */
tl1 = *pc.sp++; /* index lower bound */
if (*tsp < pop4()) { /* still going up */
tl = *tsp + 1; /* inc index var */
tl1 = *pc.sp++; /* index lower bound */
@@
-1177,7
+1205,7
@@
interpreter(base)
continue;
case O_FOR4U:
pc.cp++;
continue;
case O_FOR4U:
pc.cp++;
- tlp = (long *)pop
4();
/* tlp = ptr to index var */
+ tlp = (long *)pop
addr();
/* tlp = ptr to index var */
if (*tlp < pop4()) { /* still going up */
tl = *tlp + 1; /* inc index var */
tl1 = *pc.lp++; /* index lower bound */
if (*tlp < pop4()) { /* still going up */
tl = *tlp + 1; /* inc index var */
tl1 = *pc.lp++; /* index lower bound */
@@
-1192,7
+1220,7
@@
interpreter(base)
continue;
case O_FOR1D:
pc.cp++;
continue;
case O_FOR1D:
pc.cp++;
- tcp =
(char *)pop4();
/* tcp = ptr to index var */
+ tcp =
popaddr();
/* tcp = ptr to index var */
if (*tcp > pop4()) { /* still going down */
tl = *tcp - 1; /* inc index var */
tl1 = *pc.sp++; /* index lower bound */
if (*tcp > pop4()) { /* still going down */
tl = *tcp - 1; /* inc index var */
tl1 = *pc.sp++; /* index lower bound */
@@
-1207,7
+1235,7
@@
interpreter(base)
continue;
case O_FOR2D:
pc.cp++;
continue;
case O_FOR2D:
pc.cp++;
- tsp = (short *)pop
4();
/* tsp = ptr to index var */
+ tsp = (short *)pop
addr();
/* tsp = ptr to index var */
if (*tsp > pop4()) { /* still going down */
tl = *tsp - 1; /* inc index var */
tl1 = *pc.sp++; /* index lower bound */
if (*tsp > pop4()) { /* still going down */
tl = *tsp - 1; /* inc index var */
tl1 = *pc.sp++; /* index lower bound */
@@
-1222,7
+1250,7
@@
interpreter(base)
continue;
case O_FOR4D:
pc.cp++;
continue;
case O_FOR4D:
pc.cp++;
- tlp = (long *)pop
4();
/* tlp = ptr to index var */
+ tlp = (long *)pop
addr();
/* tlp = ptr to index var */
if (*tlp > pop4()) { /* still going down */
tl = *tlp - 1; /* inc index var */
tl1 = *pc.lp++; /* index lower bound */
if (*tlp > pop4()) { /* still going down */
tl = *tlp - 1; /* inc index var */
tl1 = *pc.lp++; /* index lower bound */
@@
-1237,7
+1265,7
@@
interpreter(base)
continue;
case O_READE:
pc.cp++;
continue;
case O_READE:
pc.cp++;
- push2(
READE(curfile, base + *pc.lp++
));
+ push2(
(short)(READE(curfile, base + *pc.lp++)
));
continue;
case O_READ4:
pc.cp++;
continue;
case O_READ4:
pc.cp++;
@@
-1245,7
+1273,7
@@
interpreter(base)
continue;
case O_READC:
pc.cp++;
continue;
case O_READC:
pc.cp++;
- push2(
READC(curfile
));
+ push2(
(short)(READC(curfile)
));
continue;
case O_READ8:
pc.cp++;
continue;
case O_READ8:
pc.cp++;
@@
-1257,40
+1285,38
@@
interpreter(base)
continue;
case O_EOF:
pc.cp++;
continue;
case O_EOF:
pc.cp++;
- push2(
TEOF(popaddr(
)));
+ push2(
(short)(TEOF(popaddr()
)));
continue;
case O_EOLN:
pc.cp++;
continue;
case O_EOLN:
pc.cp++;
- push2(
TEOLN(popaddr(
)));
+ push2(
(short)(TEOLN(popaddr()
)));
continue;
case O_WRITEC:
continue;
case O_WRITEC:
- pc.cp++;
if (_runtst) {
WRITEC(curfile);
if (_runtst) {
WRITEC(curfile);
- pop
args(2
);
+ pop
sp((long)(*pc.cp++)
);
continue;
}
fputc();
continue;
}
fputc();
- pop
args(2
);
+ pop
sp((long)(*pc.cp++)
);
continue;
case O_WRITES:
continue;
case O_WRITES:
- pc.cp++;
if (_runtst) {
WRITES(curfile);
if (_runtst) {
WRITES(curfile);
- pop
args(4
);
+ pop
sp((long)(*pc.cp++)
);
continue;
}
fwrite();
continue;
}
fwrite();
- pop
args(4
);
+ pop
sp((long)(*pc.cp++)
);
continue;
case O_WRITEF:
if (_runtst) {
WRITEF(curfile);
continue;
case O_WRITEF:
if (_runtst) {
WRITEF(curfile);
- pop
args(*pc.cp++
);
+ pop
sp((long)(*pc.cp++)
);
continue;
}
fprintf();
continue;
}
fprintf();
- pop
args(*pc.cp++
);
+ pop
sp((long)(*pc.cp++)
);
continue;
case O_WRITLN:
pc.cp++;
continue;
case O_WRITLN:
pc.cp++;
@@
-1306,7
+1332,7
@@
interpreter(base)
PAGE(curfile);
continue;
}
PAGE(curfile);
continue;
}
- fputc('
^L
', ACTFILE(curfile));
+ fputc('
\f
', ACTFILE(curfile));
continue;
case O_NAM:
pc.cp++;
continue;
case O_NAM:
pc.cp++;
@@
-1319,7
+1345,7
@@
interpreter(base)
tl = *pc.usp++;
tl1 = pop4();
if (_runtst) {
tl = *pc.usp++;
tl1 = pop4();
if (_runtst) {
- push4(MAX(tl1, tl,
*pc.usp++
));
+ push4(MAX(tl1, tl,
(long)(*pc.usp++)
));
continue;
}
tl1 -= tl;
continue;
}
tl1 -= tl;
@@
-1365,17
+1391,17
@@
interpreter(base)
case O_DEFNAME:
pc.cp++;
DEFNAME();
case O_DEFNAME:
pc.cp++;
DEFNAME();
- pop
args(4
);
+ pop
sp((long)(2*sizeof(char *)+2*sizeof(long))
);
continue;
case O_RESET:
pc.cp++;
RESET();
continue;
case O_RESET:
pc.cp++;
RESET();
- pop
args(4
);
+ pop
sp((long)(2*sizeof(char *)+2*sizeof(long))
);
continue;
case O_REWRITE:
pc.cp++;
REWRITE();
continue;
case O_REWRITE:
pc.cp++;
REWRITE();
- pop
args(4
);
+ pop
sp((long)(2*sizeof(char *)+2*sizeof(long))
);
continue;
case O_FILE:
pc.cp++;
continue;
case O_FILE:
pc.cp++;
@@
-1384,26
+1410,26
@@
interpreter(base)
case O_REMOVE:
pc.cp++;
REMOVE();
case O_REMOVE:
pc.cp++;
REMOVE();
- pop
args(2
);
+ pop
sp((long)(sizeof(char *)+sizeof(long))
);
continue;
case O_FLUSH:
pc.cp++;
FLUSH();
continue;
case O_FLUSH:
pc.cp++;
FLUSH();
- pop
args(1
);
+ pop
sp((long)(sizeof(char *))
);
continue;
case O_PACK:
pc.cp++;
PACK();
continue;
case O_PACK:
pc.cp++;
PACK();
- pop
args(7
);
+ pop
sp((long)(5*sizeof(long)+2*sizeof(char*))
);
continue;
case O_UNPACK:
pc.cp++;
UNPACK();
continue;
case O_UNPACK:
pc.cp++;
UNPACK();
- pop
args(7
);
+ pop
sp((long)(5*sizeof(long)+2*sizeof(char*))
);
continue;
case O_ARGC:
pc.cp++;
continue;
case O_ARGC:
pc.cp++;
- push4(_argc);
+ push4(
(long)
_argc);
continue;
case O_ARGV:
tl = *pc.cp++; /* tl = size of char array */
continue;
case O_ARGV:
tl = *pc.cp++; /* tl = size of char array */
@@
-1455,7
+1481,7
@@
interpreter(base)
case O_UNDEF:
pc.cp++;
pop8();
case O_UNDEF:
pc.cp++;
pop8();
- push2(
0
);
+ push2(
(short)(0)
);
continue;
case O_ATAN:
pc.cp++;
continue;
case O_ATAN:
pc.cp++;
@@
-1493,15
+1519,15
@@
interpreter(base)
case O_CHR4:
pc.cp++;
if (_runtst) {
case O_CHR4:
pc.cp++;
if (_runtst) {
- push2(
CHR(pop4(
)));
+ push2(
(short)(CHR(pop4()
)));
continue;
}
continue;
}
- push2(
pop4(
));
+ push2(
(short)(pop4()
));
continue;
case O_ODD2:
case O_ODD4:
pc.cp++;
continue;
case O_ODD2:
case O_ODD4:
pc.cp++;
- push2(
pop4() & 1
);
+ push2(
(short)(pop4() & 1)
);
continue;
case O_SUCC2:
tl = *pc.cp++;
continue;
case O_SUCC2:
tl = *pc.cp++;
@@
-1509,10
+1535,10
@@
interpreter(base)
tl = *pc.sp++;
tl1 = pop4();
if (_runtst) {
tl = *pc.sp++;
tl1 = pop4();
if (_runtst) {
- push2(
SUCC(tl1, tl, *pc.sp++
));
+ push2(
(short)(SUCC(tl1, tl, (long)(*pc.sp++))
));
continue;
}
continue;
}
- push2(
tl1 + 1
);
+ push2(
(short)(tl1 + 1)
);
pc.sp++;
continue;
case O_SUCC24:
pc.sp++;
continue;
case O_SUCC24:
@@
-1521,7
+1547,7
@@
interpreter(base)
tl = *pc.sp++;
tl1 = pop4();
if (_runtst) {
tl = *pc.sp++;
tl1 = pop4();
if (_runtst) {
- push4(SUCC(tl1, tl,
*pc.sp++
));
+ push4(SUCC(tl1, tl,
(long)(*pc.sp++)
));
continue;
}
push4(tl1 + 1);
continue;
}
push4(tl1 + 1);
@@
-1533,7
+1559,7
@@
interpreter(base)
tl = *pc.lp++;
tl1 = pop4();
if (_runtst) {
tl = *pc.lp++;
tl1 = pop4();
if (_runtst) {
- push4(SUCC(tl1, tl,
*pc.lp++
));
+ push4(SUCC(tl1, tl,
(long)(*pc.lp++)
));
continue;
}
push4(tl1 + 1);
continue;
}
push4(tl1 + 1);
@@
-1545,10
+1571,10
@@
interpreter(base)
tl = *pc.sp++;
tl1 = pop4();
if (_runtst) {
tl = *pc.sp++;
tl1 = pop4();
if (_runtst) {
- push2(
PRED(tl1, tl, *pc.sp++
));
+ push2(
(short)(PRED(tl1, tl, (long)(*pc.sp++))
));
continue;
}
continue;
}
- push2(
tl1 - 1
);
+ push2(
(short)(tl1 - 1)
);
pc.sp++;
continue;
case O_PRED24:
pc.sp++;
continue;
case O_PRED24:
@@
-1557,7
+1583,7
@@
interpreter(base)
tl = *pc.sp++;
tl1 = pop4();
if (_runtst) {
tl = *pc.sp++;
tl1 = pop4();
if (_runtst) {
- push4(PRED(tl1, tl,
*pc.sp++
));
+ push4(PRED(tl1, tl,
(long)(*pc.sp++)
));
continue;
}
push4(tl1 - 1);
continue;
}
push4(tl1 - 1);
@@
-1569,7
+1595,7
@@
interpreter(base)
tl = *pc.lp++;
tl1 = pop4();
if (_runtst) {
tl = *pc.lp++;
tl1 = pop4();
if (_runtst) {
- push4(PRED(tl1, tl,
*pc.lp++
));
+ push4(PRED(tl1, tl,
(long)(*pc.lp++)
));
continue;
}
push4(tl1 - 1);
continue;
}
push4(tl1 - 1);
@@
-1606,6
+1632,9
@@
interpreter(base)
pc.cp++;
push4(TRUNC(pop8()));
continue;
pc.cp++;
push4(TRUNC(pop8()));
continue;
+ default:
+ panic(PBADOP);
+ continue;
}
}
}
}
}
}