freedreno/ir3: fix printing half constant registers.
authorHyunjun Ko <zzoon@igalia.com>
Fri, 1 Nov 2019 03:10:38 +0000 (03:10 +0000)
committerKristian H. Kristensen <hoegsberg@google.com>
Fri, 7 Feb 2020 17:51:25 +0000 (09:51 -0800)
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3737>

src/freedreno/ir3/disasm-a3xx.c

index bbc532a46a482b3382f553ecf6204dceaef7261b..cd45e912703e0326add99ab36405065e842d0282 100644 (file)
@@ -247,12 +247,13 @@ static void print_instr_cat1(struct disasm_ctx *ctx, instr_t *instr)
                 * libllvm-a3xx...
                 */
                char type = cat1->src_rel_c ? 'c' : 'r';
+               const char *full = (type_size(cat1->src_type) == 32) ? "" : "h";
                if (cat1->off < 0)
-                       fprintf(ctx->out, "%c<a0.x - %d>", type, -cat1->off);
+                       fprintf(ctx->out, "%s%c<a0.x - %d>", full, type, -cat1->off);
                else if (cat1->off > 0)
-                       fprintf(ctx->out, "%c<a0.x + %d>", type, cat1->off);
+                       fprintf(ctx->out, "%s%c<a0.x + %d>", full, type, cat1->off);
                else
-                       fprintf(ctx->out, "%c<a0.x>", type);
+                       fprintf(ctx->out, "%s%c<a0.x>", full, type);
        } else {
                print_reg_src(ctx, (reg_t)(cat1->src), type_size(cat1->src_type) == 32,
                                cat1->src_r, cat1->src_c, cat1->src_im, false, false, false);