Added support for volatile

This commit is contained in:
ceriel 1991-10-02 13:03:31 +00:00
parent ed1a07a874
commit 2b7aae3b44
4 changed files with 9 additions and 1 deletions

View file

@ -122,7 +122,7 @@ STATIC struct {
/* mon */ HOPELESS, XXX, XXX, XXX, XXX,
/* ngf */ UNAIR_OP, ARGW, XXX, ARGW, FLT,
/* ngi */ UNAIR_OP, ARGW, XXX, ARGW, ANY,
/* nop */ IGNORE, XXX, XXX, XXX, XXX,
/* nop */ HOPELESS, XXX, XXX, XXX, XXX,
/* rck */ BBLOCK_END, XXX, XXX, XXX, XXX,
/* ret */ BBLOCK_END, XXX, XXX, XXX, XXX,
/* rmi */ BINAIR_OP, ARGW, ARGW, ARGW, ANY,

View file

@ -267,6 +267,7 @@ hopeless(instr)
break;
case op_mon:
case op_str:
case op_nop: /* for volatiles */
/* We can't even trust "static" entities. */
kill_all();
clr_stack();

View file

@ -143,6 +143,9 @@ STATIC anal_instr(p,b,cf)
case ps_hol:
check_labels(p,ARG(l));
break;
case op_nop: /* volatile */
UNSUITABLE(p);
break;
}
}
}

View file

@ -118,6 +118,10 @@ STATIC check_local_use(l,locs)
default:
return;
}
if (l->l_next && INSTR(l->l_next) == op_nop) {
/* volatile */
return;
}
localvar(off_set(l),sz,locs,FALSE,(offset) 0);
}