Lines Matching defs:ins
112 mir_print_embedded_constant(midgard_instruction *ins, unsigned src_idx)
116 unsigned base_size = max_bitsize_for_alu(ins);
117 unsigned sz = nir_alu_type_get_type_size(ins->src_types[src_idx]);
119 unsigned mod = mir_pack_mod(ins, src_idx, false);
120 unsigned *swizzle = ins->swizzle[src_idx];
121 midgard_reg_mode reg_mode = reg_mode_for_bitsize(max_bitsize_for_alu(ins));
122 unsigned comp_mask = effective_writemask(ins->op, ins->mask);
124 unsigned max_comp = mir_components_for_type(ins->dest_type);
141 mir_print_constant_component(stdout, &ins->constants,
143 half, mod, ins->op);
150 #define PRINT_SRC(ins, c) \
151 do { mir_print_index(ins->src[c]); \
152 if (ins->src[c] != ~0 && ins->src_types[c] != nir_type_invalid) { \
153 pan_print_alu_type(ins->src_types[c], stdout); \
154 mir_print_swizzle(ins->swizzle[c], ins->src_types[c]); \
158 mir_print_instruction(midgard_instruction *ins)
162 if (midgard_is_branch_unit(ins->unit)) {
167 printf("%s.", mir_get_unit(ins->unit));
168 if (ins->branch.target_type == TARGET_DISCARD)
170 else if (ins->writeout)
172 else if (ins->unit == ALU_ENAB_BR_COMPACT &&
173 !ins->branch.conditional)
178 if (!ins->branch.conditional)
180 else if (ins->branch.invert_conditional)
185 if (ins->writeout) {
187 PRINT_SRC(ins, 0);
189 PRINT_SRC(ins, 2);
191 PRINT_SRC(ins, 3);
195 if (ins->branch.target_type != TARGET_DISCARD)
197 ins->branch.target_type < 4 ?
198 branch_target_names[ins->branch.target_type] : "??",
199 ins->branch.target_block);
204 switch (ins->type) {
206 midgard_alu_op op = ins->op;
209 if (ins->unit)
210 printf("%s.", mir_get_unit(ins->unit));
217 midgard_load_store_op op = ins->op;
228 if (ins->helper_terminate)
231 if (ins->helper_execute)
241 if (ins->compact_branch && ins->branch.invert_conditional)
245 mir_print_index(ins->dest);
247 if (ins->dest != ~0) {
248 pan_print_alu_type(ins->dest_type, stdout);
249 mir_print_mask(ins->mask);
256 bool is_alu = ins->type == TAG_ALU_4;
259 if (ins->src[0] == r_constant && is_alu)
260 mir_print_embedded_constant(ins, 0);
262 PRINT_SRC(ins, 0);
266 if (ins->has_inline_constant)
267 printf("#%d", ins->inline_constant);
268 else if (ins->src[1] == r_constant && is_alu)
269 mir_print_embedded_constant(ins, 1);
271 PRINT_SRC(ins, 1);
275 PRINT_SRC(ins, c);
278 if (ins->no_spill)
299 mir_foreach_instr_in_block(block, ins) {
300 mir_print_instruction(ins);