llvm.org GIT mirror llvm / c651e4c
start defining codes for instructions git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@36471 91177308-0d34-0410-b5e6-96231b3b80d8 Chris Lattner 13 years ago
1 changed file(s) with 34 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
2828
2929 // Module sub-block id's
3030 TYPE_BLOCK_ID = 1,
31 MODULEINFO_BLOCK_ID = 2,
32 CONSTANTS_BLOCK_ID = 3,
33 FUNCTION_BLOCK_ID = 4,
34 TYPE_SYMTAB_BLOCK_ID = 5,
35 VALUE_SYMTAB_BLOCK_ID = 6
31 CONSTANTS_BLOCK_ID = 2,
32 FUNCTION_BLOCK_ID = 3,
33 TYPE_SYMTAB_BLOCK_ID = 4,
34 VALUE_SYMTAB_BLOCK_ID = 5
3635 };
3736
3837
7978 TYPE_CODE_VECTOR = 13 // VECTOR: [numelts, eltty]
8079 // Any other type code is assumed to be an unknown type.
8180 };
82
8381
8482 // The type symbol table only has one code (TST_ENTRY_CODE).
8583 enum TypeSymtabCodes {
150148 BINOP_XOR = 12
151149 };
152150
151
152 // The function body block (FUNCTION_BLOCK_ID) describes function bodies. It
153 // can contain a constant block (CONSTANTS_BLOCK_ID).
154 enum FunctionCodes {
155 FUNC_CODE_DECLAREBLOCKS = 1, // DECLAREBLOCKS: [n]
156
157 FUNC_CODE_INST_BINOP = 2, // BINOP: [opcode, ty, opval, opval]
158 FUNC_CODE_INST_CAST = 3, // CAST: [opcode, ty, opty, opval]
159 FUNC_CODE_INST_GEP = 4, // GEP: [n, n x operands]
160 FUNC_CODE_INST_SELECT = 5, // SELECT: [ty, opval, opval, opval]
161 FUNC_CODE_INST_EXTRACTELT = 6, // EXTRACTELT: [opty, opval, opval]
162 FUNC_CODE_INST_INSERTELT = 7, // INSERTELT: [ty, opval, opval, opval]
163 FUNC_CODE_INST_SHUFFLEVEC = 8, // SHUFFLEVEC: [ty, opval, opval, opval]
164 FUNC_CODE_INST_CMP = 9, // CMP: [opty, opval, opval, pred]
165
166 FUNC_CODE_INST_RET = 10, // RET: [opval]
167 FUNC_CODE_INST_BR = 11, // BR: [opval, bb#, bb#] or [bb#]
168 FUNC_CODE_INST_SWITCH = 12, // SWITCH: [opty, opval, n, n x ops]
169 FUNC_CODE_INST_INVOKE = 13, // INVOKE:
170 FUNC_CODE_INST_UNWIND = 14, // UNWIND
171 FUNC_CODE_INST_UNREACHABLE = 15, // UNREACHABLE
172
173 FUNC_CODE_INST_MALLOC = 16, // MALLOC: ..
174 FUNC_CODE_INST_FREE = 17, // FREE: ..
175 FUNC_CODE_INST_ALLOCA = 18, // ALLOCA: ..
176 FUNC_CODE_INST_LOAD = 19, // LOAD: ..
177 FUNC_CODE_INST_STORE = 20, // STORE: ..
178 FUNC_CODE_INST_CALL = 21, // CALL: ..
179 FUNC_CODE_INST_VAARG = 22 // VAARG: ..
180 };
153181 } // End bitc namespace
154182 } // End llvm namespace
155183