From 16fe5c13668d9ccc8f3b14c6c20565dfe5a26d57 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Sun, 16 Aug 2015 11:34:52 -0400 Subject: compile branches on and using test --- lisc/emit.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lisc/emit.c') diff --git a/lisc/emit.c b/lisc/emit.c index 00bce4b..3e03a81 100644 --- a/lisc/emit.c +++ b/lisc/emit.c @@ -145,6 +145,10 @@ eins(Ins i, Fn *fn, FILE *f) [OLoadus] = "movzw", [OLoadsb] = "movsb", [OLoadub] = "movzb", + [OXCmpw] = "cmpl", + [OXCmpl] = "cmpq", + [OXTestw] = "testl", + [OXTestl] = "testq", }; static char *stoa[] = { [OStorel - OStorel] = "q", @@ -240,8 +244,9 @@ eins(Ins i, Fn *fn, FILE *f) break; case OXCmpw: case OXCmpl: - eop(i.op == OXCmpw ? "cmpl" : "cmpq", - i.arg[0], i.arg[1], fn, f); + case OXTestw: + case OXTestl: + eop(otoa[i.op], i.arg[0], i.arg[1], fn, f); break; case ONop: break; -- cgit 1.4.1