summary refs log tree commit diff
path: root/lisc
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-08-24 17:46:43 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-15 23:01:32 -0400
commit5b93eb644a10ec98d3155a05a1a5509b3167700c (patch)
treec0cdf41828e9c303fdb3c0e32623defaaf84c749 /lisc
parent7beed9e6cf1ebc8bfb995e317f933781c4f2964a (diff)
downloadroux-5b93eb644a10ec98d3155a05a1a5509b3167700c.tar.gz
fix two bugs in new emit
Diffstat (limited to 'lisc')
-rw-r--r--lisc/emit.c5
1 files changed, 2 insertions, 3 deletions
diff --git a/lisc/emit.c b/lisc/emit.c
index eba04ac..8729d66 100644
--- a/lisc/emit.c
+++ b/lisc/emit.c
@@ -184,8 +184,7 @@ eins(Ins i, Fn *fn, FILE *f)
 		break;
 	case OSext:
 	case OZext:
-		emitf(fn, f, "\t%sq %R, %W%R\n", otoa[i.op],
-			i.arg[0], i.wide, i.to.val);
+		emitf(fn, f, "\t%sq %R, %W%R\n", otoa[i.op], i.arg[0], i.wide, i.to);
 		break;
 	case OCopy:
 		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);
 		break;
 	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;
 	case OSign:
 		if (req(i.to, TMP(RDX)) && req(i.arg[0], TMP(RAX))) {