diff options
| author | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-08-31 00:05:51 +0200 |
|---|---|---|
| committer | Luc Van Oostenryck <luc.vanoostenryck@gmail.com> | 2018-08-31 00:05:51 +0200 |
| commit | ce2a7be626471bb155462aea3a6da24f374f9d04 (patch) | |
| tree | 08cd1bb808adde2605f1ad982599a0b3186e3195 /linearize.h | |
| parent | b814c73f9cef04c1162084cc64e4cbbe9e2da97b (diff) | |
| parent | 2be8fdea5dc4160898bc820e05f65c6f1cd149cb (diff) | |
| download | sparse-dev-ce2a7be626471bb155462aea3a6da24f374f9d04.tar.gz | |
Merge branch 'opcode' into tip
* consolidate instruction's properties into an opcode table
Diffstat (limited to 'linearize.h')
| -rw-r--r-- | linearize.h | 119 |
1 files changed, 0 insertions, 119 deletions
diff --git a/linearize.h b/linearize.h index 17f746a8..69537ee1 100644 --- a/linearize.h +++ b/linearize.h @@ -126,9 +126,6 @@ struct instruction { pseudo_t base; unsigned from, len; }; - struct /* symaddr */ { - pseudo_t symbol; /* Subtle: same offset as "src" !! */ - }; struct /* setval */ { struct expression *val; }; @@ -152,122 +149,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; |
