split cmp in two sizes

This commit is contained in:
Quentin Carbonneaux 2015-08-06 16:35:17 -04:00
parent 27f32f26b3
commit 7dc3e5dcf6
5 changed files with 20 additions and 8 deletions

View file

@ -43,7 +43,6 @@ static char *rtoa[] = {
static char *rbtoa[] = {
[RXX] = "OH GOD!",
[RAX] = "al",
[RCX] = "cl",
[RDX] = "dl",
@ -166,8 +165,10 @@ eins(Ins i, Fn *fn, FILE *f)
case OXDiv:
eop("idiv", i.arg[0], R, fn, f);
break;
case OXCmp:
eop("cmp", i.arg[0], i.arg[1], fn, f);
case OXCmpw:
case OXCmpl:
eop(i.op == OXCmpw ? "cmpl" : "cmpq",
i.arg[0], i.arg[1], fn, f);
break;
case ONop:
break;