From e5a7482b54f0840d4b9fe37488020410cd67a684 Mon Sep 17 00:00:00 2001 From: Quentin Carbonneaux Date: Sat, 18 Jul 2015 16:41:02 -0400 Subject: rename mod to rem --- lisc/lisc.h | 16 ++++++---------- lisc/parse.c | 10 +++++----- 2 files changed, 11 insertions(+), 15 deletions(-) diff --git a/lisc/lisc.h b/lisc/lisc.h index 7e8b75a..66f12ad 100644 --- a/lisc/lisc.h +++ b/lisc/lisc.h @@ -52,24 +52,20 @@ enum { #define CONST(x) (Ref){RConst, x} static inline int req(Ref a, Ref b) -{ - return a.type == b.type && a.val == b.val; -} +{ return a.type == b.type && a.val == b.val; } static inline int rtype(Ref r) -{ - return req(r, R) ? -1 : r.type; -} +{ return req(r, R) ? -1 : r.type; } enum { OXXX = 0, + /* public instruction */ OAdd, OSub, ODiv, - OMod, - OCopy, - + ORem, /* reserved instructions */ - OX86Div, + OCopy, + OXDiv, OLast }; diff --git a/lisc/parse.c b/lisc/parse.c index 7a9da59..6f5a030 100644 --- a/lisc/parse.c +++ b/lisc/parse.c @@ -13,7 +13,7 @@ OpDesc opdesc[OLast] = { [OAdd] = { 2, 1, "add" }, [OSub] = { 2, 0, "sub" }, [ODiv] = { 2, 0, "div" }, - [OMod] = { 2, 0, "mod" }, + [ORem] = { 2, 0, "mod" }, [OCopy] = { 1, 0, "copy" }, }; @@ -31,7 +31,7 @@ typedef enum { TAdd, TSub, TDiv, - TMod, + TRem, TPhi, TJmp, TJez, @@ -97,7 +97,7 @@ lex() { "add", TAdd }, { "sub", TSub }, { "div", TDiv }, - { "mod", TMod }, + { "rem", TRem }, { "phi", TPhi }, { "jmp", TJmp }, { "jez", TJez }, @@ -372,8 +372,8 @@ parseline(PState ps) case TDiv: op = ODiv; break; - case TMod: - op = OMod; + case TRem: + op = ORem; break; case TPhi: if (ps != PPhi) -- cgit 1.4.1