diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-03-31 11:30:40 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-08-26 01:14:12 +0200 |
| commit | ad118b85b40890ea26cbbcf63d4075a0c2865a80 (patch) | |
| tree | 0181d2879af7b0f6f27c58dfc8adcfa0b732eec2 /opcode.h | |
| parent | a48473a1d02a4a03e29486a9ba4566c0eca5b96f (diff) | |
| download | sparse-dev-ad118b85b40890ea26cbbcf63d4075a0c2865a80.tar.gz | |
opcode: add arity info
The arity is a useful property of each opcode.
Add this information to the opcode definitions.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'opcode.h')
| -rw-r--r-- | opcode.h | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -4,7 +4,7 @@ #include "symbol.h" enum opcode { -#define OPCODE(OP,NG,SW,TF) OP_##OP, +#define OPCODE(OP,NG,SW,TF,N) OP_##OP, #define OPCODE_RANGE(OP,S,E) OP_##OP = OP_##S, OP_##OP##_END = OP_##E, #include "opcode.def" #undef OPCODE @@ -16,6 +16,7 @@ extern const struct opcode_table { int negate:8; int swap:8; int to_float:8; + unsigned int arity:2; } opcode_table[]; |
