diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-08-07 16:01:07 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-15 23:01:30 -0400 |
commit | e65a615c903c96eaaad17a05e83d1d763cc21675 (patch) | |
tree | e6596e00623620092f727d02c63f05b887797e9f /lisc/parse.c | |
parent | ad012e9d558138b61881156ab8b31e74cd759825 (diff) | |
download | roux-e65a615c903c96eaaad17a05e83d1d763cc21675.tar.gz |
jez becomes jnz, complete cmp+jmp contraction
Diffstat (limited to 'lisc/parse.c')
-rw-r--r-- | lisc/parse.c | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lisc/parse.c b/lisc/parse.c index 8320a87..eca9d1d 100644 --- a/lisc/parse.c +++ b/lisc/parse.c @@ -53,7 +53,7 @@ typedef enum { TCsle, TPhi, TJmp, - TJez, + TJnz, TRet, TW, TL, @@ -138,7 +138,7 @@ lex() { "csle", TCsle }, { "phi", TPhi }, { "jmp", TJmp }, - { "jez", TJez }, + { "jnz", TJnz }, { "ret", TRet }, { "w", TW }, { "l", TL }, @@ -396,11 +396,11 @@ parseline(PState ps) case TJmp: curb->jmp.type = JJmp; goto Jump; - case TJez: - curb->jmp.type = JJez; + case TJnz: + curb->jmp.type = JJnz; r = parseref(); if (req(r, R)) - err("invalid argument for jez jump"); + err("invalid argument for jnz jump"); curb->jmp.arg = r; expect(TComma); Jump: @@ -582,7 +582,7 @@ void printfn(Fn *fn, FILE *f) { static char *jtoa[JLast] = { - [JJez] = "jez", + [JJnz] = "jnz", [JXJc+Ceq] = "xjeq", [JXJc+Csle] = "xjsle", [JXJc+Cslt] = "xjslt", @@ -642,7 +642,7 @@ printfn(Fn *fn, FILE *f) break; default: fprintf(f, "\t%s ", jtoa[b->jmp.type]); - if (b->jmp.type == JJez) { + if (b->jmp.type == JJnz) { printref(b->jmp.arg, fn, f); fprintf(f, ", "); } |