From: Alyssa Rosenzweig Date: Tue, 31 May 2022 12:43:33 +0000 (-0400) Subject: pan/mdg: Only print 1 source for moves X-Git-Tag: upstream/22.3.5~8108 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=520204ae1882834399ef1197cd8e67ef48c02861;p=platform%2Fupstream%2Fmesa.git pan/mdg: Only print 1 source for moves This makes the printed IR easier to read at a glance. Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/midgard/midgard_print.c b/src/panfrost/midgard/midgard_print.c index cac792a..a053b80 100644 --- a/src/panfrost/midgard/midgard_print.c +++ b/src/panfrost/midgard/midgard_print.c @@ -264,12 +264,19 @@ mir_print_instruction(midgard_instruction *ins) bool is_alu = ins->type == TAG_ALU_4; unsigned r_constant = SSA_FIXED_REGISTER(REGISTER_CONSTANT); - if (ins->src[0] == r_constant && is_alu) - mir_print_embedded_constant(ins, 0); - else - mir_print_src(ins, 0); + if (is_alu && alu_opcode_props[ins->op].props & QUIRK_FLIPPED_R24) { + /* Moves (indicated by QUIRK_FLIPPED_R24) are 1-src, with their + * one source in the second slot + */ + assert(ins->src[0] == ~0); + } else { + if (ins->src[0] == r_constant && is_alu) + mir_print_embedded_constant(ins, 0); + else + mir_print_src(ins, 0); - printf(", "); + printf(", "); + } if (ins->has_inline_constant) printf("#%d", ins->inline_constant);