summary refs log tree commit diff
path: root/lisc
diff options
context:
space:
mode:
authorQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-08-12 12:01:47 -0400
committerQuentin Carbonneaux <quentin.carbonneaux@yale.edu>2015-09-15 23:01:31 -0400
commit8be35bf2be509f32d2fccc182743ae409838c4e4 (patch)
treeb198500daa5a74675177b92983ee69720377aeca /lisc
parent8020748fbfe6937a50ed099b5f8d3262e686e75c (diff)
downloadroux-8be35bf2be509f32d2fccc182743ae409838c4e4.tar.gz
minor size optimization for 0XSet
Diffstat (limited to 'lisc')
-rw-r--r--lisc/emit.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/lisc/emit.c b/lisc/emit.c
index 80df768..15be31e 100644
--- a/lisc/emit.c
+++ b/lisc/emit.c
@@ -223,10 +223,12 @@ eins(Ins i, Fn *fn, FILE *f)
 		break;
 	default:
 		if (OXSet <= i.op && i.op <= OXSet1) {
-			eop("mov $0,", i.to, R, fn, f);
 			fprintf(f, "\tset%s %%%s\n",
 				ctoa[i.op-OXSet],
 				rsub[RBASE(i.to.val)][SByte]);
+			fprintf(f, "\tmovzb %%%s, %%%s\n",
+				rsub[RBASE(i.to.val)][SByte],
+				rtoa(i.to.val));
 			break;
 		}
 		diag("emit: unhandled instruction (3)");