etnaviv: print writemask of store operations
authorTomeu Vizoso <tomeu.vizoso@collabora.com>
Wed, 6 Jul 2022 07:06:49 +0000 (09:06 +0200)
committerMarge Bot <emma+marge@anholt.net>
Thu, 6 Apr 2023 16:51:36 +0000 (16:51 +0000)
Signed-off-by: Italo Nicola <italonicola@collabora.com>
Reviewed-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/22210>

src/gallium/drivers/etnaviv/etnaviv_disasm.c

index fea8cb3..70c7533 100644 (file)
@@ -449,6 +449,18 @@ print_opc_imm(struct opc_operands *operands)
    printf("label_%04d", operands->imm);
 }
 
+static void
+print_opc_store(struct opc_operands *operands)
+{
+   printf("mem");
+   print_components(operands->dst->write_mask);
+   printf(", ");
+
+   print_src(operands->src0, true);
+   print_src(operands->src1, true);
+   print_src(operands->src2, false);
+}
+
 #define OPC_BITS 7
 
 static const struct opc_info {
@@ -459,6 +471,7 @@ static const struct opc_info {
 #define OPC_MOV(opc) [INST_OPCODE_##opc] = {#opc, print_opc_mov}
 #define OPC_TEX(opc) [INST_OPCODE_##opc] = {#opc, print_opc_tex}
 #define OPC_IMM(opc) [INST_OPCODE_##opc] = {#opc, print_opc_imm}
+#define OPC_STORE(opc) [INST_OPCODE_##opc] = {#opc, print_opc_store}
    OPC(NOP),
    OPC(ADD),
    OPC(MAD),
@@ -506,7 +519,7 @@ static const struct opc_info {
    OPC(F2I),
    OPC(CMP),
    OPC(LOAD),
-   OPC(STORE),
+   OPC_STORE(STORE),
    OPC(IMULLO0),
    OPC(IMULHI0),
    OPC(IMADLO0),