llvm.org GIT mirror llvm / c9c448f
add records for constant exprs git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36393 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 13 years ago
1 changed file(s) with 46 addition(s) and 9 deletion(s). Raw diff Collapse all Expand all
8888 // The constants block (CONSTANTS_BLOCK_ID) describes emission for each
8989 // constant and maintains an implicit current type value.
9090 enum ConstantsSymtabCodes {
91 CST_CODE_SETTYPE = 1, // SETTYPE: [typeid]
92 CST_CODE_NULL = 2, // NULL
93 CST_CODE_UNDEF = 3, // UNDEF
94 CST_CODE_INTEGER = 4, // INTEGER: [intval]
95 CST_CODE_WIDE_INTEGER = 5, // WIDE_INTEGER: [n, n x intval]
96 CST_CODE_FLOAT = 6, // FLOAT: [fpval]
97 CST_CODE_AGGREGATE = 7, // AGGREGATE: [n, n x value number]
98 CST_CODE_CONSTEXPR = 8 // CONSTEXPR: [opcode, n, n x val#]
99 // TODO: CE_BINOP ETC
91 CST_CODE_SETTYPE = 1, // SETTYPE: [typeid]
92 CST_CODE_NULL = 2, // NULL
93 CST_CODE_UNDEF = 3, // UNDEF
94 CST_CODE_INTEGER = 4, // INTEGER: [intval]
95 CST_CODE_WIDE_INTEGER = 5, // WIDE_INTEGER: [n, n x intval]
96 CST_CODE_FLOAT = 6, // FLOAT: [fpval]
97 CST_CODE_AGGREGATE = 7, // AGGREGATE: [n, n x value number]
98 CST_CODE_CE_BINOP = 8, // CE_BINOP: [opcode, opval, opval]
99 CST_CODE_CE_CAST = 9, // CE_CAST: [opcode, opty, opval]
100 CST_CODE_CE_GEP = 10, // CE_GEP: [n, n x operands]
101 CST_CODE_CE_SELECT = 11, // CE_SELECT: [opval, opval, opval]
102 CST_CODE_CE_EXTRACTELT = 12, // CE_EXTRACTELT: [opty, opval, opval]
103 CST_CODE_CE_INSERTELT = 13, // CE_INSERTELT: [opval, opval, opval]
104 CST_CODE_CE_SHUFFLEVEC = 14, // CE_SHUFFLEVEC: [opval, opval, opval]
105 CST_CODE_CE_CMP = 15 // CE_CMP: [opty, opval, opval, pred]
106 };
107
108 enum CastOpcodes {
109 CAST_TRUNC = 0,
110 CAST_ZEXT = 1,
111 CAST_SEXT = 2,
112 CAST_FPTOUI = 3,
113 CAST_FPTOSI = 4,
114 CAST_UITOFP = 5,
115 CAST_SITOFP = 6,
116 CAST_FPTRUNC = 7,
117 CAST_FPEXT = 8,
118 CAST_PTRTOINT = 9,
119 CAST_INTTOPTR = 10,
120 CAST_BITCAST = 11
121 };
122
123 enum BinaryOpcodes {
124 BINOP_ADD = 0,
125 BINOP_SUB = 1,
126 BINOP_MUL = 2,
127 BINOP_UDIV = 3,
128 BINOP_SDIV = 4, // overloaded for FP
129 BINOP_UREM = 5,
130 BINOP_SREM = 6, // overloaded for FP
131 BINOP_SHL = 7,
132 BINOP_LSHR = 8,
133 BINOP_ASHR = 9,
134 BINOP_AND = 10,
135 BINOP_OR = 11,
136 BINOP_XOR = 12
100137 };
101138
102139 } // End bitc namespace