From 5e2012d5c7496d04772c83e89d9fa1c9bc4087e2 Mon Sep 17 00:00:00 2001 From: Hyunjun Ko Date: Fri, 1 Nov 2019 03:10:38 +0000 Subject: [PATCH] freedreno/ir3: fix printing half constant registers. Part-of: --- src/freedreno/ir3/disasm-a3xx.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/freedreno/ir3/disasm-a3xx.c b/src/freedreno/ir3/disasm-a3xx.c index bbc532a..cd45e91 100644 --- a/src/freedreno/ir3/disasm-a3xx.c +++ b/src/freedreno/ir3/disasm-a3xx.c @@ -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", type, -cat1->off); + fprintf(ctx->out, "%s%c", full, type, -cat1->off); else if (cat1->off > 0) - fprintf(ctx->out, "%c", type, cat1->off); + fprintf(ctx->out, "%s%c", full, type, cat1->off); else - fprintf(ctx->out, "%c", type); + fprintf(ctx->out, "%s%c", 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); -- 2.7.4