Lines Matching refs:instr
70 print_instr_name(struct log_stream *stream, struct ir3_instruction *instr,
73 if (!instr)
76 mesa_log_stream_printf(stream, "%04u:", instr->serialno);
78 mesa_log_stream_printf(stream, "%04u:", instr->ip);
79 if (instr->flags & IR3_INSTR_UNUSED) {
82 mesa_log_stream_printf(stream, "%03u: ", instr->use_count);
87 if (instr->flags & IR3_INSTR_SY)
89 if (instr->flags & IR3_INSTR_SS)
91 if (instr->flags & IR3_INSTR_JP)
93 if (instr->repeat)
94 mesa_log_stream_printf(stream, "(rpt%d)", instr->repeat);
95 if (instr->nop)
96 mesa_log_stream_printf(stream, "(nop%d)", instr->nop);
97 if (instr->flags & IR3_INSTR_UL)
103 if (is_meta(instr)) {
104 switch (instr->opc) {
126 mesa_log_stream_printf(stream, "_meta:%d", instr->opc);
129 } else if (opc_cat(instr->opc) == 1) {
130 if (instr->opc == OPC_MOV) {
131 if (instr->cat1.src_type == instr->cat1.dst_type)
137 disasm_a3xx_instr_name(instr->opc));
140 if (instr->opc == OPC_SCAN_MACRO) {
141 switch (instr->cat1.reduce_op) {
184 if (instr->opc != OPC_MOVMSK && instr->opc != OPC_SCAN_MACRO) {
186 type_name(instr->cat1.src_type),
187 type_name(instr->cat1.dst_type));
189 } else if (instr->opc == OPC_B) {
201 mesa_log_stream_printf(stream, "%s", name[instr->cat0.brtype]);
203 mesa_log_stream_printf(stream, "%s", disasm_a3xx_instr_name(instr->opc));
204 if (instr->flags & IR3_INSTR_3D)
206 if (instr->flags & IR3_INSTR_A)
208 if (instr->flags & IR3_INSTR_O)
210 if (instr->flags & IR3_INSTR_P)
212 if (instr->flags & IR3_INSTR_S)
214 if (instr->flags & IR3_INSTR_A1EN)
216 if (instr->opc == OPC_LDC)
217 mesa_log_stream_printf(stream, ".offset%d", instr->cat6.d);
218 if (instr->opc == OPC_LDC_K)
219 mesa_log_stream_printf(stream, ".%d", instr->cat6.iim_val);
220 if (instr->flags & IR3_INSTR_B) {
223 is_tex(instr) ? instr->cat5.tex_base : instr->cat6.base);
225 if (instr->flags & IR3_INSTR_S2EN)
232 switch (instr->opc) {
240 cond[instr->cat2.condition & 0x7]);
251 mesa_log_stream_printf(stream, SYN_SSA("ssa_%u"), reg->instr->serialno);
274 print_reg_name(struct log_stream *stream, struct ir3_instruction *instr,
353 print_instr(struct log_stream *stream, struct ir3_instruction *instr, int lvl)
357 print_instr_name(stream, instr, true);
359 if (is_tex(instr)) {
360 mesa_log_stream_printf(stream, " (%s)(", type_name(instr->cat5.type));
362 if (instr->dsts[0]->wrmask & (1 << i))
365 } else if ((instr->srcs_count > 0 || instr->dsts_count > 0) &&
366 (instr->opc != OPC_B)) {
373 if (!is_flow(instr) || instr->opc == OPC_END || instr->opc == OPC_CHMASK) {
375 foreach_dst (reg, instr) {
380 print_reg_name(stream, instr, reg, true);
383 foreach_src_n (reg, n, instr) {
386 print_reg_name(stream, instr, reg, false);
387 if (instr->opc == OPC_END || instr->opc == OPC_CHMASK)
388 mesa_log_stream_printf(stream, " (%u)", instr->end.outidxs[n]);
393 if (is_tex(instr) && !(instr->flags & IR3_INSTR_S2EN)) {
394 if (!!(instr->flags & IR3_INSTR_B) && !!(instr->flags & IR3_INSTR_A1EN)) {
395 mesa_log_stream_printf(stream, ", s#%d", instr->cat5.samp);
397 mesa_log_stream_printf(stream, ", s#%d, t#%d", instr->cat5.samp,
398 instr->cat5.tex);
402 if (instr->opc == OPC_META_SPLIT) {
403 mesa_log_stream_printf(stream, ", off=%d", instr->split.off);
404 } else if (instr->opc == OPC_META_TEX_PREFETCH) {
406 instr->prefetch.tex, instr->prefetch.samp,
407 instr->prefetch.input_offset);
410 if (is_flow(instr) && instr->cat0.target) {
412 if (instr->opc == OPC_B) {
428 if (brinfo[instr->cat0.brtype].idx) {
429 mesa_log_stream_printf(stream, ".%u", instr->cat0.idx);
431 if (brinfo[instr->cat0.brtype].nsrc >= 1) {
433 instr->cat0.inv1 ? "!" : "",
434 "xyzw"[instr->cat0.comp1 & 0x3]);
435 print_reg_name(stream, instr, instr->srcs[0], false);
438 if (brinfo[instr->cat0.brtype].nsrc >= 2) {
440 instr->cat0.inv2 ? "!" : "",
441 "xyzw"[instr->cat0.comp2 & 0x3]);
442 print_reg_name(stream, instr, instr->srcs[1], false);
447 block_id(instr->cat0.target));
450 if (instr->deps_count) {
453 for (unsigned i = 0; i < instr->deps_count; i++) {
454 if (!instr->deps[i])
459 instr->deps[i]->serialno);
467 ir3_print_instr_stream(struct log_stream *stream, struct ir3_instruction *instr)
469 print_instr(stream, instr, 0);
473 ir3_print_instr(struct ir3_instruction *instr)
476 print_instr(stream, instr, 0);
512 foreach_instr (instr, &block->instr_list) {
513 print_instr(stream, instr, lvl + 1);