quick fix for comparisons with constants

This commit is contained in:
Quentin Carbonneaux 2015-08-05 12:47:10 -04:00
parent 246a48ba94
commit 9c7b06d68f
5 changed files with 22 additions and 7 deletions

View file

@ -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 {