some more speed-up changes
This commit is contained in:
parent
f9fadbf045
commit
3107e638f8
|
@ -1,3 +1,6 @@
|
||||||
|
22-Nov-89 Ceriel Jacobs (ceriel) at ceriel
|
||||||
|
Some more speed-up changes, resulting in another 5%.
|
||||||
|
|
||||||
13-Nov-89 Ceriel Jacobs (ceriel) at ceriel
|
13-Nov-89 Ceriel Jacobs (ceriel) at ceriel
|
||||||
Many changes for speed-up (resulting speed-up: 20-25%).
|
Many changes for speed-up (resulting speed-up: 20-25%).
|
||||||
Also fixed serious problem in floating point handling: the existing
|
Also fixed serious problem in floating point handling: the existing
|
||||||
|
|
|
@ -94,6 +94,7 @@ newHP(ap)
|
||||||
* *
|
* *
|
||||||
* dt_stdp(addr, p) - STore Data Pointer. *
|
* dt_stdp(addr, p) - STore Data Pointer. *
|
||||||
* dt_stn(addr, l, n) - STore N byte integer. *
|
* dt_stn(addr, l, n) - STore N byte integer. *
|
||||||
|
* dt_stw(addr, l) - STore wsize byte integer. *
|
||||||
* dt_stf(addr, f, n) - STore n byte Floating point number. *
|
* dt_stf(addr, f, n) - STore n byte Floating point number. *
|
||||||
* *
|
* *
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
@ -159,6 +160,30 @@ dt_stn(addr, al, n)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
dt_stw(addr, al)
|
||||||
|
register ptr addr;
|
||||||
|
long al;
|
||||||
|
{
|
||||||
|
register int i;
|
||||||
|
register long l = al;
|
||||||
|
#ifdef LOGGING
|
||||||
|
/* a psize zero is ambiguous */
|
||||||
|
int sh_flags = (l == 0 && wsize == psize) ? (SH_INT|SH_DATAP) : SH_INT;
|
||||||
|
#endif LOGGING
|
||||||
|
|
||||||
|
LOG(("@g6 dt_stw(%lu, %lu)", addr, l));
|
||||||
|
ch_in_data(addr, wsize);
|
||||||
|
ch_wordaligned(addr);
|
||||||
|
for (i = (int) wsize; i > 0; i--, addr++) {
|
||||||
|
ch_dt_prot(addr);
|
||||||
|
data_loc(addr) = (char) l;
|
||||||
|
#ifdef LOGGING
|
||||||
|
dt_sh(addr) = sh_flags;
|
||||||
|
#endif LOGGING
|
||||||
|
l = l>>8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
dt_stf(addr, f, n)
|
dt_stf(addr, f, n)
|
||||||
register ptr addr;
|
register ptr addr;
|
||||||
|
@ -191,7 +216,9 @@ dt_stf(addr, f, n)
|
||||||
* dt_lddp(addr) - LoaD Data Pointer from data. *
|
* dt_lddp(addr) - LoaD Data Pointer from data. *
|
||||||
* dt_ldip(addr) - LoaD Instruction Pointer from data. *
|
* dt_ldip(addr) - LoaD Instruction Pointer from data. *
|
||||||
* dt_ldu(addr, n) - LoaD n Unsigned bytes from data. *
|
* dt_ldu(addr, n) - LoaD n Unsigned bytes from data. *
|
||||||
|
* dt_lduw(addr) - LoaD wsize Unsigned bytes from data. *
|
||||||
* dt_lds(addr, n) - LoaD n Signed bytes from data. *
|
* dt_lds(addr, n) - LoaD n Signed bytes from data. *
|
||||||
|
* dt_ldsw(addr) - LoaD wsize Signed bytes from data. *
|
||||||
* *
|
* *
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
|
||||||
|
@ -255,13 +282,39 @@ unsigned long dt_ldu(addr, n)
|
||||||
}
|
}
|
||||||
#endif LOGGING
|
#endif LOGGING
|
||||||
|
|
||||||
for (i = (int) n-1; i >= 0; i--) {
|
addr += n-1;
|
||||||
u = (u<<8) | btou(data_loc(addr + i));
|
for (i = (int) n-1; i >= 0; i--, addr--) {
|
||||||
|
u = (u<<8) | btou(data_loc(addr));
|
||||||
}
|
}
|
||||||
LOG(("@g6 dt_ldu() returns %lu", u));
|
LOG(("@g6 dt_ldu() returns %lu", u));
|
||||||
return (u);
|
return (u);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned long dt_lduw(addr)
|
||||||
|
register ptr addr;
|
||||||
|
{
|
||||||
|
register int i;
|
||||||
|
register unsigned long u = 0;
|
||||||
|
|
||||||
|
LOG(("@g6 dt_lduw(%lu)", addr));
|
||||||
|
|
||||||
|
ch_in_data(addr, wsize);
|
||||||
|
ch_wordaligned(addr);
|
||||||
|
#ifdef LOGGING
|
||||||
|
if (!is_dt_set(addr, wsize, SH_INT)) {
|
||||||
|
warning(WGIEXP);
|
||||||
|
warn_dtbits(addr, wsize);
|
||||||
|
}
|
||||||
|
#endif LOGGING
|
||||||
|
|
||||||
|
addr += wsize-1;
|
||||||
|
for (i = (int) wsize-1; i >= 0; i--, addr--) {
|
||||||
|
u = (u<<8) | btou(data_loc(addr));
|
||||||
|
}
|
||||||
|
LOG(("@g6 dt_lduw() returns %lu", u));
|
||||||
|
return (u);
|
||||||
|
}
|
||||||
|
|
||||||
long dt_lds(addr, n)
|
long dt_lds(addr, n)
|
||||||
register ptr addr;
|
register ptr addr;
|
||||||
size n;
|
size n;
|
||||||
|
@ -280,14 +333,41 @@ long dt_lds(addr, n)
|
||||||
}
|
}
|
||||||
#endif LOGGING
|
#endif LOGGING
|
||||||
|
|
||||||
l = btos(data_loc(addr + n - 1));
|
addr += n-2;
|
||||||
for (i = n - 2; i >= 0; i--) {
|
l = btos(data_loc(addr + 1));
|
||||||
l = (l<<8) | btol(data_loc(addr + i));
|
for (i = n - 2; i >= 0; i--, addr--) {
|
||||||
|
l = (l<<8) | btol(data_loc(addr));
|
||||||
}
|
}
|
||||||
LOG(("@g6 dt_lds() returns %lu", l));
|
LOG(("@g6 dt_lds() returns %lu", l));
|
||||||
return (l);
|
return (l);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long dt_ldsw(addr)
|
||||||
|
register ptr addr;
|
||||||
|
{
|
||||||
|
register int i;
|
||||||
|
register long l;
|
||||||
|
|
||||||
|
LOG(("@g6 dt_ldsw(%lu)", addr));
|
||||||
|
|
||||||
|
ch_in_data(addr, wsize);
|
||||||
|
ch_wordaligned(addr);
|
||||||
|
#ifdef LOGGING
|
||||||
|
if (!is_dt_set(addr, wsize, SH_INT)) {
|
||||||
|
warning(WGIEXP);
|
||||||
|
warn_dtbits(addr, wsize);
|
||||||
|
}
|
||||||
|
#endif LOGGING
|
||||||
|
|
||||||
|
addr += wsize-2;
|
||||||
|
l = btos(data_loc(addr + 1));
|
||||||
|
for (i = wsize - 2; i >= 0; i--, addr--) {
|
||||||
|
l = (l<<8) | btol(data_loc(addr));
|
||||||
|
}
|
||||||
|
LOG(("@g6 dt_ldsw() returns %lu", l));
|
||||||
|
return (l);
|
||||||
|
}
|
||||||
|
|
||||||
/************************************************************************
|
/************************************************************************
|
||||||
* Data move division *
|
* Data move division *
|
||||||
************************************************************************
|
************************************************************************
|
||||||
|
|
|
@ -39,7 +39,7 @@ DoLARm(arg)
|
||||||
DoLARz()
|
DoLARz()
|
||||||
{
|
{
|
||||||
/* LAR w: Load array element, descriptor contains integers of size w */
|
/* LAR w: Load array element, descriptor contains integers of size w */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
|
|
||||||
LOG(("@A6 DoLARz(%ld)", l));
|
LOG(("@A6 DoLARz(%ld)", l));
|
||||||
arr(LAR, arg_wi(l));
|
arr(LAR, arg_wi(l));
|
||||||
|
@ -66,7 +66,7 @@ DoSARm(arg)
|
||||||
DoSARz()
|
DoSARz()
|
||||||
{
|
{
|
||||||
/* SAR w: Store array element */
|
/* SAR w: Store array element */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
|
|
||||||
LOG(("@A6 DoSARz(%ld)", l));
|
LOG(("@A6 DoSARz(%ld)", l));
|
||||||
arr(SAR, arg_wi(l));
|
arr(SAR, arg_wi(l));
|
||||||
|
@ -93,7 +93,7 @@ DoAARm(arg)
|
||||||
DoAARz()
|
DoAARz()
|
||||||
{
|
{
|
||||||
/* AAR w: Load address of array element */
|
/* AAR w: Load address of array element */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
|
|
||||||
LOG(("@A6 DoAARz(%ld)", l));
|
LOG(("@A6 DoAARz(%ld)", l));
|
||||||
arr(AAR, arg_wi(l));
|
arr(AAR, arg_wi(l));
|
||||||
|
|
|
@ -51,7 +51,7 @@ DoCMIm(arg)
|
||||||
DoCMIz()
|
DoCMIz()
|
||||||
{
|
{
|
||||||
/* CMI w: Compare w byte integers, Push negative, zero, positive for <, = or > */
|
/* CMI w: Compare w byte integers, Push negative, zero, positive for <, = or > */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register long t = spop(arg_wi(l));
|
register long t = spop(arg_wi(l));
|
||||||
register long s = spop(l);
|
register long s = spop(l);
|
||||||
|
|
||||||
|
@ -102,7 +102,7 @@ DoCMFz()
|
||||||
{
|
{
|
||||||
/* CMF w: Compare w byte reals */
|
/* CMF w: Compare w byte reals */
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
double t = fpop(arg_wf(l));
|
double t = fpop(arg_wf(l));
|
||||||
double s = fpop(l);
|
double s = fpop(l);
|
||||||
|
|
||||||
|
@ -130,7 +130,7 @@ DoCMUl2(arg)
|
||||||
DoCMUz()
|
DoCMUz()
|
||||||
{
|
{
|
||||||
/* CMU w: Compare w byte unsigneds */
|
/* CMU w: Compare w byte unsigneds */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register unsigned long t = upop(arg_wi(l));
|
register unsigned long t = upop(arg_wi(l));
|
||||||
register unsigned long s = upop(l);
|
register unsigned long s = upop(l);
|
||||||
|
|
||||||
|
@ -165,7 +165,7 @@ DoCMSs(hob, wfac)
|
||||||
DoCMSz()
|
DoCMSz()
|
||||||
{
|
{
|
||||||
/* CMS w: Compare w byte values, can only be used for bit for bit equality test */
|
/* CMS w: Compare w byte values, can only be used for bit for bit equality test */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
|
|
||||||
LOG(("@T6 DoCMSz(%ld)", l));
|
LOG(("@T6 DoCMSz(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
|
|
@ -21,12 +21,12 @@ extern double fpop();
|
||||||
DoCIIz()
|
DoCIIz()
|
||||||
{
|
{
|
||||||
/* CII -: Convert integer to integer (*) */
|
/* CII -: Convert integer to integer (*) */
|
||||||
register int newsize = spop(wsize);
|
register int newsize = swpop();
|
||||||
register long s;
|
register long s;
|
||||||
|
|
||||||
LOG(("@C6 DoCIIz()"));
|
LOG(("@C6 DoCIIz()"));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
switch ((int)(10 * spop(wsize) + newsize)) {
|
switch ((int)(10 * swpop() + newsize)) {
|
||||||
case 12:
|
case 12:
|
||||||
if (wsize == 4) {
|
if (wsize == 4) {
|
||||||
wtrap(WILLCONV, EILLINS);
|
wtrap(WILLCONV, EILLINS);
|
||||||
|
@ -65,12 +65,12 @@ DoCIIz()
|
||||||
DoCUIz()
|
DoCUIz()
|
||||||
{
|
{
|
||||||
/* CUI -: Convert unsigned to integer (*) */
|
/* CUI -: Convert unsigned to integer (*) */
|
||||||
register int newsize = spop(wsize);
|
register int newsize = swpop();
|
||||||
register unsigned long u;
|
register unsigned long u;
|
||||||
|
|
||||||
LOG(("@C6 DoCUIz()"));
|
LOG(("@C6 DoCUIz()"));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
switch ((int)(10 * spop(wsize) + newsize)) {
|
switch ((int)(10 * swpop() + newsize)) {
|
||||||
case 22:
|
case 22:
|
||||||
if (wsize == 4) {
|
if (wsize == 4) {
|
||||||
wtrap(WILLCONV, EILLINS);
|
wtrap(WILLCONV, EILLINS);
|
||||||
|
@ -116,12 +116,12 @@ DoCFIz()
|
||||||
{
|
{
|
||||||
/* CFI -: Convert floating to integer (*) */
|
/* CFI -: Convert floating to integer (*) */
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
register int newsize = spop(wsize);
|
register int newsize = swpop();
|
||||||
double f;
|
double f;
|
||||||
|
|
||||||
LOG(("@C6 DoCFIz()"));
|
LOG(("@C6 DoCFIz()"));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
switch ((int)(10 * spop(wsize) + newsize)) {
|
switch ((int)(10 * swpop() + newsize)) {
|
||||||
case 42:
|
case 42:
|
||||||
if (wsize == 4) {
|
if (wsize == 4) {
|
||||||
wtrap(WILLCONV, EILLINS);
|
wtrap(WILLCONV, EILLINS);
|
||||||
|
@ -172,11 +172,11 @@ DoCIFz()
|
||||||
{
|
{
|
||||||
/* CIF -: Convert integer to floating (*) */
|
/* CIF -: Convert integer to floating (*) */
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
register int newsize = spop(wsize);
|
register int newsize = swpop();
|
||||||
|
|
||||||
LOG(("@C6 DoCIFz()"));
|
LOG(("@C6 DoCIFz()"));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
switch ((int)(10 * spop(wsize) + newsize)) {
|
switch ((int)(10 * swpop() + newsize)) {
|
||||||
case 24:
|
case 24:
|
||||||
if (wsize == 4) {
|
if (wsize == 4) {
|
||||||
wtrap(WILLCONV, EILLINS);
|
wtrap(WILLCONV, EILLINS);
|
||||||
|
@ -207,12 +207,12 @@ DoCUFz()
|
||||||
{
|
{
|
||||||
/* CUF -: Convert unsigned to floating (*) */
|
/* CUF -: Convert unsigned to floating (*) */
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
register int newsize = spop(wsize);
|
register int newsize = swpop();
|
||||||
register unsigned long u;
|
register unsigned long u;
|
||||||
|
|
||||||
LOG(("@C6 DoCUFz()"));
|
LOG(("@C6 DoCUFz()"));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
switch ((int)(10 * spop(wsize) + newsize)) {
|
switch ((int)(10 * swpop() + newsize)) {
|
||||||
case 24:
|
case 24:
|
||||||
if (wsize == 4) {
|
if (wsize == 4) {
|
||||||
wtrap(WILLCONV, EILLINS);
|
wtrap(WILLCONV, EILLINS);
|
||||||
|
@ -253,11 +253,11 @@ DoCFFz()
|
||||||
{
|
{
|
||||||
/* CFF -: Convert floating to floating (*) */
|
/* CFF -: Convert floating to floating (*) */
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
register int newsize = spop(wsize);
|
register int newsize = swpop();
|
||||||
|
|
||||||
LOG(("@C6 DoCFFz()"));
|
LOG(("@C6 DoCFFz()"));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
switch ((int)(10 * spop(wsize) + newsize)) {
|
switch ((int)(10 * swpop() + newsize)) {
|
||||||
case 44:
|
case 44:
|
||||||
return;
|
return;
|
||||||
case 48:
|
case 48:
|
||||||
|
@ -279,12 +279,12 @@ DoCFFz()
|
||||||
DoCIUz()
|
DoCIUz()
|
||||||
{
|
{
|
||||||
/* CIU -: Convert integer to unsigned */
|
/* CIU -: Convert integer to unsigned */
|
||||||
register int newsize = spop(wsize);
|
register int newsize = swpop();
|
||||||
register long u;
|
register long u;
|
||||||
|
|
||||||
LOG(("@C6 DoCIUz()"));
|
LOG(("@C6 DoCIUz()"));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
switch ((int)(10 * spop(wsize) + newsize)) {
|
switch ((int)(10 * swpop() + newsize)) {
|
||||||
case 22:
|
case 22:
|
||||||
if (wsize == 4) {
|
if (wsize == 4) {
|
||||||
wtrap(WILLCONV, EILLINS);
|
wtrap(WILLCONV, EILLINS);
|
||||||
|
@ -313,11 +313,11 @@ DoCIUz()
|
||||||
DoCUUz()
|
DoCUUz()
|
||||||
{
|
{
|
||||||
/* CUU -: Convert unsigned to unsigned */
|
/* CUU -: Convert unsigned to unsigned */
|
||||||
register int newsize = spop(wsize);
|
register int newsize = swpop();
|
||||||
|
|
||||||
LOG(("@C6 DoCUUz()"));
|
LOG(("@C6 DoCUUz()"));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
switch ((int)(10 * spop(wsize) + newsize)) {
|
switch ((int)(10 * swpop() + newsize)) {
|
||||||
case 22:
|
case 22:
|
||||||
if (wsize == 4) {
|
if (wsize == 4) {
|
||||||
wtrap(WILLCONV, EILLINS);
|
wtrap(WILLCONV, EILLINS);
|
||||||
|
@ -346,12 +346,12 @@ DoCFUz()
|
||||||
{
|
{
|
||||||
/* CFU -: Convert floating to unsigned */
|
/* CFU -: Convert floating to unsigned */
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
register int newsize = spop(wsize);
|
register int newsize = swpop();
|
||||||
double f;
|
double f;
|
||||||
|
|
||||||
LOG(("@C6 DoCFUz()"));
|
LOG(("@C6 DoCFUz()"));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
switch ((int)(10 * spop(wsize) + newsize)) {
|
switch ((int)(10 * swpop() + newsize)) {
|
||||||
case 42:
|
case 42:
|
||||||
if (wsize == 4) {
|
if (wsize == 4) {
|
||||||
wtrap(WILLCONV, EILLINS);
|
wtrap(WILLCONV, EILLINS);
|
||||||
|
|
|
@ -68,7 +68,7 @@ DoADFz()
|
||||||
{
|
{
|
||||||
/* ADF w: Floating add (*) */
|
/* ADF w: Floating add (*) */
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
double t = fpop(arg_wf(l));
|
double t = fpop(arg_wf(l));
|
||||||
|
|
||||||
LOG(("@F6 DoADFz(%ld)", l));
|
LOG(("@F6 DoADFz(%ld)", l));
|
||||||
|
@ -119,7 +119,7 @@ DoSBFz()
|
||||||
{
|
{
|
||||||
/* SBF w: Floating subtract (*) */
|
/* SBF w: Floating subtract (*) */
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
double t = fpop(arg_wf(l));
|
double t = fpop(arg_wf(l));
|
||||||
|
|
||||||
LOG(("@F6 DoSBFz(%ld)", l));
|
LOG(("@F6 DoSBFz(%ld)", l));
|
||||||
|
@ -170,7 +170,7 @@ DoMLFz()
|
||||||
{
|
{
|
||||||
/* MLF w: Floating multiply (*) */
|
/* MLF w: Floating multiply (*) */
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
double t = fpop(arg_wf(l));
|
double t = fpop(arg_wf(l));
|
||||||
|
|
||||||
LOG(("@F6 DoMLFz(%ld)", l));
|
LOG(("@F6 DoMLFz(%ld)", l));
|
||||||
|
@ -221,7 +221,7 @@ DoDVFz()
|
||||||
{
|
{
|
||||||
/* DVF w: Floating divide (*) */
|
/* DVF w: Floating divide (*) */
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
double t = fpop(arg_wf(l));
|
double t = fpop(arg_wf(l));
|
||||||
|
|
||||||
LOG(("@F6 DoDVFz(%ld)", l));
|
LOG(("@F6 DoDVFz(%ld)", l));
|
||||||
|
@ -253,7 +253,7 @@ DoNGFz()
|
||||||
{
|
{
|
||||||
/* NGF w: Floating negate (*) */
|
/* NGF w: Floating negate (*) */
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
double t = fpop(arg_wf(l));
|
double t = fpop(arg_wf(l));
|
||||||
|
|
||||||
LOG(("@F6 DoNGFz(%ld)", l));
|
LOG(("@F6 DoNGFz(%ld)", l));
|
||||||
|
@ -285,7 +285,7 @@ DoFIFz()
|
||||||
{
|
{
|
||||||
/* FIF w: Floating multiply and split integer and fraction part (*) */
|
/* FIF w: Floating multiply and split integer and fraction part (*) */
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
double t = fpop(arg_wf(l));
|
double t = fpop(arg_wf(l));
|
||||||
|
|
||||||
LOG(("@F6 DoFIFz(%ld)", l));
|
LOG(("@F6 DoFIFz(%ld)", l));
|
||||||
|
@ -316,7 +316,7 @@ DoFEFz()
|
||||||
{
|
{
|
||||||
/* FEF w: Split floating number in exponent and fraction part (*) */
|
/* FEF w: Split floating number in exponent and fraction part (*) */
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
|
|
||||||
LOG(("@F6 DoFEFz(%ld)", l));
|
LOG(("@F6 DoFEFz(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
|
|
@ -21,7 +21,7 @@ DoINCz()
|
||||||
/* INC -: Increment word on top of stack by 1 (*) */
|
/* INC -: Increment word on top of stack by 1 (*) */
|
||||||
LOG(("@Z6 DoINCz()"));
|
LOG(("@Z6 DoINCz()"));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
wpush(inc(spop(wsize)));
|
wpush(inc(swpop()));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoINLm(arg)
|
DoINLm(arg)
|
||||||
|
@ -34,7 +34,7 @@ DoINLm(arg)
|
||||||
LOG(("@Z6 DoINLm(%ld)", l));
|
LOG(("@Z6 DoINLm(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
p = loc_addr(l);
|
p = loc_addr(l);
|
||||||
st_stn(p, inc(st_lds(p, wsize)), wsize);
|
st_stw(p, inc(st_ldsw(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoINLn2(arg)
|
DoINLn2(arg)
|
||||||
|
@ -48,7 +48,7 @@ DoINLn2(arg)
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
p = loc_addr(l);
|
p = loc_addr(l);
|
||||||
st_stn(p, inc(st_lds(p, wsize)), wsize);
|
st_stw(p, inc(st_ldsw(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoINLn4(arg)
|
DoINLn4(arg)
|
||||||
|
@ -62,7 +62,7 @@ DoINLn4(arg)
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
p = loc_addr(l);
|
p = loc_addr(l);
|
||||||
st_stn(p, inc(st_lds(p, wsize)), wsize);
|
st_stw(p, inc(st_ldsw(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoINLp2(arg)
|
DoINLp2(arg)
|
||||||
|
@ -76,7 +76,7 @@ DoINLp2(arg)
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
p = loc_addr(l);
|
p = loc_addr(l);
|
||||||
st_stn(p, inc(st_lds(p, wsize)), wsize);
|
st_stw(p, inc(st_ldsw(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoINLp4(arg)
|
DoINLp4(arg)
|
||||||
|
@ -90,7 +90,7 @@ DoINLp4(arg)
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
p = loc_addr(l);
|
p = loc_addr(l);
|
||||||
st_stn(p, inc(st_lds(p, wsize)), wsize);
|
st_stw(p, inc(st_ldsw(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoINLs(hob, wfac)
|
DoINLs(hob, wfac)
|
||||||
|
@ -105,7 +105,7 @@ DoINLs(hob, wfac)
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
p = loc_addr(l);
|
p = loc_addr(l);
|
||||||
st_stn(p, inc(st_lds(p, wsize)), wsize);
|
st_stw(p, inc(st_ldsw(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoINEl2(arg)
|
DoINEl2(arg)
|
||||||
|
@ -117,7 +117,7 @@ DoINEl2(arg)
|
||||||
LOG(("@Z6 DoINEl2(%lu)", p));
|
LOG(("@Z6 DoINEl2(%lu)", p));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
p = arg_g(p);
|
p = arg_g(p);
|
||||||
dt_stn(p, inc(dt_lds(p, wsize)), wsize);
|
dt_stw(p, inc(dt_ldsw(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoINEl4(arg)
|
DoINEl4(arg)
|
||||||
|
@ -129,7 +129,7 @@ DoINEl4(arg)
|
||||||
LOG(("@Z6 DoINEl4(%lu)", p));
|
LOG(("@Z6 DoINEl4(%lu)", p));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
p = arg_g(p);
|
p = arg_g(p);
|
||||||
dt_stn(p, inc(dt_lds(p, wsize)), wsize);
|
dt_stw(p, inc(dt_ldsw(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoINEs(hob, wfac)
|
DoINEs(hob, wfac)
|
||||||
|
@ -142,7 +142,7 @@ DoINEs(hob, wfac)
|
||||||
LOG(("@Z6 DoINEs(%lu)", p));
|
LOG(("@Z6 DoINEs(%lu)", p));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
p = arg_g(p);
|
p = arg_g(p);
|
||||||
dt_stn(p, inc(dt_lds(p, wsize)), wsize);
|
dt_stw(p, inc(dt_ldsw(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoDECz()
|
DoDECz()
|
||||||
|
@ -150,7 +150,7 @@ DoDECz()
|
||||||
/* DEC -: Decrement word on top of stack by 1 (*) */
|
/* DEC -: Decrement word on top of stack by 1 (*) */
|
||||||
LOG(("@Z6 DoDECz()"));
|
LOG(("@Z6 DoDECz()"));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
wpush(dec(spop(wsize)));
|
wpush(dec(swpop()));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoDELn2(arg)
|
DoDELn2(arg)
|
||||||
|
@ -164,7 +164,7 @@ DoDELn2(arg)
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
p = loc_addr(l);
|
p = loc_addr(l);
|
||||||
st_stn(p, dec(st_lds(p, wsize)), wsize);
|
st_stw(p, dec(st_ldsw(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoDELn4(arg)
|
DoDELn4(arg)
|
||||||
|
@ -178,7 +178,7 @@ DoDELn4(arg)
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
p = loc_addr(l);
|
p = loc_addr(l);
|
||||||
st_stn(p, dec(st_lds(p, wsize)), wsize);
|
st_stw(p, dec(st_ldsw(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoDELp2(arg)
|
DoDELp2(arg)
|
||||||
|
@ -192,7 +192,7 @@ DoDELp2(arg)
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
p = loc_addr(l);
|
p = loc_addr(l);
|
||||||
st_stn(p, dec(st_lds(p, wsize)), wsize);
|
st_stw(p, dec(st_ldsw(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoDELp4(arg)
|
DoDELp4(arg)
|
||||||
|
@ -206,7 +206,7 @@ DoDELp4(arg)
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
p = loc_addr(l);
|
p = loc_addr(l);
|
||||||
st_stn(p, dec(st_lds(p, wsize)), wsize);
|
st_stw(p, dec(st_ldsw(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoDELs(hob, wfac)
|
DoDELs(hob, wfac)
|
||||||
|
@ -221,7 +221,7 @@ DoDELs(hob, wfac)
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
p = loc_addr(l);
|
p = loc_addr(l);
|
||||||
st_stn(p, dec(st_lds(p, wsize)), wsize);
|
st_stw(p, dec(st_ldsw(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoDEEl2(arg)
|
DoDEEl2(arg)
|
||||||
|
@ -233,7 +233,7 @@ DoDEEl2(arg)
|
||||||
LOG(("@Z6 DoDEEl2(%lu)", p));
|
LOG(("@Z6 DoDEEl2(%lu)", p));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
p = arg_g(p);
|
p = arg_g(p);
|
||||||
dt_stn(p, dec(dt_lds(p, wsize)), wsize);
|
dt_stw(p, dec(dt_ldsw(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoDEEl4(arg)
|
DoDEEl4(arg)
|
||||||
|
@ -245,7 +245,7 @@ DoDEEl4(arg)
|
||||||
LOG(("@Z6 DoDEEl4(%lu)", p));
|
LOG(("@Z6 DoDEEl4(%lu)", p));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
p = arg_g(p);
|
p = arg_g(p);
|
||||||
dt_stn(p, dec(dt_lds(p, wsize)), wsize);
|
dt_stw(p, dec(dt_ldsw(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoDEEs(hob, wfac)
|
DoDEEs(hob, wfac)
|
||||||
|
@ -258,7 +258,7 @@ DoDEEs(hob, wfac)
|
||||||
LOG(("@Z6 DoDEEs(%lu)", p));
|
LOG(("@Z6 DoDEEs(%lu)", p));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
p = arg_g(p);
|
p = arg_g(p);
|
||||||
dt_stn(p, dec(dt_lds(p, wsize)), wsize);
|
dt_stw(p, dec(dt_ldsw(p)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoZRLm(arg)
|
DoZRLm(arg)
|
||||||
|
@ -269,7 +269,7 @@ DoZRLm(arg)
|
||||||
|
|
||||||
LOG(("@Z6 DoZRLm(%ld)", l));
|
LOG(("@Z6 DoZRLm(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
st_stn(loc_addr(l), 0L, wsize);
|
st_stw(loc_addr(l), 0L);
|
||||||
}
|
}
|
||||||
|
|
||||||
DoZRLn2(arg)
|
DoZRLn2(arg)
|
||||||
|
@ -281,7 +281,7 @@ DoZRLn2(arg)
|
||||||
LOG(("@Z6 DoZRLn2(%ld)", l));
|
LOG(("@Z6 DoZRLn2(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(arg);
|
l = arg_l(arg);
|
||||||
st_stn(loc_addr(l), 0L, wsize);
|
st_stw(loc_addr(l), 0L);
|
||||||
}
|
}
|
||||||
|
|
||||||
DoZRLn4(arg)
|
DoZRLn4(arg)
|
||||||
|
@ -293,7 +293,7 @@ DoZRLn4(arg)
|
||||||
LOG(("@Z6 DoZRLn4(%ld)", l));
|
LOG(("@Z6 DoZRLn4(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
st_stn(loc_addr(l), 0L, wsize);
|
st_stw(loc_addr(l), 0L);
|
||||||
}
|
}
|
||||||
|
|
||||||
DoZRLp2(arg)
|
DoZRLp2(arg)
|
||||||
|
@ -305,7 +305,7 @@ DoZRLp2(arg)
|
||||||
LOG(("@Z6 DoZRLp2(%ld)", l));
|
LOG(("@Z6 DoZRLp2(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
st_stn(loc_addr(l), 0L, wsize);
|
st_stw(loc_addr(l), 0L);
|
||||||
}
|
}
|
||||||
|
|
||||||
DoZRLp4(arg)
|
DoZRLp4(arg)
|
||||||
|
@ -317,7 +317,7 @@ DoZRLp4(arg)
|
||||||
LOG(("@Z6 DoZRLp4(%ld)", l));
|
LOG(("@Z6 DoZRLp4(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
st_stn(loc_addr(l), 0L, wsize);
|
st_stw(loc_addr(l), 0L);
|
||||||
}
|
}
|
||||||
|
|
||||||
DoZRLs(hob, wfac)
|
DoZRLs(hob, wfac)
|
||||||
|
@ -330,7 +330,7 @@ DoZRLs(hob, wfac)
|
||||||
LOG(("@Z6 DoZRLs(%ld)", l));
|
LOG(("@Z6 DoZRLs(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
st_stn(loc_addr(l), 0L, wsize);
|
st_stw(loc_addr(l), 0L);
|
||||||
}
|
}
|
||||||
|
|
||||||
DoZREl2(arg)
|
DoZREl2(arg)
|
||||||
|
@ -341,7 +341,7 @@ DoZREl2(arg)
|
||||||
|
|
||||||
LOG(("@Z6 DoZREl2(%lu)", p));
|
LOG(("@Z6 DoZREl2(%lu)", p));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
dt_stn(arg_g(p), 0L, wsize);
|
dt_stw(arg_g(p), 0L);
|
||||||
}
|
}
|
||||||
|
|
||||||
DoZREl4(arg)
|
DoZREl4(arg)
|
||||||
|
@ -352,7 +352,7 @@ DoZREl4(arg)
|
||||||
|
|
||||||
LOG(("@Z6 DoZREl4(%lu)", p));
|
LOG(("@Z6 DoZREl4(%lu)", p));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
dt_stn(arg_g(p), 0L, wsize);
|
dt_stw(arg_g(p), 0L);
|
||||||
}
|
}
|
||||||
|
|
||||||
DoZREs(hob, wfac)
|
DoZREs(hob, wfac)
|
||||||
|
@ -364,7 +364,7 @@ DoZREs(hob, wfac)
|
||||||
|
|
||||||
LOG(("@Z6 DoZREs(%lu)", p));
|
LOG(("@Z6 DoZREs(%lu)", p));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
dt_stn(arg_g(p), 0L, wsize);
|
dt_stw(arg_g(p), 0L);
|
||||||
}
|
}
|
||||||
|
|
||||||
DoZRFl2(arg)
|
DoZRFl2(arg)
|
||||||
|
@ -387,7 +387,7 @@ DoZRFz()
|
||||||
{
|
{
|
||||||
/* ZRF w: Load a floating zero of size w */
|
/* ZRF w: Load a floating zero of size w */
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
|
|
||||||
LOG(("@Z6 DoZRFz(%ld)", l));
|
LOG(("@Z6 DoZRFz(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
@ -425,7 +425,7 @@ DoZERs(hob, wfac)
|
||||||
DoZERz()
|
DoZERz()
|
||||||
{
|
{
|
||||||
/* ZER w: Load w zero bytes */
|
/* ZER w: Load w zero bytes */
|
||||||
register size i, l = spop(wsize);
|
register size i, l = swpop();
|
||||||
|
|
||||||
LOG(("@Z6 DoZERz(%ld)", l));
|
LOG(("@Z6 DoZERz(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
|
|
@ -43,7 +43,7 @@ DoADIm(arg)
|
||||||
DoADIz() /* argument on top of stack */
|
DoADIz() /* argument on top of stack */
|
||||||
{
|
{
|
||||||
/* ADI w: Addition (*) */
|
/* ADI w: Addition (*) */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register long t = spop(arg_wi(l));
|
register long t = spop(arg_wi(l));
|
||||||
|
|
||||||
LOG(("@I6 DoADIz(%ld)", l));
|
LOG(("@I6 DoADIz(%ld)", l));
|
||||||
|
@ -78,7 +78,7 @@ DoSBIm(arg)
|
||||||
DoSBIz() /* arg on top of stack */
|
DoSBIz() /* arg on top of stack */
|
||||||
{
|
{
|
||||||
/* SBI w: Subtraction (*) */
|
/* SBI w: Subtraction (*) */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register long t = spop(arg_wi(l));
|
register long t = spop(arg_wi(l));
|
||||||
|
|
||||||
LOG(("@I6 DoSBIz(%ld)", l));
|
LOG(("@I6 DoSBIz(%ld)", l));
|
||||||
|
@ -113,7 +113,7 @@ DoMLIm(arg)
|
||||||
DoMLIz() /* arg on top of stack */
|
DoMLIz() /* arg on top of stack */
|
||||||
{
|
{
|
||||||
/* MLI w: Multiplication (*) */
|
/* MLI w: Multiplication (*) */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register long t = spop(arg_wi(l));
|
register long t = spop(arg_wi(l));
|
||||||
|
|
||||||
LOG(("@I6 DoMLIz(%ld)", l));
|
LOG(("@I6 DoMLIz(%ld)", l));
|
||||||
|
@ -148,7 +148,7 @@ DoDVIm(arg)
|
||||||
DoDVIz() /* arg on top of stack */
|
DoDVIz() /* arg on top of stack */
|
||||||
{
|
{
|
||||||
/* DVI w: Division (*) */
|
/* DVI w: Division (*) */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register long t = spop(arg_wi(l));
|
register long t = spop(arg_wi(l));
|
||||||
|
|
||||||
LOG(("@I6 DoDVIz(%ld)", l));
|
LOG(("@I6 DoDVIz(%ld)", l));
|
||||||
|
@ -183,7 +183,7 @@ DoRMIm(arg)
|
||||||
DoRMIz() /* arg on top of stack */
|
DoRMIz() /* arg on top of stack */
|
||||||
{
|
{
|
||||||
/* RMI w: Remainder (*) */
|
/* RMI w: Remainder (*) */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register long t = spop(arg_wi(l));
|
register long t = spop(arg_wi(l));
|
||||||
|
|
||||||
LOG(("@I6 DoRMIz(%ld)", l));
|
LOG(("@I6 DoRMIz(%ld)", l));
|
||||||
|
@ -206,7 +206,7 @@ DoNGIl2(arg)
|
||||||
DoNGIz()
|
DoNGIz()
|
||||||
{
|
{
|
||||||
/* NGI w: Negate (two's complement) (*) */
|
/* NGI w: Negate (two's complement) (*) */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
|
|
||||||
LOG(("@I6 DoNGIz(%ld)", l));
|
LOG(("@I6 DoNGIz(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
@ -219,7 +219,7 @@ DoSLIl2(arg)
|
||||||
{
|
{
|
||||||
/* SLI w: Shift left (*) */
|
/* SLI w: Shift left (*) */
|
||||||
register size l = (L_arg_2() * arg);
|
register size l = (L_arg_2() * arg);
|
||||||
register long t = spop(wsize);
|
register long t = swpop();
|
||||||
|
|
||||||
LOG(("@I6 DoSLIl2(%ld)", l));
|
LOG(("@I6 DoSLIl2(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
@ -232,7 +232,7 @@ DoSLIm(arg)
|
||||||
{
|
{
|
||||||
/* SLI w: Shift left (*) */
|
/* SLI w: Shift left (*) */
|
||||||
register size l = arg_wi(arg);
|
register size l = arg_wi(arg);
|
||||||
register long t = spop(wsize);
|
register long t = swpop();
|
||||||
|
|
||||||
LOG(("@I6 DoSLIm(%ld)", l));
|
LOG(("@I6 DoSLIm(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
@ -242,8 +242,8 @@ DoSLIm(arg)
|
||||||
DoSLIz()
|
DoSLIz()
|
||||||
{
|
{
|
||||||
/* SLI w: Shift left (*) */
|
/* SLI w: Shift left (*) */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register long t = spop(wsize);
|
register long t = swpop();
|
||||||
|
|
||||||
LOG(("@I6 DoSLIz(%ld)", l));
|
LOG(("@I6 DoSLIz(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
@ -256,7 +256,7 @@ DoSRIl2(arg)
|
||||||
{
|
{
|
||||||
/* SRI w: Shift right (*) */
|
/* SRI w: Shift right (*) */
|
||||||
register size l = (L_arg_2() * arg);
|
register size l = (L_arg_2() * arg);
|
||||||
register long t = spop(wsize);
|
register long t = swpop();
|
||||||
|
|
||||||
LOG(("@I6 DoSRIl2(%ld)", l));
|
LOG(("@I6 DoSRIl2(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
@ -267,8 +267,8 @@ DoSRIl2(arg)
|
||||||
DoSRIz()
|
DoSRIz()
|
||||||
{
|
{
|
||||||
/* SRI w: Shift right (*) */
|
/* SRI w: Shift right (*) */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register long t = spop(wsize);
|
register long t = swpop();
|
||||||
|
|
||||||
LOG(("@I6 DoSRIz(%ld)", l));
|
LOG(("@I6 DoSRIz(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
|
|
@ -42,7 +42,7 @@ DoLOCm(arg)
|
||||||
long arg;
|
long arg;
|
||||||
{
|
{
|
||||||
/* LOC c: Load constant (i.e. push one word onto the stack) */
|
/* LOC c: Load constant (i.e. push one word onto the stack) */
|
||||||
register long l = arg_c(arg);
|
long l = arg_c(arg);
|
||||||
|
|
||||||
LOG(("@L6 DoLOCm(%ld)", l));
|
LOG(("@L6 DoLOCm(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
@ -102,7 +102,7 @@ DoLOLm(arg)
|
||||||
|
|
||||||
LOG(("@L6 DoLOLm(%ld)", l));
|
LOG(("@L6 DoLOLm(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
push_st(loc_addr(l), wsize);
|
pushw_st(loc_addr(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLOLn2(arg)
|
DoLOLn2(arg)
|
||||||
|
@ -114,7 +114,7 @@ DoLOLn2(arg)
|
||||||
LOG(("@L6 DoLOLn2(%ld)", l));
|
LOG(("@L6 DoLOLn2(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
push_st(loc_addr(l), wsize);
|
pushw_st(loc_addr(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLOLn4(arg)
|
DoLOLn4(arg)
|
||||||
|
@ -126,7 +126,7 @@ DoLOLn4(arg)
|
||||||
LOG(("@L6 DoLOLn4(%ld)", l));
|
LOG(("@L6 DoLOLn4(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
push_st(loc_addr(l), wsize);
|
pushw_st(loc_addr(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLOLp2(arg)
|
DoLOLp2(arg)
|
||||||
|
@ -138,7 +138,7 @@ DoLOLp2(arg)
|
||||||
LOG(("@L6 DoLOLp2(%ld)", l));
|
LOG(("@L6 DoLOLp2(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
push_st(loc_addr(l), wsize);
|
pushw_st(loc_addr(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLOLp4(arg)
|
DoLOLp4(arg)
|
||||||
|
@ -150,7 +150,7 @@ DoLOLp4(arg)
|
||||||
LOG(("@L6 DoLOLp4(%ld)", l));
|
LOG(("@L6 DoLOLp4(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
push_st(loc_addr(l), wsize);
|
pushw_st(loc_addr(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLOLs(hob, wfac)
|
DoLOLs(hob, wfac)
|
||||||
|
@ -163,7 +163,7 @@ DoLOLs(hob, wfac)
|
||||||
LOG(("@L6 DoLOLs(%ld)", l));
|
LOG(("@L6 DoLOLs(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
push_st(loc_addr(l), wsize);
|
pushw_st(loc_addr(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLOEl2(arg)
|
DoLOEl2(arg)
|
||||||
|
@ -174,7 +174,7 @@ DoLOEl2(arg)
|
||||||
|
|
||||||
LOG(("@L6 DoLOEl2(%lu)", p));
|
LOG(("@L6 DoLOEl2(%lu)", p));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
push_m(arg_g(p), wsize);
|
pushw_m(arg_g(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLOEl4(arg)
|
DoLOEl4(arg)
|
||||||
|
@ -185,7 +185,7 @@ DoLOEl4(arg)
|
||||||
|
|
||||||
LOG(("@L6 DoLOEl4(%lu)", p));
|
LOG(("@L6 DoLOEl4(%lu)", p));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
push_m(arg_g(p), wsize);
|
pushw_m(arg_g(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLOEs(hob, wfac)
|
DoLOEs(hob, wfac)
|
||||||
|
@ -197,7 +197,7 @@ DoLOEs(hob, wfac)
|
||||||
|
|
||||||
LOG(("@L6 DoLOEs(%lu)", p));
|
LOG(("@L6 DoLOEs(%lu)", p));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
push_m(arg_g(p), wsize);
|
pushw_m(arg_g(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLILm(arg)
|
DoLILm(arg)
|
||||||
|
@ -208,7 +208,7 @@ DoLILm(arg)
|
||||||
|
|
||||||
LOG(("@L6 DoLILm(%ld)", l));
|
LOG(("@L6 DoLILm(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
push_m(st_lddp(loc_addr(l)), wsize);
|
pushw_m(st_lddp(loc_addr(l)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLILn2(arg)
|
DoLILn2(arg)
|
||||||
|
@ -220,7 +220,7 @@ DoLILn2(arg)
|
||||||
LOG(("@L6 DoLILn2(%ld)", l));
|
LOG(("@L6 DoLILn2(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
push_m(st_lddp(loc_addr(l)), wsize);
|
pushw_m(st_lddp(loc_addr(l)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLILn4(arg)
|
DoLILn4(arg)
|
||||||
|
@ -232,7 +232,7 @@ DoLILn4(arg)
|
||||||
LOG(("@L6 DoLILn4(%ld)", l));
|
LOG(("@L6 DoLILn4(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
push_m(st_lddp(loc_addr(l)), wsize);
|
pushw_m(st_lddp(loc_addr(l)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLILp2(arg)
|
DoLILp2(arg)
|
||||||
|
@ -244,7 +244,7 @@ DoLILp2(arg)
|
||||||
LOG(("@L6 DoLILp2(%ld)", l));
|
LOG(("@L6 DoLILp2(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
push_m(st_lddp(loc_addr(l)), wsize);
|
pushw_m(st_lddp(loc_addr(l)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLILp4(arg)
|
DoLILp4(arg)
|
||||||
|
@ -256,7 +256,7 @@ DoLILp4(arg)
|
||||||
LOG(("@L6 DoLILp4(%ld)", l));
|
LOG(("@L6 DoLILp4(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
push_m(st_lddp(loc_addr(l)), wsize);
|
pushw_m(st_lddp(loc_addr(l)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLILs(hob, wfac)
|
DoLILs(hob, wfac)
|
||||||
|
@ -269,7 +269,7 @@ DoLILs(hob, wfac)
|
||||||
LOG(("@L6 DoLILs(%ld)", l));
|
LOG(("@L6 DoLILs(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
push_m(st_lddp(loc_addr(l)), wsize);
|
pushw_m(st_lddp(loc_addr(l)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLOFl2(arg)
|
DoLOFl2(arg)
|
||||||
|
@ -281,7 +281,7 @@ DoLOFl2(arg)
|
||||||
|
|
||||||
LOG(("@L6 DoLOFl2(%ld)", l));
|
LOG(("@L6 DoLOFl2(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
push_m(p + arg_f(l), wsize);
|
pushw_m(p + arg_f(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLOFl4(arg)
|
DoLOFl4(arg)
|
||||||
|
@ -293,7 +293,7 @@ DoLOFl4(arg)
|
||||||
|
|
||||||
LOG(("@L6 DoLOFl4(%ld)", l));
|
LOG(("@L6 DoLOFl4(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
push_m(p + arg_f(l), wsize);
|
pushw_m(p + arg_f(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLOFm(arg)
|
DoLOFm(arg)
|
||||||
|
@ -305,7 +305,7 @@ DoLOFm(arg)
|
||||||
|
|
||||||
LOG(("@L6 DoLOFm(%ld)", l));
|
LOG(("@L6 DoLOFm(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
push_m(p + arg_f(l), wsize);
|
pushw_m(p + arg_f(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLOFs(hob, wfac)
|
DoLOFs(hob, wfac)
|
||||||
|
@ -318,7 +318,7 @@ DoLOFs(hob, wfac)
|
||||||
|
|
||||||
LOG(("@L6 DoLOFs(%ld)", l));
|
LOG(("@L6 DoLOFs(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
push_m(p + arg_f(l), wsize);
|
pushw_m(p + arg_f(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoLALm(arg)
|
DoLALm(arg)
|
||||||
|
@ -548,7 +548,7 @@ DoLOSl2(arg)
|
||||||
DoLOSz()
|
DoLOSz()
|
||||||
{
|
{
|
||||||
/* LOS w: Load indirect, w-byte integer on top of stack gives object size */
|
/* LOS w: Load indirect, w-byte integer on top of stack gives object size */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register ptr p;
|
register ptr p;
|
||||||
|
|
||||||
LOG(("@L6 DoLOSz(%ld)", l));
|
LOG(("@L6 DoLOSz(%ld)", l));
|
||||||
|
|
|
@ -62,7 +62,7 @@ DoANDz()
|
||||||
{
|
{
|
||||||
/* AND w: Boolean and on two groups of w bytes */
|
/* AND w: Boolean and on two groups of w bytes */
|
||||||
/* size of objects to be compared (in bytes) on top of stack */
|
/* size of objects to be compared (in bytes) on top of stack */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register ptr p;
|
register ptr p;
|
||||||
|
|
||||||
LOG(("@X6 DoANDz(%ld)", l));
|
LOG(("@X6 DoANDz(%ld)", l));
|
||||||
|
@ -129,7 +129,7 @@ DoIORs(hob, wfac)
|
||||||
DoIORz()
|
DoIORz()
|
||||||
{
|
{
|
||||||
/* IOR w: Boolean inclusive or on two groups of w bytes */
|
/* IOR w: Boolean inclusive or on two groups of w bytes */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register ptr p;
|
register ptr p;
|
||||||
|
|
||||||
LOG(("@X6 DoIORz(%ld)", l));
|
LOG(("@X6 DoIORz(%ld)", l));
|
||||||
|
@ -162,7 +162,7 @@ DoXORl2(arg)
|
||||||
DoXORz()
|
DoXORz()
|
||||||
{
|
{
|
||||||
/* XOR w: Boolean exclusive or on two groups of w bytes */
|
/* XOR w: Boolean exclusive or on two groups of w bytes */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register ptr p;
|
register ptr p;
|
||||||
|
|
||||||
LOG(("@X6 DoXORz(%ld)", l));
|
LOG(("@X6 DoXORz(%ld)", l));
|
||||||
|
@ -194,7 +194,7 @@ DoCOMl2(arg)
|
||||||
DoCOMz()
|
DoCOMz()
|
||||||
{
|
{
|
||||||
/* COM w: Complement (one's complement of top w bytes) */
|
/* COM w: Complement (one's complement of top w bytes) */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register ptr p;
|
register ptr p;
|
||||||
|
|
||||||
LOG(("@X6 DoCOMz(%ld)", l));
|
LOG(("@X6 DoCOMz(%ld)", l));
|
||||||
|
@ -211,7 +211,7 @@ DoROLl2(arg)
|
||||||
{
|
{
|
||||||
/* ROL w: Rotate left a group of w bytes */
|
/* ROL w: Rotate left a group of w bytes */
|
||||||
register size l = (L_arg_2() * arg);
|
register size l = (L_arg_2() * arg);
|
||||||
register long s, t = upop(wsize);
|
register long s, t = uwpop();
|
||||||
register long signbit;
|
register long signbit;
|
||||||
|
|
||||||
LOG(("@X6 DoROLl2(%ld)", l));
|
LOG(("@X6 DoROLl2(%ld)", l));
|
||||||
|
@ -243,8 +243,8 @@ DoROLl2(arg)
|
||||||
DoROLz()
|
DoROLz()
|
||||||
{
|
{
|
||||||
/* ROL w: Rotate left a group of w bytes */
|
/* ROL w: Rotate left a group of w bytes */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register long s, t = upop(wsize);
|
register long s, t = uwpop();
|
||||||
register long signbit;
|
register long signbit;
|
||||||
|
|
||||||
LOG(("@X6 DoROLz(%ld)", l));
|
LOG(("@X6 DoROLz(%ld)", l));
|
||||||
|
@ -278,7 +278,7 @@ DoRORl2(arg)
|
||||||
{
|
{
|
||||||
/* ROR w: Rotate right a group of w bytes */
|
/* ROR w: Rotate right a group of w bytes */
|
||||||
register size l = (L_arg_2() * arg);
|
register size l = (L_arg_2() * arg);
|
||||||
register long s, t = upop(wsize);
|
register long s, t = uwpop();
|
||||||
register long signbit;
|
register long signbit;
|
||||||
|
|
||||||
LOG(("@X6 DoRORl2(%ld)", l));
|
LOG(("@X6 DoRORl2(%ld)", l));
|
||||||
|
@ -313,8 +313,8 @@ DoRORl2(arg)
|
||||||
DoRORz()
|
DoRORz()
|
||||||
{
|
{
|
||||||
/* ROR w: Rotate right a group of w bytes */
|
/* ROR w: Rotate right a group of w bytes */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register long s, t = upop(wsize);
|
register long s, t = uwpop();
|
||||||
register long signbit;
|
register long signbit;
|
||||||
|
|
||||||
LOG(("@X6 DoRORz(%ld)", l));
|
LOG(("@X6 DoRORz(%ld)", l));
|
||||||
|
|
|
@ -86,7 +86,7 @@ DoASSl2(arg)
|
||||||
DoASSz()
|
DoASSz()
|
||||||
{
|
{
|
||||||
/* ASS w: Adjust the stack pointer by w-byte integer */
|
/* ASS w: Adjust the stack pointer by w-byte integer */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
|
|
||||||
LOG(("@M6 DoASSz(%ld)", l));
|
LOG(("@M6 DoASSz(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
@ -162,7 +162,7 @@ DoBLSl2(arg)
|
||||||
DoBLSz()
|
DoBLSz()
|
||||||
{
|
{
|
||||||
/* BLS w: Block move, size is in w-byte integer on top of stack */
|
/* BLS w: Block move, size is in w-byte integer on top of stack */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register ptr dp1, dp2;
|
register ptr dp1, dp2;
|
||||||
|
|
||||||
LOG(("@M6 DoBLSz(%ld)", l));
|
LOG(("@M6 DoBLSz(%ld)", l));
|
||||||
|
@ -196,7 +196,7 @@ DoCSAm(arg)
|
||||||
DoCSAz()
|
DoCSAz()
|
||||||
{
|
{
|
||||||
/* CSA w: Case jump; address of jump table at top of stack */
|
/* CSA w: Case jump; address of jump table at top of stack */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
|
|
||||||
LOG(("@M6 DoCSAz(%ld)", l));
|
LOG(("@M6 DoCSAz(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
@ -226,7 +226,7 @@ DoCSBm(arg)
|
||||||
DoCSBz()
|
DoCSBz()
|
||||||
{
|
{
|
||||||
/* CSB w: Table lookup jump; address of jump table at top of stack */
|
/* CSB w: Table lookup jump; address of jump table at top of stack */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
|
|
||||||
LOG(("@M6 DoCSBz(%ld)", l));
|
LOG(("@M6 DoCSBz(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
@ -290,7 +290,7 @@ DoDUSl2(arg)
|
||||||
DoDUSz()
|
DoDUSz()
|
||||||
{
|
{
|
||||||
/* DUS w: Duplicate top w bytes */
|
/* DUS w: Duplicate top w bytes */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register ptr oldSP;
|
register ptr oldSP;
|
||||||
|
|
||||||
LOG(("@M6 DoDUSz(%ld)", l));
|
LOG(("@M6 DoDUSz(%ld)", l));
|
||||||
|
@ -337,7 +337,7 @@ DoEXGs(hob, wfac)
|
||||||
DoEXGz()
|
DoEXGz()
|
||||||
{
|
{
|
||||||
/* EXG w: Exchange top w bytes */
|
/* EXG w: Exchange top w bytes */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register ptr oldSP = SP;
|
register ptr oldSP = SP;
|
||||||
|
|
||||||
LOG(("@M6 DoEXGz(%ld)", l));
|
LOG(("@M6 DoEXGz(%ld)", l));
|
||||||
|
@ -522,7 +522,7 @@ DoRCKm(arg)
|
||||||
DoRCKz()
|
DoRCKz()
|
||||||
{
|
{
|
||||||
/* RCK w: Range check; trap on error */
|
/* RCK w: Range check; trap on error */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
|
|
||||||
LOG(("@M6 DoRCKz(%ld)", l));
|
LOG(("@M6 DoRCKz(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
@ -555,11 +555,11 @@ DoRTTz()
|
||||||
}
|
}
|
||||||
|
|
||||||
/* pop the trap number */
|
/* pop the trap number */
|
||||||
upop(wsize);
|
uwpop();
|
||||||
|
|
||||||
/* restore the Function Return Area */
|
/* restore the Function Return Area */
|
||||||
FRA_def = upop(wsize);
|
FRA_def = uwpop();
|
||||||
FRASize = upop(wsize);
|
FRASize = uwpop();
|
||||||
popFRA(FRASize);
|
popFRA(FRASize);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -587,7 +587,7 @@ DoSIMz()
|
||||||
/* SIM -: Store 16 bit ignore mask */
|
/* SIM -: Store 16 bit ignore mask */
|
||||||
LOG(("@M6 DoSIMz()"));
|
LOG(("@M6 DoSIMz()"));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
IgnMask = (upop(wsize) | PreIgnMask) & MASK2;
|
IgnMask = (uwpop() | PreIgnMask) & MASK2;
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSTRs(hob, wfac)
|
DoSTRs(hob, wfac)
|
||||||
|
@ -616,7 +616,7 @@ DoSTRs(hob, wfac)
|
||||||
DoTRPz()
|
DoTRPz()
|
||||||
{
|
{
|
||||||
/* TRP -: Cause trap to occur (Error number on stack) */
|
/* TRP -: Cause trap to occur (Error number on stack) */
|
||||||
register unsigned int tr = (unsigned int)upop(wsize);
|
register unsigned int tr = (unsigned int)uwpop();
|
||||||
|
|
||||||
LOG(("@M6 DoTRPz()"));
|
LOG(("@M6 DoTRPz()"));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
@ -690,11 +690,11 @@ PRIVATE index_jump(nbytes)
|
||||||
{
|
{
|
||||||
register ptr cdp = dppop(); /* Case Descriptor Pointer */
|
register ptr cdp = dppop(); /* Case Descriptor Pointer */
|
||||||
register long t_index = /* Table INDEX */
|
register long t_index = /* Table INDEX */
|
||||||
spop(nbytes) - mem_lds(cdp + psize, wsize);
|
spop(nbytes) - mem_lds(cdp + psize, nbytes);
|
||||||
register ptr nPC; /* New Program Counter */
|
register ptr nPC; /* New Program Counter */
|
||||||
|
|
||||||
if (t_index >= 0 && t_index <= mem_lds(cdp + wsize + psize, wsize)) {
|
if (t_index >= 0 && t_index <= mem_lds(cdp + nbytes + psize, nbytes)) {
|
||||||
nPC = mem_ldip(cdp + (2 * wsize) + ((t_index + 1) * psize));
|
nPC = mem_ldip(cdp + (2 * nbytes) + ((t_index + 1) * psize));
|
||||||
}
|
}
|
||||||
else if ((nPC = mem_ldip(cdp)) == 0) {
|
else if ((nPC = mem_ldip(cdp)) == 0) {
|
||||||
trap(ECASE);
|
trap(ECASE);
|
||||||
|
@ -719,12 +719,12 @@ PRIVATE search_jump(nbytes)
|
||||||
register ptr cdp = dppop(); /* Case Descriptor Pointer */
|
register ptr cdp = dppop(); /* Case Descriptor Pointer */
|
||||||
register long sv = spop(nbytes);/* Search Value */
|
register long sv = spop(nbytes);/* Search Value */
|
||||||
register long nt = /* Number of Table-entries */
|
register long nt = /* Number of Table-entries */
|
||||||
mem_lds(cdp + psize, wsize);
|
mem_lds(cdp + psize, nbytes);
|
||||||
register ptr nPC; /* New Program Counter */
|
register ptr nPC; /* New Program Counter */
|
||||||
|
|
||||||
while (--nt >= 0) {
|
while (--nt >= 0) {
|
||||||
if (sv == mem_lds(cdp + (nt+1) * (wsize+psize), wsize)) {
|
if (sv == mem_lds(cdp + (nt+1) * (nbytes+psize), nbytes)) {
|
||||||
nPC = mem_ldip(cdp + wsize + (nt+1)*(wsize+psize));
|
nPC = mem_ldip(cdp + nbytes + (nt+1)*(nbytes+psize));
|
||||||
if (nPC == 0)
|
if (nPC == 0)
|
||||||
trap(ECASE);
|
trap(ECASE);
|
||||||
newPC(nPC);
|
newPC(nPC);
|
||||||
|
@ -754,8 +754,8 @@ PRIVATE range_check(nbytes)
|
||||||
st_lds(SP, nbytes);
|
st_lds(SP, nbytes);
|
||||||
|
|
||||||
if (must_test && !(IgnMask&BIT(ERANGE))) {
|
if (must_test && !(IgnMask&BIT(ERANGE))) {
|
||||||
if ( cv < mem_lds(rdp, wsize)
|
if ( cv < mem_lds(rdp, nbytes)
|
||||||
|| cv > mem_lds(rdp + wsize, wsize)
|
|| cv > mem_lds(rdp + nbytes, nbytes)
|
||||||
) {
|
) {
|
||||||
trap(ERANGE);
|
trap(ERANGE);
|
||||||
}
|
}
|
||||||
|
|
|
@ -141,7 +141,7 @@ DoADSm(arg)
|
||||||
DoADSz()
|
DoADSz()
|
||||||
{
|
{
|
||||||
/* ADS w: Add w-byte value and pointer */
|
/* ADS w: Add w-byte value and pointer */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register long t = spop(arg_wi(l));
|
register long t = spop(arg_wi(l));
|
||||||
register ptr p, s = st_lddp(SP);
|
register ptr p, s = st_lddp(SP);
|
||||||
|
|
||||||
|
@ -182,7 +182,7 @@ DoSBSl2(arg)
|
||||||
DoSBSz()
|
DoSBSz()
|
||||||
{
|
{
|
||||||
/* SBS w: Subtract pointers in same fragment and push diff as size w integer */
|
/* SBS w: Subtract pointers in same fragment and push diff as size w integer */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register ptr t = st_lddp(SP);
|
register ptr t = st_lddp(SP);
|
||||||
register ptr s = st_lddp(SP + psize);
|
register ptr s = st_lddp(SP + psize);
|
||||||
register long w;
|
register long w;
|
||||||
|
|
|
@ -40,7 +40,7 @@ DoINNs(hob, wfac)
|
||||||
DoINNz()
|
DoINNz()
|
||||||
{
|
{
|
||||||
/* INN w: Bit test on w byte set (bit number on top of stack) */
|
/* INN w: Bit test on w byte set (bit number on top of stack) */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
|
|
||||||
LOG(("@Y6 DoINNz(%ld)", l));
|
LOG(("@Y6 DoINNz(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
@ -73,7 +73,7 @@ DoSETs(hob, wfac)
|
||||||
DoSETz()
|
DoSETz()
|
||||||
{
|
{
|
||||||
/* SET w: Create singleton w byte set with bit n on (n is top of stack) */
|
/* SET w: Create singleton w byte set with bit n on (n is top of stack) */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
|
|
||||||
LOG(("@Y6 DoSETz(%ld)", l));
|
LOG(("@Y6 DoSETz(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
@ -93,7 +93,7 @@ PRIVATE bit_test(w)
|
||||||
size w;
|
size w;
|
||||||
{
|
{
|
||||||
register int bitno =
|
register int bitno =
|
||||||
(int) spop(wsize); /* bitno on TOS */
|
(int) swpop(); /* bitno on TOS */
|
||||||
register char test_byte = (char) 0;/* default value to be tested */
|
register char test_byte = (char) 0;/* default value to be tested */
|
||||||
|
|
||||||
if (must_test && !(IgnMask&BIT(ESET))) {
|
if (must_test && !(IgnMask&BIT(ESET))) {
|
||||||
|
@ -119,7 +119,7 @@ PRIVATE bit_test(w)
|
||||||
PRIVATE create_set(w)
|
PRIVATE create_set(w)
|
||||||
size w;
|
size w;
|
||||||
{
|
{
|
||||||
register int bitno = (int) spop(wsize);
|
register int bitno = (int) swpop();
|
||||||
register size nbytes = w;
|
register size nbytes = w;
|
||||||
|
|
||||||
st_inc(nbytes);
|
st_inc(nbytes);
|
||||||
|
|
|
@ -21,7 +21,7 @@ DoSTLm(arg)
|
||||||
|
|
||||||
LOG(("@S6 DoSTLm(%ld)", l));
|
LOG(("@S6 DoSTLm(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
pop_st(loc_addr(l), wsize);
|
popw_st(loc_addr(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSTLn2(arg)
|
DoSTLn2(arg)
|
||||||
|
@ -33,7 +33,7 @@ DoSTLn2(arg)
|
||||||
LOG(("@S6 DoSTLn2(%ld)", l));
|
LOG(("@S6 DoSTLn2(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
pop_st(loc_addr(l), wsize);
|
popw_st(loc_addr(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSTLn4(arg)
|
DoSTLn4(arg)
|
||||||
|
@ -45,7 +45,7 @@ DoSTLn4(arg)
|
||||||
LOG(("@S6 DoSTLn4(%ld)", l));
|
LOG(("@S6 DoSTLn4(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
pop_st(loc_addr(l), wsize);
|
popw_st(loc_addr(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSTLp2(arg)
|
DoSTLp2(arg)
|
||||||
|
@ -57,7 +57,7 @@ DoSTLp2(arg)
|
||||||
LOG(("@S6 DoSTLp2(%ld)", l));
|
LOG(("@S6 DoSTLp2(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
pop_st(loc_addr(l), wsize);
|
popw_st(loc_addr(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSTLp4(arg)
|
DoSTLp4(arg)
|
||||||
|
@ -69,7 +69,7 @@ DoSTLp4(arg)
|
||||||
LOG(("@S6 DoSTLp4(%ld)", l));
|
LOG(("@S6 DoSTLp4(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
pop_st(loc_addr(l), wsize);
|
popw_st(loc_addr(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSTLs(hob, wfac)
|
DoSTLs(hob, wfac)
|
||||||
|
@ -82,7 +82,7 @@ DoSTLs(hob, wfac)
|
||||||
LOG(("@S6 DoSTLs(%ld)", l));
|
LOG(("@S6 DoSTLs(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
pop_st(loc_addr(l), wsize);
|
popw_st(loc_addr(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSTEl2(arg)
|
DoSTEl2(arg)
|
||||||
|
@ -93,7 +93,7 @@ DoSTEl2(arg)
|
||||||
|
|
||||||
LOG(("@S6 DoSTEl2(%lu)", p));
|
LOG(("@S6 DoSTEl2(%lu)", p));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
pop_m(arg_g(p), wsize);
|
popw_m(arg_g(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSTEl4(arg)
|
DoSTEl4(arg)
|
||||||
|
@ -104,7 +104,7 @@ DoSTEl4(arg)
|
||||||
|
|
||||||
LOG(("@S6 DoSTEl4(%lu)", p));
|
LOG(("@S6 DoSTEl4(%lu)", p));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
pop_m(arg_g(p), wsize);
|
popw_m(arg_g(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSTEs(hob, wfac)
|
DoSTEs(hob, wfac)
|
||||||
|
@ -116,7 +116,7 @@ DoSTEs(hob, wfac)
|
||||||
|
|
||||||
LOG(("@S6 DoSTEs(%lu)", p));
|
LOG(("@S6 DoSTEs(%lu)", p));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
pop_m(arg_g(p), wsize);
|
popw_m(arg_g(p));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSILn2(arg)
|
DoSILn2(arg)
|
||||||
|
@ -128,7 +128,7 @@ DoSILn2(arg)
|
||||||
LOG(("@S6 DoSILn2(%ld)", l));
|
LOG(("@S6 DoSILn2(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
pop_m(st_lddp(loc_addr(l)), wsize);
|
popw_m(st_lddp(loc_addr(l)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSILn4(arg)
|
DoSILn4(arg)
|
||||||
|
@ -140,7 +140,7 @@ DoSILn4(arg)
|
||||||
LOG(("@S6 DoSILn4(%ld)", l));
|
LOG(("@S6 DoSILn4(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
pop_m(st_lddp(loc_addr(l)), wsize);
|
popw_m(st_lddp(loc_addr(l)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSILp2(arg)
|
DoSILp2(arg)
|
||||||
|
@ -152,7 +152,7 @@ DoSILp2(arg)
|
||||||
LOG(("@S6 DoSILp2(%ld)", l));
|
LOG(("@S6 DoSILp2(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
pop_m(st_lddp(loc_addr(l)), wsize);
|
popw_m(st_lddp(loc_addr(l)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSILp4(arg)
|
DoSILp4(arg)
|
||||||
|
@ -164,7 +164,7 @@ DoSILp4(arg)
|
||||||
LOG(("@S6 DoSILp4(%ld)", l));
|
LOG(("@S6 DoSILp4(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
pop_m(st_lddp(loc_addr(l)), wsize);
|
popw_m(st_lddp(loc_addr(l)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSILs(hob, wfac)
|
DoSILs(hob, wfac)
|
||||||
|
@ -177,7 +177,7 @@ DoSILs(hob, wfac)
|
||||||
LOG(("@S6 DoSILs(%ld)", l));
|
LOG(("@S6 DoSILs(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
l = arg_l(l);
|
l = arg_l(l);
|
||||||
pop_m(st_lddp(loc_addr(l)), wsize);
|
popw_m(st_lddp(loc_addr(l)));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSTFl2(arg)
|
DoSTFl2(arg)
|
||||||
|
@ -189,7 +189,7 @@ DoSTFl2(arg)
|
||||||
|
|
||||||
LOG(("@S6 DoSTFl2(%ld)", l));
|
LOG(("@S6 DoSTFl2(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
pop_m(p + arg_f(l), wsize);
|
popw_m(p + arg_f(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSTFl4(arg)
|
DoSTFl4(arg)
|
||||||
|
@ -201,7 +201,7 @@ DoSTFl4(arg)
|
||||||
|
|
||||||
LOG(("@S6 DoSTFl4(%ld)", l));
|
LOG(("@S6 DoSTFl4(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
pop_m(p + arg_f(l), wsize);
|
popw_m(p + arg_f(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSTFm(arg)
|
DoSTFm(arg)
|
||||||
|
@ -213,7 +213,7 @@ DoSTFm(arg)
|
||||||
|
|
||||||
LOG(("@S6 DoSTFm(%ld)", l));
|
LOG(("@S6 DoSTFm(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
pop_m(p + arg_f(l), wsize);
|
popw_m(p + arg_f(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSTFs(hob, wfac)
|
DoSTFs(hob, wfac)
|
||||||
|
@ -226,7 +226,7 @@ DoSTFs(hob, wfac)
|
||||||
|
|
||||||
LOG(("@S6 DoSTFs(%ld)", l));
|
LOG(("@S6 DoSTFs(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
pop_m(p + arg_f(l), wsize);
|
popw_m(p + arg_f(l));
|
||||||
}
|
}
|
||||||
|
|
||||||
DoSTIl2(arg)
|
DoSTIl2(arg)
|
||||||
|
@ -294,7 +294,7 @@ DoSTSl2(arg)
|
||||||
DoSTSz() /* the arg 'w' is on top of stack */
|
DoSTSz() /* the arg 'w' is on top of stack */
|
||||||
{
|
{
|
||||||
/* STS w: Store indirect, w-byte integer on top of stack gives object size */
|
/* STS w: Store indirect, w-byte integer on top of stack gives object size */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register ptr p;
|
register ptr p;
|
||||||
|
|
||||||
LOG(("@S6 DoSTSz(%ld)", l));
|
LOG(("@S6 DoSTSz(%ld)", l));
|
||||||
|
|
|
@ -48,7 +48,7 @@ DoADUl2(arg)
|
||||||
DoADUz()
|
DoADUz()
|
||||||
{
|
{
|
||||||
/* ADU w: Addition */
|
/* ADU w: Addition */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register unsigned long t = upop(arg_wi(l));
|
register unsigned long t = upop(arg_wi(l));
|
||||||
|
|
||||||
LOG(("@U6 DoADUz(%ld)", l));
|
LOG(("@U6 DoADUz(%ld)", l));
|
||||||
|
@ -71,7 +71,7 @@ DoSBUl2(arg)
|
||||||
DoSBUz()
|
DoSBUz()
|
||||||
{
|
{
|
||||||
/* SBU w: Subtraction */
|
/* SBU w: Subtraction */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register unsigned long t = upop(arg_wi(l));
|
register unsigned long t = upop(arg_wi(l));
|
||||||
|
|
||||||
LOG(("@U6 DoSBUz(%ld)", l));
|
LOG(("@U6 DoSBUz(%ld)", l));
|
||||||
|
@ -94,7 +94,7 @@ DoMLUl2(arg)
|
||||||
DoMLUz()
|
DoMLUz()
|
||||||
{
|
{
|
||||||
/* MLU w: Multiplication */
|
/* MLU w: Multiplication */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register unsigned long t = upop(arg_wi(l));
|
register unsigned long t = upop(arg_wi(l));
|
||||||
|
|
||||||
LOG(("@U6 DoMLUz(%ld)", l));
|
LOG(("@U6 DoMLUz(%ld)", l));
|
||||||
|
@ -117,7 +117,7 @@ DoDVUl2(arg)
|
||||||
DoDVUz()
|
DoDVUz()
|
||||||
{
|
{
|
||||||
/* DVU w: Division */
|
/* DVU w: Division */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register unsigned long t = upop(arg_wi(l));
|
register unsigned long t = upop(arg_wi(l));
|
||||||
|
|
||||||
LOG(("@U6 DoDVUz(%ld)", l));
|
LOG(("@U6 DoDVUz(%ld)", l));
|
||||||
|
@ -140,7 +140,7 @@ DoRMUl2(arg)
|
||||||
DoRMUz()
|
DoRMUz()
|
||||||
{
|
{
|
||||||
/* RMU w: Remainder */
|
/* RMU w: Remainder */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register unsigned long t = upop(arg_wi(l));
|
register unsigned long t = upop(arg_wi(l));
|
||||||
|
|
||||||
LOG(("@U6 DoRMUz(%ld)", l));
|
LOG(("@U6 DoRMUz(%ld)", l));
|
||||||
|
@ -153,7 +153,7 @@ DoSLUl2(arg)
|
||||||
{
|
{
|
||||||
/* SLU w: Shift left */
|
/* SLU w: Shift left */
|
||||||
register size l = (L_arg_2() * arg);
|
register size l = (L_arg_2() * arg);
|
||||||
register unsigned long t = upop(wsize);
|
register unsigned long t = uwpop();
|
||||||
|
|
||||||
LOG(("@U6 DoSLUl2(%ld)", l));
|
LOG(("@U6 DoSLUl2(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
@ -164,8 +164,8 @@ DoSLUl2(arg)
|
||||||
DoSLUz()
|
DoSLUz()
|
||||||
{
|
{
|
||||||
/* SLU w: Shift left */
|
/* SLU w: Shift left */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register unsigned long t = upop(wsize);
|
register unsigned long t = uwpop();
|
||||||
|
|
||||||
LOG(("@U6 DoSLUz(%ld)", l));
|
LOG(("@U6 DoSLUz(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
@ -178,7 +178,7 @@ DoSRUl2(arg)
|
||||||
{
|
{
|
||||||
/* SRU w: Shift right */
|
/* SRU w: Shift right */
|
||||||
register size l = (L_arg_2() * arg);
|
register size l = (L_arg_2() * arg);
|
||||||
register unsigned long t = upop(wsize);
|
register unsigned long t = uwpop();
|
||||||
|
|
||||||
LOG(("@U6 DoSRUl2(%ld)", l));
|
LOG(("@U6 DoSRUl2(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
@ -189,8 +189,8 @@ DoSRUl2(arg)
|
||||||
DoSRUz()
|
DoSRUz()
|
||||||
{
|
{
|
||||||
/* SRU w: Shift right */
|
/* SRU w: Shift right */
|
||||||
register size l = upop(wsize);
|
register size l = uwpop();
|
||||||
register unsigned long t = upop(wsize);
|
register unsigned long t = uwpop();
|
||||||
|
|
||||||
LOG(("@U6 DoSRUz(%ld)", l));
|
LOG(("@U6 DoSRUz(%ld)", l));
|
||||||
spoilFRA();
|
spoilFRA();
|
||||||
|
|
|
@ -130,7 +130,7 @@ PRIVATE std_item(addr)
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
if ( is_wordaligned(addr)
|
if ( is_wordaligned(addr)
|
||||||
&& is_in_stack(addr, wsize)
|
&& w_is_in_stack(addr)
|
||||||
&& std_bytes(addr, addr + wsize, SH_INT)
|
&& std_bytes(addr, addr + wsize, SH_INT)
|
||||||
) {
|
) {
|
||||||
/* print a word value */
|
/* print a word value */
|
||||||
|
|
|
@ -17,11 +17,13 @@
|
||||||
/******** Checks on adresses and ranges ********/
|
/******** Checks on adresses and ranges ********/
|
||||||
|
|
||||||
#define is_aligned(a,n) ((p2i(a)) % (n) == 0)
|
#define is_aligned(a,n) ((p2i(a)) % (n) == 0)
|
||||||
#define is_wordaligned(a) (((p2i(a)) & wsizem1) == 0)
|
#define is_wordaligned(a) \
|
||||||
|
(((p2i(a)) & wsizem1) == 0)
|
||||||
|
|
||||||
#define ch_aligned(a,n) { if (!is_aligned(a, min(n, wsize))) \
|
#define ch_aligned(a,n) { if (!is_aligned(a, min(n, wsize))) \
|
||||||
{ trap(EBADPTR); } }
|
{ trap(EBADPTR); } }
|
||||||
#define ch_wordaligned(a) { if (!is_wordaligned(a)) \
|
#define ch_wordaligned(a) \
|
||||||
|
{ if (!is_wordaligned(a)) \
|
||||||
{ trap(EBADPTR); } }
|
{ trap(EBADPTR); } }
|
||||||
|
|
||||||
#define in_gda(p) ((p) < HB)
|
#define in_gda(p) ((p) < HB)
|
||||||
|
@ -33,6 +35,9 @@
|
||||||
#define is_in_stack(a,n) (SP <= (a) && (a) + (n) - 1 <= ML)
|
#define is_in_stack(a,n) (SP <= (a) && (a) + (n) - 1 <= ML)
|
||||||
#define ch_in_stack(a,n) { if (!is_in_stack(a, n)) { trap(EMEMFLT); } }
|
#define ch_in_stack(a,n) { if (!is_in_stack(a, n)) { trap(EMEMFLT); } }
|
||||||
|
|
||||||
|
#define w_is_in_stack(a) (SP <= (a) && (a) + wsizem1 <= ML)
|
||||||
|
#define ch_w_in_stack(a) { if (!w_is_in_stack(a)) { trap(EMEMFLT); } }
|
||||||
|
|
||||||
#define is_in_FRA(a,n) ((a) + (n) <= FRASize)
|
#define is_in_FRA(a,n) ((a) + (n) <= FRASize)
|
||||||
|
|
||||||
|
|
||||||
|
@ -45,10 +50,14 @@
|
||||||
#define mem_lddp(a) (in_stack(a) ? st_lddp(a) : dt_lddp(a))
|
#define mem_lddp(a) (in_stack(a) ? st_lddp(a) : dt_lddp(a))
|
||||||
#define mem_ldip(a) (in_stack(a) ? st_ldip(a) : dt_ldip(a))
|
#define mem_ldip(a) (in_stack(a) ? st_ldip(a) : dt_ldip(a))
|
||||||
#define mem_ldu(a,n) (in_stack(a) ? st_ldu(a, n) : dt_ldu(a, n))
|
#define mem_ldu(a,n) (in_stack(a) ? st_ldu(a, n) : dt_ldu(a, n))
|
||||||
|
#define mem_lduw(a) (in_stack(a) ? st_lduw(a) : dt_lduw(a))
|
||||||
#define mem_lds(a,n) (in_stack(a) ? st_lds(a, n) : dt_lds(a, n))
|
#define mem_lds(a,n) (in_stack(a) ? st_lds(a, n) : dt_lds(a, n))
|
||||||
|
#define mem_ldsw(a) (in_stack(a) ? st_ldsw(a) : dt_ldsw(a))
|
||||||
|
|
||||||
#define push_m(a,n) { if (in_stack(a)) push_st(a, n); else push_dt(a, n); }
|
#define push_m(a,n) { if (in_stack(a)) push_st(a, n); else push_dt(a, n); }
|
||||||
|
#define pushw_m(a) { if (in_stack(a)) pushw_st(a); else pushw_dt(a); }
|
||||||
#define pop_m(a,n) { if (in_stack(a)) pop_st(a, n); else pop_dt(a, n); }
|
#define pop_m(a,n) { if (in_stack(a)) pop_st(a, n); else pop_dt(a, n); }
|
||||||
|
#define popw_m(a) { if (in_stack(a)) popw_st(a); else popw_dt(a); }
|
||||||
|
|
||||||
|
|
||||||
/******** Simple stack manipulation ********/
|
/******** Simple stack manipulation ********/
|
||||||
|
@ -61,6 +70,6 @@
|
||||||
|
|
||||||
extern ptr st_ldip(), dt_ldip();
|
extern ptr st_ldip(), dt_ldip();
|
||||||
extern ptr st_lddp(), dt_lddp(), dppop();
|
extern ptr st_lddp(), dt_lddp(), dppop();
|
||||||
extern long st_lds(), dt_lds(), spop(), wpop();
|
extern long st_lds(), st_ldsw(), dt_lds(), dt_ldsw(), spop(), swpop(), wpop();
|
||||||
extern unsigned long st_ldu(), dt_ldu(), upop();
|
extern unsigned long st_ldu(), st_lduw(), dt_ldu(), dt_lduw(), upop(), uwpop();
|
||||||
|
|
||||||
|
|
|
@ -70,7 +70,7 @@ extern void sync();
|
||||||
#define INT2SIZE max(wsize, 2L)
|
#define INT2SIZE max(wsize, 2L)
|
||||||
#define INT4SIZE max(wsize, 4L)
|
#define INT4SIZE max(wsize, 4L)
|
||||||
|
|
||||||
#define pop_int() ((int) spop(wsize))
|
#define pop_int() ((int) swpop())
|
||||||
#define pop_int2() ((int) spop(INT2SIZE))
|
#define pop_int2() ((int) spop(INT2SIZE))
|
||||||
#define pop_int4() (spop(INT4SIZE))
|
#define pop_int4() (spop(INT4SIZE))
|
||||||
#define pop_intp() ((int) spop(psize))
|
#define pop_intp() ((int) spop(psize))
|
||||||
|
|
|
@ -234,7 +234,7 @@ PRIVATE ptr rd_descr(type, count, pos)
|
||||||
case 1: /* m uninitialized words */
|
case 1: /* m uninitialized words */
|
||||||
j = count;
|
j = count;
|
||||||
while (j--) {
|
while (j--) {
|
||||||
dt_stn(pos, 0L, wsize);
|
dt_stw(pos, 0L);
|
||||||
pos += wsize;
|
pos += wsize;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -246,7 +246,7 @@ PRIVATE ptr rd_descr(type, count, pos)
|
||||||
break;
|
break;
|
||||||
case 3: /* m initialized wordsize integers */
|
case 3: /* m initialized wordsize integers */
|
||||||
for (j = 0; j < count; j++) {
|
for (j = 0; j < count; j++) {
|
||||||
dt_stn(pos, rd_int(wsize), wsize);
|
dt_stw(pos, rd_int(wsize));
|
||||||
pos += wsize;
|
pos += wsize;
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
|
@ -301,7 +301,7 @@ PRIVATE int rd_byte()
|
||||||
{
|
{
|
||||||
register int i;
|
register int i;
|
||||||
|
|
||||||
if ((i = fgetc(load_fp)) == EOF)
|
if ((i = getc(load_fp)) == EOF)
|
||||||
fatal("EOF reached during initialization");
|
fatal("EOF reached during initialization");
|
||||||
return (i);
|
return (i);
|
||||||
}
|
}
|
||||||
|
|
|
@ -37,7 +37,7 @@ pushrsb(rsbcode)
|
||||||
int rsbcode;
|
int rsbcode;
|
||||||
{
|
{
|
||||||
/* fill Return Status Block */
|
/* fill Return Status Block */
|
||||||
st_inc(rsbsize);
|
incSP((size)rsbsize);
|
||||||
|
|
||||||
st_stdp(SP + rsb_FIL, getFIL());
|
st_stdp(SP + rsb_FIL, getFIL());
|
||||||
st_prot(SP + rsb_FIL, psize);
|
st_prot(SP + rsb_FIL, psize);
|
||||||
|
@ -54,7 +54,7 @@ pushrsb(rsbcode)
|
||||||
st_stn(SP + rsb_PI, PI, psize);
|
st_stn(SP + rsb_PI, PI, psize);
|
||||||
st_prot(SP + rsb_PI, psize);
|
st_prot(SP + rsb_PI, psize);
|
||||||
|
|
||||||
st_stn(SP + rsb_rsbcode, (long)rsbcode, wsize);
|
st_stw(SP + rsb_rsbcode, (long)rsbcode);
|
||||||
st_prot(SP + rsb_rsbcode, wsize);
|
st_prot(SP + rsb_rsbcode, wsize);
|
||||||
|
|
||||||
newLB(SP);
|
newLB(SP);
|
||||||
|
@ -83,7 +83,7 @@ int poprsb(rtt)
|
||||||
newSP(LB);
|
newSP(LB);
|
||||||
|
|
||||||
/* get RSB code and test it for applicability */
|
/* get RSB code and test it for applicability */
|
||||||
rsbcode = st_ldu(SP + rsb_rsbcode, wsize);
|
rsbcode = st_lduw(SP + rsb_rsbcode);
|
||||||
if ((rsbcode & RSBMASK) != RSBCODE) /* no RSB at all */
|
if ((rsbcode & RSBMASK) != RSBCODE) /* no RSB at all */
|
||||||
return rsbcode;
|
return rsbcode;
|
||||||
|
|
||||||
|
|
233
util/int/stack.c
233
util/int/stack.c
|
@ -53,6 +53,8 @@ init_stack() {
|
||||||
************************************************************************
|
************************************************************************
|
||||||
* *
|
* *
|
||||||
* newSP(p) - check and adjust StackPointer. *
|
* newSP(p) - check and adjust StackPointer. *
|
||||||
|
* incSP(n) - increment stack pointer. n already checked *
|
||||||
|
* decSP(n) - decrement stack pointer. n already checked *
|
||||||
* newLB(p) - check and adjust Local Base and Actual Base *
|
* newLB(p) - check and adjust Local Base and Actual Base *
|
||||||
* *
|
* *
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
@ -102,6 +104,43 @@ newSP(ap)
|
||||||
SP = p;
|
SP = p;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
incSP(n)
|
||||||
|
#ifdef LOGGING
|
||||||
|
register
|
||||||
|
#endif
|
||||||
|
size n;
|
||||||
|
{
|
||||||
|
register ptr p = SP - n;
|
||||||
|
|
||||||
|
if (p < HP || maxstack || p < SL) newSP(p);
|
||||||
|
else {
|
||||||
|
LOG(("@s6 newSP(%lu), ML = %lu, SP = %lu", p, ML, SP));
|
||||||
|
#ifdef LOGGING
|
||||||
|
/* inline version of st_clear_area.
|
||||||
|
*/
|
||||||
|
SP = p;
|
||||||
|
{
|
||||||
|
while (n--) {
|
||||||
|
st_undef(p);
|
||||||
|
p++;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
decSP(n)
|
||||||
|
size n;
|
||||||
|
{
|
||||||
|
register ptr p = SP + n;
|
||||||
|
|
||||||
|
if (LB < p) newSP(p);
|
||||||
|
else {
|
||||||
|
LOG(("@s6 newSP(%lu), ML = %lu, SP = %lu", p, ML, SP));
|
||||||
|
SP = p;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
newLB(p)
|
newLB(p)
|
||||||
ptr p;
|
ptr p;
|
||||||
{
|
{
|
||||||
|
@ -126,6 +165,7 @@ newLB(p)
|
||||||
* st_stdp(addr, p) - STore Data Pointer. *
|
* st_stdp(addr, p) - STore Data Pointer. *
|
||||||
* st_stip(addr, p) - STore Instruction Pointer. *
|
* st_stip(addr, p) - STore Instruction Pointer. *
|
||||||
* st_stn(addr, l, n) - STore N byte integer. *
|
* st_stn(addr, l, n) - STore N byte integer. *
|
||||||
|
* st_stw(addr, l) - STore wordsize integer. *
|
||||||
* st_stf(addr, f, n) - STore Floating point number. *
|
* st_stf(addr, f, n) - STore Floating point number. *
|
||||||
* *
|
* *
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
@ -194,6 +234,32 @@ st_stn(addr, al, n)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
st_stw(addr, al)
|
||||||
|
register ptr addr;
|
||||||
|
long al;
|
||||||
|
{
|
||||||
|
register int i;
|
||||||
|
register long l = al;
|
||||||
|
#ifdef LOGGING
|
||||||
|
/* a psize zero is ambiguous */
|
||||||
|
int sh_flags = (l == 0 && wsize == psize) ? (SH_INT|SH_DATAP) : SH_INT;
|
||||||
|
#endif
|
||||||
|
|
||||||
|
LOG(("@s6 st_stw(%lu, %ld)", addr, l));
|
||||||
|
ch_w_in_stack(addr);
|
||||||
|
ch_wordaligned(addr);
|
||||||
|
|
||||||
|
/* store the bytes */
|
||||||
|
for (i = (int) wsize; i > 0; i--, addr++) {
|
||||||
|
ch_st_prot(addr);
|
||||||
|
stack_loc(addr) = (char) l;
|
||||||
|
#ifdef LOGGING
|
||||||
|
st_sh(addr) = sh_flags;
|
||||||
|
#endif LOGGING
|
||||||
|
l = l>>8;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
st_stf(addr, f, n)
|
st_stf(addr, f, n)
|
||||||
register ptr addr;
|
register ptr addr;
|
||||||
|
@ -226,7 +292,9 @@ st_stf(addr, f, n)
|
||||||
* st_lddp(addr) - LoaD Data Pointer from stack. *
|
* st_lddp(addr) - LoaD Data Pointer from stack. *
|
||||||
* st_ldip(addr) - LoaD Instruction Pointer from stack. *
|
* st_ldip(addr) - LoaD Instruction Pointer from stack. *
|
||||||
* st_ldu(addr, n) - LoaD n Unsigned bytes from stack. *
|
* st_ldu(addr, n) - LoaD n Unsigned bytes from stack. *
|
||||||
|
* st_lduw(addr) - LoaD wsize Unsigned bytes from stack. *
|
||||||
* st_lds(addr, n) - LoaD n Signed bytes from stack. *
|
* st_lds(addr, n) - LoaD n Signed bytes from stack. *
|
||||||
|
* st_ldsw(addr) - LoaD wsize Signed bytes from stack. *
|
||||||
* st_ldf(addr, n) - LoaD Floating point number from stack. *
|
* st_ldf(addr, n) - LoaD Floating point number from stack. *
|
||||||
* *
|
* *
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
@ -291,13 +359,39 @@ unsigned long st_ldu(addr, n)
|
||||||
}
|
}
|
||||||
#endif LOGGING
|
#endif LOGGING
|
||||||
|
|
||||||
for (i = (int) n-1; i >= 0; i--) {
|
addr += n-1;
|
||||||
u = (u<<8) | (btou(stack_loc(addr + i)));
|
for (i = (int) n-1; i >= 0; i--, addr--) {
|
||||||
|
u = (u<<8) | (btou(stack_loc(addr)));
|
||||||
}
|
}
|
||||||
LOG(("@s6 st_ldu() returns %ld", u));
|
LOG(("@s6 st_ldu() returns %ld", u));
|
||||||
return (u);
|
return (u);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned long st_lduw(addr)
|
||||||
|
register ptr addr;
|
||||||
|
{
|
||||||
|
register int i;
|
||||||
|
register unsigned long u = 0;
|
||||||
|
|
||||||
|
LOG(("@s6 st_lduw(%lu)", addr));
|
||||||
|
|
||||||
|
ch_w_in_stack(addr);
|
||||||
|
ch_wordaligned(addr);
|
||||||
|
#ifdef LOGGING
|
||||||
|
if (!is_st_set(addr, wsize, SH_INT)) {
|
||||||
|
warning(WLIEXP);
|
||||||
|
warn_stbits(addr, wsize);
|
||||||
|
}
|
||||||
|
#endif LOGGING
|
||||||
|
|
||||||
|
addr += wsize - 1;
|
||||||
|
for (i = (int) wsize-1; i >= 0; i--, addr--) {
|
||||||
|
u = (u<<8) | (btou(stack_loc(addr)));
|
||||||
|
}
|
||||||
|
LOG(("@s6 st_lduw() returns %ld", u));
|
||||||
|
return (u);
|
||||||
|
}
|
||||||
|
|
||||||
long st_lds(addr, n)
|
long st_lds(addr, n)
|
||||||
register ptr addr;
|
register ptr addr;
|
||||||
size n;
|
size n;
|
||||||
|
@ -316,14 +410,41 @@ long st_lds(addr, n)
|
||||||
}
|
}
|
||||||
#endif LOGGING
|
#endif LOGGING
|
||||||
|
|
||||||
l = btos(stack_loc(addr + n - 1));
|
addr += n - 2;
|
||||||
for (i = n - 2; i >= 0; i--) {
|
l = btos(stack_loc(addr + 1));
|
||||||
l = (l<<8) | btol(stack_loc(addr + i));
|
for (i = n - 2; i >= 0; i--, addr--) {
|
||||||
|
l = (l<<8) | btol(stack_loc(addr));
|
||||||
}
|
}
|
||||||
LOG(("@s6 st_lds() returns %ld", l));
|
LOG(("@s6 st_lds() returns %ld", l));
|
||||||
return (l);
|
return (l);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long st_ldsw(addr)
|
||||||
|
register ptr addr;
|
||||||
|
{
|
||||||
|
register int i;
|
||||||
|
register long l;
|
||||||
|
|
||||||
|
LOG(("@s6 st_ldsw(%lu)", addr));
|
||||||
|
|
||||||
|
ch_w_in_stack(addr);
|
||||||
|
ch_wordaligned(addr);
|
||||||
|
#ifdef LOGGING
|
||||||
|
if (!is_st_set(addr, wsize, SH_INT)) {
|
||||||
|
warning(WLIEXP);
|
||||||
|
warn_stbits(addr, wsize);
|
||||||
|
}
|
||||||
|
#endif LOGGING
|
||||||
|
|
||||||
|
addr += wsize - 2;
|
||||||
|
l = btos(stack_loc(addr+1));
|
||||||
|
for (i = wsize - 2; i >= 0; i--, addr--) {
|
||||||
|
l = (l<<8) | btol(stack_loc(addr));
|
||||||
|
}
|
||||||
|
LOG(("@s6 st_ldsw() returns %ld", l));
|
||||||
|
return (l);
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
double st_ldf(addr, n)
|
double st_ldf(addr, n)
|
||||||
register ptr addr;
|
register ptr addr;
|
||||||
|
@ -425,9 +546,13 @@ st_mvd(s, d, n) /* d -> s */
|
||||||
* *
|
* *
|
||||||
* dppop() - pop a data ptr, return a ptr. *
|
* dppop() - pop a data ptr, return a ptr. *
|
||||||
* upop(n) - pop n unsigned bytes, return a long. *
|
* upop(n) - pop n unsigned bytes, return a long. *
|
||||||
|
* uwpop() - pop wsize unsigned bytes, return a long. *
|
||||||
* spop(n) - pop n signed bytes, return a long. *
|
* spop(n) - pop n signed bytes, return a long. *
|
||||||
|
* swpop() - pop wsize signed bytes, return a long. *
|
||||||
* pop_dt(d, n) - pop n bytes, store at address d in data. *
|
* pop_dt(d, n) - pop n bytes, store at address d in data. *
|
||||||
|
* popw_dt(d) - pop wsize bytes, store at address d in data. *
|
||||||
* pop_st(s, n) - pop n bytes, store at address s in stack. *
|
* pop_st(s, n) - pop n bytes, store at address s in stack. *
|
||||||
|
* popw_st(s) - pop wsize bytes, store at address s in stack. *
|
||||||
* fpop() - pop a floating point number. *
|
* fpop() - pop a floating point number. *
|
||||||
* wpop() - pop a signed word, don't care about any type. *
|
* wpop() - pop a signed word, don't care about any type. *
|
||||||
* *
|
* *
|
||||||
|
@ -438,7 +563,7 @@ ptr dppop()
|
||||||
register ptr p;
|
register ptr p;
|
||||||
|
|
||||||
p = st_lddp(SP);
|
p = st_lddp(SP);
|
||||||
st_dec(psize);
|
decSP(psize);
|
||||||
LOG(("@s7 dppop(), return: %lu", p));
|
LOG(("@s7 dppop(), return: %lu", p));
|
||||||
return (p);
|
return (p);
|
||||||
}
|
}
|
||||||
|
@ -449,22 +574,42 @@ unsigned long upop(n)
|
||||||
register unsigned long l;
|
register unsigned long l;
|
||||||
|
|
||||||
l = st_ldu(SP, n);
|
l = st_ldu(SP, n);
|
||||||
st_dec(max(n, wsize));
|
decSP(max(n, wsize));
|
||||||
LOG(("@s7 upop(), return: %lu", l));
|
LOG(("@s7 upop(), return: %lu", l));
|
||||||
return (l);
|
return (l);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
unsigned long uwpop()
|
||||||
|
{
|
||||||
|
register unsigned long l;
|
||||||
|
|
||||||
|
l = st_lduw(SP);
|
||||||
|
decSP(wsize);
|
||||||
|
LOG(("@s7 uwpop(), return: %lu", l));
|
||||||
|
return (l);
|
||||||
|
}
|
||||||
|
|
||||||
long spop(n)
|
long spop(n)
|
||||||
size n;
|
size n;
|
||||||
{
|
{
|
||||||
register long l;
|
register long l;
|
||||||
|
|
||||||
l = st_lds(SP, n);
|
l = st_lds(SP, n);
|
||||||
st_dec(max(n, wsize));
|
decSP(max(n, wsize));
|
||||||
LOG(("@s7 spop(), return: %ld", l));
|
LOG(("@s7 spop(), return: %ld", l));
|
||||||
return (l);
|
return (l);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
long swpop()
|
||||||
|
{
|
||||||
|
register long l;
|
||||||
|
|
||||||
|
l = st_ldsw(SP);
|
||||||
|
decSP(wsize);
|
||||||
|
LOG(("@s7 swpop(), return: %ld", l));
|
||||||
|
return (l);
|
||||||
|
}
|
||||||
|
|
||||||
pop_dt(d, n)
|
pop_dt(d, n)
|
||||||
ptr d;
|
ptr d;
|
||||||
size n;
|
size n;
|
||||||
|
@ -473,10 +618,17 @@ pop_dt(d, n)
|
||||||
dt_stn(d, (long) upop(n), n);
|
dt_stn(d, (long) upop(n), n);
|
||||||
else {
|
else {
|
||||||
dt_mvs(d, SP, n);
|
dt_mvs(d, SP, n);
|
||||||
st_dec(n);
|
decSP(n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
popw_dt(d)
|
||||||
|
ptr d;
|
||||||
|
{
|
||||||
|
dt_mvs(d, SP, wsize);
|
||||||
|
decSP(wsize);
|
||||||
|
}
|
||||||
|
|
||||||
pop_st(s, n)
|
pop_st(s, n)
|
||||||
ptr s;
|
ptr s;
|
||||||
size n;
|
size n;
|
||||||
|
@ -485,10 +637,17 @@ pop_st(s, n)
|
||||||
st_stn(s, (long) upop(n), n);
|
st_stn(s, (long) upop(n), n);
|
||||||
else {
|
else {
|
||||||
st_mvs(s, SP, n);
|
st_mvs(s, SP, n);
|
||||||
st_dec(n);
|
decSP(n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
popw_st(s)
|
||||||
|
ptr s;
|
||||||
|
{
|
||||||
|
st_mvs(s, SP, wsize);
|
||||||
|
decSP(wsize);
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
double fpop(n)
|
double fpop(n)
|
||||||
size n;
|
size n;
|
||||||
|
@ -496,7 +655,7 @@ double fpop(n)
|
||||||
double d;
|
double d;
|
||||||
|
|
||||||
d = st_ldf(SP, n);
|
d = st_ldf(SP, n);
|
||||||
st_dec(n);
|
decSP(n);
|
||||||
return (d);
|
return (d);
|
||||||
}
|
}
|
||||||
#endif NOFLOAT
|
#endif NOFLOAT
|
||||||
|
@ -506,7 +665,7 @@ long wpop()
|
||||||
register long l;
|
register long l;
|
||||||
|
|
||||||
l = w_in_stack(SP);
|
l = w_in_stack(SP);
|
||||||
st_dec(wsize);
|
decSP(wsize);
|
||||||
return (l);
|
return (l);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -518,7 +677,9 @@ long wpop()
|
||||||
* wpush(l) - push a word, load from l. *
|
* wpush(l) - push a word, load from l. *
|
||||||
* npush(l, n) - push n bytes, load from l. *
|
* npush(l, n) - push n bytes, load from l. *
|
||||||
* push_dt(d, n) - push n bytes, load from address d in data. *
|
* push_dt(d, n) - push n bytes, load from address d in data. *
|
||||||
|
* pushw_dt(d) - push wsize bytes, load from address d in data.*
|
||||||
* push_st(s, n) - push n bytes, load from address s in stack. *
|
* push_st(s, n) - push n bytes, load from address s in stack. *
|
||||||
|
* pushw_st(s) - push wsize bytes, load from address s in stack.*
|
||||||
* fpush(f, n) - push a floating point number, of size n. *
|
* fpush(f, n) - push a floating point number, of size n. *
|
||||||
* *
|
* *
|
||||||
************************************************************************/
|
************************************************************************/
|
||||||
|
@ -526,31 +687,31 @@ long wpop()
|
||||||
dppush(p)
|
dppush(p)
|
||||||
ptr p;
|
ptr p;
|
||||||
{
|
{
|
||||||
st_inc(psize);
|
incSP(psize);
|
||||||
st_stdp(SP, p);
|
st_stdp(SP, p);
|
||||||
}
|
}
|
||||||
|
|
||||||
wpush(l)
|
wpush(l)
|
||||||
long l;
|
long l;
|
||||||
{
|
{
|
||||||
st_inc(wsize);
|
incSP(wsize);
|
||||||
st_stn(SP, l, wsize);
|
st_stw(SP, l);
|
||||||
}
|
}
|
||||||
|
|
||||||
npush(l, n)
|
npush(l, n)
|
||||||
register long l;
|
register long l;
|
||||||
size n;
|
register size n;
|
||||||
{
|
{
|
||||||
size m = max(n, wsize);
|
if (n <= wsize) {
|
||||||
|
incSP(wsize);
|
||||||
st_inc(m);
|
if (n == 1) l &= MASK1;
|
||||||
if (n == 1)
|
else if (n == 2) l &= MASK2;
|
||||||
l &= MASK1;
|
st_stw(SP, l);
|
||||||
else
|
}
|
||||||
if (n == 2)
|
else {
|
||||||
l &= MASK2;
|
incSP(n);
|
||||||
st_stn(SP, l, m);
|
st_stn(SP, l, n);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
push_dt(d, n)
|
push_dt(d, n)
|
||||||
|
@ -561,11 +722,18 @@ push_dt(d, n)
|
||||||
npush((long) dt_ldu(d, n), n);
|
npush((long) dt_ldu(d, n), n);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
st_inc(n);
|
incSP(n);
|
||||||
st_mvd(SP, d, n);
|
st_mvd(SP, d, n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pushw_dt(d)
|
||||||
|
ptr d;
|
||||||
|
{
|
||||||
|
incSP(wsize);
|
||||||
|
st_mvd(SP, d, wsize);
|
||||||
|
}
|
||||||
|
|
||||||
push_st(s, n)
|
push_st(s, n)
|
||||||
ptr s;
|
ptr s;
|
||||||
size n;
|
size n;
|
||||||
|
@ -574,17 +742,24 @@ push_st(s, n)
|
||||||
npush((long) st_ldu(s, n), n);
|
npush((long) st_ldu(s, n), n);
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
st_inc(n);
|
incSP(n);
|
||||||
st_mvs(SP, s, n);
|
st_mvs(SP, s, n);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pushw_st(s)
|
||||||
|
ptr s;
|
||||||
|
{
|
||||||
|
incSP(wsize);
|
||||||
|
st_mvs(SP, s, wsize);
|
||||||
|
}
|
||||||
|
|
||||||
#ifndef NOFLOAT
|
#ifndef NOFLOAT
|
||||||
fpush(f, n)
|
fpush(f, n)
|
||||||
double f;
|
double f;
|
||||||
size n;
|
size n;
|
||||||
{
|
{
|
||||||
st_inc(n);
|
incSP(n);
|
||||||
st_stf(SP, f, n);
|
st_stf(SP, f, n);
|
||||||
}
|
}
|
||||||
#endif NOFLOAT
|
#endif NOFLOAT
|
||||||
|
|
Loading…
Reference in a new issue