aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/opcode.c
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-10-27 01:49:27 +0100
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2020-11-08 02:11:55 +0100
commitbbcc6abac7af8ac614489b676064d4c3050fd882 (patch)
tree4dfe5214f5f146e5a6c3c7369bf37a61eff3329c /opcode.c
parent17c0dc05248364ea9b64aa4d997c49a516208d6d (diff)
downloadsparse-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.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/opcode.c b/opcode.c
index 98ad768f..0cc7e435 100644
--- a/opcode.c
+++ b/opcode.c
@@ -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, \