diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-10-27 01:49:27 +0100 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-11-08 02:11:55 +0100 |
| commit | bbcc6abac7af8ac614489b676064d4c3050fd882 (patch) | |
| tree | 4dfe5214f5f146e5a6c3c7369bf37a61eff3329c /opcode.c | |
| parent | 17c0dc05248364ea9b64aa4d997c49a516208d6d (diff) | |
| download | sparse-dev-bbcc6abac7af8ac614489b676064d4c3050fd882.tar.gz | |
cmp: add signed/unsigned to opcode table
The opcode table allows to efficiently store some properties of
the IR instructions and the correspondence between some of them.
One of these correspondences the 'signed' / 'unsigned' version
of otherwise identical instructions. This is useful for some
transformation of compare instructions but is not present yet
in the table. So, add this now.
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'opcode.c')
| -rw-r--r-- | opcode.c | 3 |
1 files changed, 2 insertions, 1 deletions
@@ -23,10 +23,11 @@ #include "opcode.h" const struct opcode_table opcode_table[OP_LAST] = { -#define OPCODE(OP,NG,SW,TF,N,FL) \ +#define OPCODE(OP,NG,SW,SG,TF,N,FL) \ [OP_##OP] = { \ .negate = OP_##NG, \ .swap = OP_##SW, \ + .sign = OP_##SG, \ .to_float = OP_##TF, \ .arity = N, \ .flags = FL, \ |
