freedreno/ir3: add debug code to print conflicting half-regs
authorRob Clark <robdclark@chromium.org>
Thu, 11 Jun 2020 16:47:05 +0000 (09:47 -0700)
committerMarge Bot <eric+marge@anholt.net>
Thu, 11 Jun 2020 21:59:54 +0000 (21:59 +0000)
I keep re-typing this from time to time when debugging various things.
Which is dumb.

Signed-off-by: Rob Clark <robdclark@chromium.org>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/5431>

src/freedreno/ir3/disasm-a3xx.c

index d1e77b08913a050bb19da0f0bf3a329c3109426f..de8387f3bcafe470c2d41825a37c613240388271 100644 (file)
@@ -147,6 +147,13 @@ static void print_reg(struct disasm_ctx *ctx, reg_t reg, bool full,
                fprintf(ctx->out, "p0.%c", component[reg.comp]);
        } else {
                fprintf(ctx->out, "%s%c%d.%c", full ? "" : "h", type, reg.num, component[reg.comp]);
+               if (0 && full && !c) {
+                       reg_t hr0 = reg;
+                       hr0.iim_val *= 2;
+                       reg_t hr1 = hr0;
+                       hr1.iim_val += 1;
+                       fprintf(ctx->out, " (hr%d.%c,hr%d.%c)", hr0.num, component[hr0.comp], hr1.num, component[hr1.comp]);
+               }
        }
 }