diff options
author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-11-06 21:43:11 +0100 |
---|---|---|
committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2020-11-22 15:58:07 +0100 |
commit | 8b1d40e3721f82b57bad55d9095d7ec7db5bbbef (patch) | |
tree | fe525256da62e13787606a87b02b519f7960fbd3 | |
parent | 84f84262a122875e930585dee346124b316d376f (diff) | |
download | sparse-8b1d40e3721f82b57bad55d9095d7ec7db5bbbef.tar.gz |
opcode: add helpers opcode_negate() & opcode_swap()
Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
-rw-r--r-- | opcode.h | 10 |
1 files changed, 10 insertions, 0 deletions
@@ -32,6 +32,16 @@ extern const struct opcode_table { } opcode_table[]; +static inline int opcode_negate(int opcode) +{ + return opcode_table[opcode].negate; +} + +static inline int opcode_swap(int opcode) +{ + return opcode_table[opcode].swap; +} + static inline int opcode_float(int opcode, struct symbol *type) { if (!type || !is_float_type(type)) |