Added a command to kill a register
This commit is contained in:
parent
adc8fc6e9e
commit
74546bd985
|
@ -37,6 +37,7 @@
|
|||
#define DO_DLINE 21
|
||||
#define DO_SETCC 22
|
||||
#define DO_TOSTACK 23
|
||||
#define DO_KILLREG 24
|
||||
|
||||
#ifndef MAXATT
|
||||
#define MAXATT TOKENSIZE
|
||||
|
|
|
@ -482,12 +482,14 @@ normalfailed: if (stackpad!=tokpatlen) {
|
|||
rp->r_contents.t_token=0;
|
||||
break;
|
||||
}
|
||||
case DO_KILLREG:
|
||||
case DO_RREMOVE: { /* register remove */
|
||||
register i;
|
||||
int nodeno;
|
||||
token_p tp;
|
||||
tkdef_p tdp;
|
||||
result_t result;
|
||||
int dokill = (codep[-1] & 037) == DO_KILLREG;
|
||||
|
||||
DEBUG("RREMOVE");
|
||||
getint(nodeno,codep);
|
||||
|
@ -495,6 +497,7 @@ normalfailed: if (stackpad!=tokpatlen) {
|
|||
if (result.e_typ!=EV_REG)
|
||||
break;
|
||||
if ( in_stack(result.e_v.e_reg) ) BROKE() ; /* Check aside-stack */
|
||||
if (dokill) machregs[result.e_v.e_reg].r_contents.t_token = 0;
|
||||
for (tp= &fakestack[stackheight-tokpatlen-1];tp>=&fakestack[0];tp--)
|
||||
if (tp->t_token==-1) {
|
||||
if(tp->t_att[0].ar==result.e_v.e_reg)
|
||||
|
|
|
@ -716,7 +716,7 @@ varinfo *kills,*allocates,*generates,*yields,*leaving;
|
|||
code53(DO_REMOVE,0);
|
||||
codeint(vp->vi_int[0]);
|
||||
} else {
|
||||
code8(DO_RREMOVE);
|
||||
code8(DO_KILLREG);
|
||||
codeint(-vp->vi_int[0] - 1);
|
||||
}
|
||||
codenl();
|
||||
|
|
Loading…
Reference in a new issue