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