change the wide bit to a class number

This commit is contained in:
Quentin Carbonneaux 2015-11-30 11:44:37 -05:00
parent 5097cf1d42
commit af1a5079fd
5 changed files with 54 additions and 32 deletions

View file

@ -92,17 +92,20 @@ bnew()
}
void
emit(int op, int w, Ref to, Ref arg0, Ref arg1)
emit(int op, int k, Ref to, Ref arg0, Ref arg1)
{
if (curi == insb)
diag("emit: too many instructions");
*--curi = (Ins){op, w, to, {arg0, arg1}};
*--curi = (Ins){
.op = op, .cls = k,
.to = to, .arg = {arg0, arg1}
};
}
void
emiti(Ins i)
{
emit(i.op, i.wide, i.to, i.arg[0], i.arg[1]);
emit(i.op, i.cls, i.to, i.arg[0], i.arg[1]);
}
int