aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/linearize.h
diff options
authorLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-03-31 11:30:40 +0200
committerLuc Van Oostenryck <luc.vanoostenryck@gmail.com>2018-08-26 01:13:24 +0200
commita48473a1d02a4a03e29486a9ba4566c0eca5b96f (patch)
tree95b90dd658acbfe888059550907390bbc64c41d8 /linearize.h
parentb01160b296a2c0810b5b9acc39c44de083533601 (diff)
downloadsparse-dev-a48473a1d02a4a03e29486a9ba4566c0eca5b96f.tar.gz
opcode: centralize opcode definition
Opcodes are defined in linearize.c:enum opcode. The file opcode.c also contains a table with opcodes properties. Centralize these definitions into a single file: opcode.def that will then be reused for enum opcode & the table. Signed-off-by: Luc Van Oostenryck <luc.vanoostenryck@gmail.com>
Diffstat (limited to 'linearize.h')
-rw-r--r--linearize.h116
1 files changed, 0 insertions, 116 deletions
diff --git a/linearize.h b/linearize.h
index d1fe7a2f..53644d0a 100644
--- a/linearize.h
+++ b/linearize.h
@@ -145,122 +145,6 @@ struct instruction {
};
};
-enum opcode {
- OP_BADOP,
-
- /* Entry */
- OP_ENTRY,
-
- /* Terminator */
- OP_TERMINATOR,
- OP_RET = OP_TERMINATOR,
- OP_BR,
- OP_CBR,
- OP_SWITCH,
- OP_COMPUTEDGOTO,
- OP_TERMINATOR_END = OP_COMPUTEDGOTO,
-
- /* Binary */
- OP_BINARY,
- OP_ADD = OP_BINARY,
- OP_SUB,
- OP_MUL,
- OP_DIVU, OP_DIVS,
- OP_MODU, OP_MODS,
- OP_SHL,
- OP_LSR, OP_ASR,
-
- /* Floating-point binops */
- OP_FADD,
- OP_FSUB,
- OP_FMUL,
- OP_FDIV,
-
- /* Logical */
- OP_AND,
- OP_OR,
- OP_XOR,
- OP_BINARY_END = OP_XOR,
-
- /* floating-point comparison */
- OP_FPCMP,
- OP_FCMP_ORD = OP_FPCMP,
- OP_FCMP_OEQ,
- OP_FCMP_ONE,
- OP_FCMP_OLE,
- OP_FCMP_OGE,
- OP_FCMP_OLT,
- OP_FCMP_OGT,
- OP_FCMP_UEQ,
- OP_FCMP_UNE,
- OP_FCMP_ULE,
- OP_FCMP_UGE,
- OP_FCMP_ULT,
- OP_FCMP_UGT,
- OP_FCMP_UNO,
- OP_FPCMP_END = OP_FCMP_UNO,
-
- /* Binary comparison */
- OP_BINCMP,
- OP_SET_EQ = OP_BINCMP,
- OP_SET_NE,
- OP_SET_LE,
- OP_SET_GE,
- OP_SET_LT,
- OP_SET_GT,
- OP_SET_B,
- OP_SET_A,
- OP_SET_BE,
- OP_SET_AE,
- OP_BINCMP_END = OP_SET_AE,
-
- /* Uni */
- OP_UNOP,
- OP_NOT = OP_UNOP,
- OP_NEG,
- OP_FNEG,
-
- /* Casts */
- OP_TRUNC,
- OP_ZEXT, OP_SEXT,
- OP_FCVTU, OP_FCVTS,
- OP_UCVTF, OP_SCVTF,
- OP_FCVTF,
- OP_UTPTR,
- OP_PTRTU,
- OP_PTRCAST,
- OP_UNOP_END = OP_PTRCAST,
-
- /* Select - three input values */
- OP_SEL,
-
- /* Memory */
- OP_LOAD,
- OP_STORE,
- OP_SETVAL,
- OP_SETFVAL,
- OP_SYMADDR,
-
- /* Other */
- OP_PHI,
- OP_PHISOURCE,
- OP_INLINED_CALL,
- OP_CALL,
- OP_SLICE,
- OP_NOP,
- OP_DEATHNOTE,
- OP_ASM,
-
- /* Sparse tagging (line numbers, context, whatever) */
- OP_CONTEXT,
- OP_RANGE,
-
- /* Needed to translate SSA back to normal form */
- OP_COPY,
-
- OP_LAST, /* keep this one last! */
-};
-
struct basic_block_list;
struct instruction_list;