diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-08-16 11:34:52 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-15 23:01:31 -0400 |
commit | 16fe5c13668d9ccc8f3b14c6c20565dfe5a26d57 (patch) | |
tree | 70a7bce825b8d57b74d776c8e2292369a12e97c5 /lisc/emit.c | |
parent | ca3dc70ff3e4caf57f32e5a0da7be29ccf222213 (diff) | |
download | roux-16fe5c13668d9ccc8f3b14c6c20565dfe5a26d57.tar.gz |
compile branches on and using test
Diffstat (limited to 'lisc/emit.c')
-rw-r--r-- | lisc/emit.c | 9 |
1 files changed, 7 insertions, 2 deletions
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; |