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