1// OPCODE negated swaped sign float arity, flags 2 3OPCODE(BADOP, BADOP, BADOP, BADOP, BADOP, 0, OPF_NONE) 4 5/* Entry */ 6OPCODE(ENTRY, BADOP, BADOP, BADOP, BADOP, 0, OPF_NONE) 7 8/* Terminator */ 9OPCODE(RET, BADOP, BADOP, BADOP, BADOP, 1, OPF_NONE) 10OPCODE(BR, BADOP, BADOP, BADOP, BADOP, 0, OPF_NONE) 11OPCODE(CBR, BADOP, BADOP, BADOP, BADOP, 1, OPF_NONE) 12OPCODE(SWITCH, BADOP, BADOP, BADOP, BADOP, 1, OPF_NONE) 13OPCODE(UNREACH, BADOP, BADOP, BADOP, BADOP, 0, OPF_NONE) 14OPCODE(COMPUTEDGOTO, BADOP, BADOP, BADOP, BADOP, 1, OPF_NONE) 15OPCODE_RANGE(TERMINATOR, RET, COMPUTEDGOTO) 16 17/* Binary */ 18OPCODE(ADD, BADOP, BADOP, BADOP, FADD, 2, OPF_TARGET|OPF_COMMU|OPF_ASSOC|OPF_BINOP) 19OPCODE(MUL, BADOP, BADOP, BADOP, FMUL, 2, OPF_TARGET|OPF_COMMU|OPF_ASSOC|OPF_BINOP) 20OPCODE(SUB, BADOP, BADOP, BADOP, FSUB, 2, OPF_TARGET|OPF_BINOP) 21OPCODE(DIVU, BADOP, BADOP, DIVS, FDIV, 2, OPF_TARGET|OPF_BINOP) 22OPCODE(DIVS, BADOP, BADOP, DIVU, FDIV, 2, OPF_TARGET|OPF_BINOP) 23OPCODE(MODU, BADOP, BADOP, MODS, BADOP, 2, OPF_TARGET|OPF_BINOP) 24OPCODE(MODS, BADOP, BADOP, MODU, BADOP, 2, OPF_TARGET|OPF_BINOP) 25OPCODE(LSR, BADOP, BADOP, ASR, BADOP, 2, OPF_TARGET|OPF_BINOP) 26OPCODE(ASR, BADOP, BADOP, LSR, BADOP, 2, OPF_TARGET|OPF_BINOP) 27OPCODE(SHL, BADOP, BADOP, BADOP, BADOP, 2, OPF_TARGET|OPF_BINOP) 28 29/* Floating-point binops */ 30OPCODE(FADD, BADOP, BADOP, BADOP, BADOP, 2, OPF_TARGET) 31OPCODE(FSUB, BADOP, BADOP, BADOP, BADOP, 2, OPF_TARGET) 32OPCODE(FMUL, BADOP, BADOP, BADOP, BADOP, 2, OPF_TARGET) 33OPCODE(FDIV, BADOP, BADOP, BADOP, BADOP, 2, OPF_TARGET) 34 35/* Logical */ 36OPCODE(AND, BADOP, BADOP, BADOP, BADOP, 2, OPF_TARGET|OPF_COMMU|OPF_ASSOC|OPF_BINOP) 37OPCODE(OR, BADOP, BADOP, BADOP, BADOP, 2, OPF_TARGET|OPF_COMMU|OPF_ASSOC|OPF_BINOP) 38OPCODE(XOR, BADOP, BADOP, BADOP, BADOP, 2, OPF_TARGET|OPF_COMMU|OPF_ASSOC|OPF_BINOP) 39OPCODE_RANGE(BINARY, ADD, XOR) 40 41/* floating-point comparison */ 42OPCODE(FCMP_ORD, FCMP_UNO, FCMP_ORD, BADOP, BADOP, 2, OPF_TARGET) 43OPCODE(FCMP_OEQ, FCMP_UNE, FCMP_OEQ, BADOP, BADOP, 2, OPF_TARGET) 44OPCODE(FCMP_ONE, FCMP_UEQ, FCMP_ONE, BADOP, BADOP, 2, OPF_TARGET) 45OPCODE(FCMP_UEQ, FCMP_ONE, FCMP_UEQ, BADOP, BADOP, 2, OPF_TARGET) 46OPCODE(FCMP_UNE, FCMP_OEQ, FCMP_UNE, BADOP, BADOP, 2, OPF_TARGET) 47OPCODE(FCMP_OLT, FCMP_UGE, FCMP_OGT, BADOP, BADOP, 2, OPF_TARGET) 48OPCODE(FCMP_OLE, FCMP_UGT, FCMP_OGE, BADOP, BADOP, 2, OPF_TARGET) 49OPCODE(FCMP_OGE, FCMP_ULT, FCMP_OLE, BADOP, BADOP, 2, OPF_TARGET) 50OPCODE(FCMP_OGT, FCMP_ULE, FCMP_OLT, BADOP, BADOP, 2, OPF_TARGET) 51OPCODE(FCMP_ULT, FCMP_OGE, FCMP_UGT, BADOP, BADOP, 2, OPF_TARGET) 52OPCODE(FCMP_ULE, FCMP_OGT, FCMP_UGE, BADOP, BADOP, 2, OPF_TARGET) 53OPCODE(FCMP_UGE, FCMP_OLT, FCMP_ULE, BADOP, BADOP, 2, OPF_TARGET) 54OPCODE(FCMP_UGT, FCMP_OLE, FCMP_ULT, BADOP, BADOP, 2, OPF_TARGET) 55OPCODE(FCMP_UNO, FCMP_ORD, FCMP_UNO, BADOP, BADOP, 2, OPF_TARGET) 56OPCODE_RANGE(FPCMP, FCMP_ORD, FCMP_UNO) 57 58/* Binary comparison */ 59OPCODE(SET_EQ, SET_NE, SET_EQ, SET_EQ, FCMP_OEQ, 2, OPF_TARGET|OPF_BINOP|OPF_COMPARE|OPF_COMMU) 60OPCODE(SET_LT, SET_GE, SET_GT, SET_B, FCMP_OLT, 2, OPF_TARGET|OPF_BINOP|OPF_COMPARE|OPF_SIGNED) 61OPCODE(SET_LE, SET_GT, SET_GE, SET_BE, FCMP_OLE, 2, OPF_TARGET|OPF_BINOP|OPF_COMPARE|OPF_SIGNED) 62OPCODE(SET_GE, SET_LT, SET_LE, SET_AE, FCMP_OGE, 2, OPF_TARGET|OPF_BINOP|OPF_COMPARE|OPF_SIGNED) 63OPCODE(SET_GT, SET_LE, SET_LT, SET_A, FCMP_OGT, 2, OPF_TARGET|OPF_BINOP|OPF_COMPARE|OPF_SIGNED) 64OPCODE(SET_B, SET_AE, SET_A, SET_LT, FCMP_OLT, 2, OPF_TARGET|OPF_BINOP|OPF_COMPARE|OPF_UNSIGNED) 65OPCODE(SET_BE, SET_A, SET_AE, SET_LE, FCMP_OLE, 2, OPF_TARGET|OPF_BINOP|OPF_COMPARE|OPF_UNSIGNED) 66OPCODE(SET_AE, SET_B, SET_BE, SET_GE, FCMP_OGE, 2, OPF_TARGET|OPF_BINOP|OPF_COMPARE|OPF_UNSIGNED) 67OPCODE(SET_A, SET_BE, SET_B, SET_GT, FCMP_OGT, 2, OPF_TARGET|OPF_BINOP|OPF_COMPARE|OPF_UNSIGNED) 68OPCODE(SET_NE, SET_EQ, SET_NE, SET_NE, FCMP_UNE, 2, OPF_TARGET|OPF_BINOP|OPF_COMPARE|OPF_COMMU) 69OPCODE_RANGE(BINCMP, SET_EQ, SET_NE) 70 71/* Uni */ 72OPCODE(NOT, BADOP, BADOP, BADOP, BADOP, 1, OPF_TARGET|OPF_UNOP) 73OPCODE(NEG, BADOP, BADOP, BADOP, FNEG, 1, OPF_TARGET|OPF_UNOP) 74OPCODE(FNEG, BADOP, BADOP, BADOP, BADOP, 1, OPF_TARGET) 75OPCODE(TRUNC, BADOP, BADOP, BADOP, BADOP, 1, OPF_TARGET) 76OPCODE(ZEXT, BADOP, BADOP, SEXT, BADOP, 1, OPF_TARGET) 77OPCODE(SEXT, BADOP, BADOP, ZEXT, BADOP, 1, OPF_TARGET) 78OPCODE(FCVTU, BADOP, BADOP, FCVTS, BADOP, 1, OPF_TARGET) 79OPCODE(FCVTS, BADOP, BADOP, FCVTU, BADOP, 1, OPF_TARGET) 80OPCODE(UCVTF, BADOP, BADOP, SCVTF, BADOP, 1, OPF_TARGET) 81OPCODE(SCVTF, BADOP, BADOP, UCVTF, BADOP, 1, OPF_TARGET) 82OPCODE(FCVTF, BADOP, BADOP, BADOP, BADOP, 1, OPF_TARGET) 83OPCODE(UTPTR, BADOP, BADOP, BADOP, BADOP, 1, OPF_TARGET) 84OPCODE(PTRTU, BADOP, BADOP, BADOP, BADOP, 1, OPF_TARGET) 85OPCODE(PTRCAST, BADOP, BADOP, BADOP, BADOP, 1, OPF_TARGET) 86OPCODE_RANGE(UNOP, NOT, PTRCAST) 87OPCODE(SYMADDR, BADOP, BADOP, BADOP, BADOP, 1, OPF_TARGET) 88OPCODE(SLICE, BADOP, BADOP, BADOP, BADOP, 1, OPF_TARGET) 89 90/* Select - three input values */ 91OPCODE(SEL, BADOP, BADOP, BADOP, BADOP, 3, OPF_TARGET) 92OPCODE(FMADD, BADOP, BADOP, BADOP, BADOP, 3, OPF_TARGET) 93 94/* Memory */ 95OPCODE(LOAD, BADOP, BADOP, BADOP, BADOP, 1, OPF_TARGET) 96OPCODE(STORE, BADOP, BADOP, BADOP, BADOP, 1, OPF_NONE) 97 98/* Other */ 99OPCODE(PHISOURCE, BADOP, BADOP, BADOP, BADOP, 1, OPF_TARGET) 100OPCODE(PHI, BADOP, BADOP, BADOP, BADOP, 0, OPF_TARGET) 101OPCODE(LABEL, BADOP, BADOP, BADOP, BADOP, 0, OPF_TARGET) 102OPCODE(SETVAL, BADOP, BADOP, BADOP, BADOP, 0, OPF_TARGET) 103OPCODE(SETFVAL, BADOP, BADOP, BADOP, BADOP, 0, OPF_TARGET) 104OPCODE(CALL, BADOP, BADOP, BADOP, BADOP, 1, OPF_TARGET) 105OPCODE(INLINED_CALL, BADOP, BADOP, BADOP, BADOP, 0, OPF_NONE) 106OPCODE(NOP, BADOP, BADOP, BADOP, BADOP, 0, OPF_NONE) 107OPCODE(DEATHNOTE, BADOP, BADOP, BADOP, BADOP, 0, OPF_NONE) 108OPCODE(ASM, BADOP, BADOP, BADOP, BADOP, 0, OPF_NONE) 109 110/* Sparse tagging (line numbers, context, whatever) */ 111OPCODE(CONTEXT, BADOP, BADOP, BADOP, BADOP, 0, OPF_NONE) 112OPCODE(RANGE, BADOP, BADOP, BADOP, BADOP, 3, OPF_NONE) 113 114/* Needed to translate SSA back to normal form */ 115OPCODE(COPY, BADOP, BADOP, BADOP, BADOP, 1, OPF_TARGET) 116