aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/opcode.h
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-03-26 19:35:14 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2017-11-16 20:37:00 +0100
commitd0d5529e95d888528a3446bdd48ff5218c7b7dd2 (patch)
treef92d695f19459ea0f9a5b138b0408a50f66f26b1 /opcode.h
parent3f3a12589b206efe7089520c2f2a1f49245e1dd2 (diff)
downloadsparse-dev-d0d5529e95d888528a3446bdd48ff5218c7b7dd2.tar.gz
add table to "negate" some opcode
Some optimizations transform an instruction opcode into another. For example, it may be needed to know the opcode corresponding to the negation of a comparison. This patch make this easy and flexible by adding a table for the relation between opcodes. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'opcode.h')
-rw-r--r--opcode.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/opcode.h b/opcode.h
new file mode 100644
index 00000000..3a89de05
--- /dev/null
+++ b/opcode.h
@@ -0,0 +1,9 @@
+#ifndef OPCODE_H
+#define OPCODE_H
+
+
+extern const struct opcode_table {
+ int negate:8;
+} opcode_table[];
+
+#endif