diff options
author | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-08-05 12:47:10 -0400 |
---|---|---|
committer | Quentin Carbonneaux <quentin.carbonneaux@yale.edu> | 2015-09-15 23:01:30 -0400 |
commit | 9c7b06d68f6a71ff43d1de60953658ca47bbde36 (patch) | |
tree | 822d93ac78d23aa3c8bedfd0d45ef54bed317b08 /lisc/parse.c | |
parent | 246a48ba94b92e6c1e02964d46269e0903b7a723 (diff) | |
download | roux-9c7b06d68f6a71ff43d1de60953658ca47bbde36.tar.gz |
quick fix for comparisons with constants
Diffstat (limited to 'lisc/parse.c')
-rw-r--r-- | lisc/parse.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/lisc/parse.c b/lisc/parse.c index d504113..ae7cb8c 100644 --- a/lisc/parse.c +++ b/lisc/parse.c @@ -25,10 +25,13 @@ OpDesc opdesc[OLast] = { [OXDiv] = { "xdiv", 1, U }, [OXCmp] = { "xcmp", 2, U }, - [OCmp+Ceq] = { "ceq", 2, U }, - [OCmp+Csle] = { "csle", 2, U }, - [OXSet+Ceq] = { "xsete", 0, U }, - [OXSet+Csle] = { "xsetle", 0, U }, + #define I(X) X(eq), X(sle), X(sgt), X(ne) + #define CMP(c) [OCmp+C##c] = { "c" #c, 2, U } + #define SET(c) [OXSet+C##c] = { "xset" #c, 0, U } + I(CMP), I(SET) + #undef CMP + #undef SET + #undef I }; typedef enum { |