From: Alyssa Rosenzweig Date: Tue, 28 Apr 2020 21:44:19 +0000 (-0400) Subject: pan/mdg: Ensure fdot is scalar out in disasm X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=c571d31b8b268aa22ebeb134589150d08db892b2;p=mesa.git pan/mdg: Ensure fdot is scalar out in disasm Signed-off-by: Alyssa Rosenzweig Part-of: --- diff --git a/src/panfrost/midgard/disassemble.c b/src/panfrost/midgard/disassemble.c index 8c7f718674f..ddcd41706af 100644 --- a/src/panfrost/midgard/disassemble.c +++ b/src/panfrost/midgard/disassemble.c @@ -631,6 +631,17 @@ print_vector_field(FILE *fp, const char *name, uint16_t *words, uint16_t reg_wor fprintf(fp, "/* do%u */ ", override); } + /* Instructions like fdot4 do *not* replicate, ensure the + * mask is of only a single component */ + + unsigned rep = GET_CHANNEL_COUNT(alu_opcode_props[alu_field->op].props); + + if (rep) { + unsigned comp_mask = condense_writemask(mask, bits_for_mode(mode)); + unsigned num_comp = util_bitcount(comp_mask); + if (num_comp != 1) + fprintf(fp, "/* err too many components */"); + } print_mask(fp, mask, bits_for_mode(mode), override); fprintf(fp, ", ");