fix two bugs in new emit

This commit is contained in:
Quentin Carbonneaux 2015-08-24 17:46:43 -04:00
parent 7beed9e6cf
commit 5b93eb644a

View file

@ -184,8 +184,7 @@ eins(Ins i, Fn *fn, FILE *f)
break; break;
case OSext: case OSext:
case OZext: case OZext:
emitf(fn, f, "\t%sq %R, %W%R\n", otoa[i.op], emitf(fn, f, "\t%sq %R, %W%R\n", otoa[i.op], i.arg[0], i.wide, i.to);
i.arg[0], i.wide, i.to.val);
break; break;
case OCopy: case OCopy:
if (req(i.to, R)) if (req(i.to, R))
@ -221,7 +220,7 @@ eins(Ins i, Fn *fn, FILE *f)
emitf(fn, f, "\tlea%w %M, %R\n", i.wide, i.arg[0], i.to); emitf(fn, f, "\tlea%w %M, %R\n", i.wide, i.arg[0], i.to);
break; break;
case OSwap: case OSwap:
emitf(fn, f, "\txchg%w %R, %R", i.wide, i.arg[0], i.arg[1]); emitf(fn, f, "\txchg%w %R, %R\n", i.wide, i.arg[0], i.arg[1]);
break; break;
case OSign: case OSign:
if (req(i.to, TMP(RDX)) && req(i.arg[0], TMP(RAX))) { if (req(i.to, TMP(RDX)) && req(i.arg[0], TMP(RAX))) {