Mesa (master): freedreno/ir3: fix printing half constant registers.

GitLab Mirror gitlab-mirror at kemper.freedesktop.org
Fri Feb 7 18:19:36 UTC 2020


Module: Mesa
Branch: master
Commit: 5e2012d5c7496d04772c83e89d9fa1c9bc4087e2
URL:    http://cgit.freedesktop.org/mesa/mesa/commit/?id=5e2012d5c7496d04772c83e89d9fa1c9bc4087e2

Author: Hyunjun Ko <zzoon at igalia.com>
Date:   Fri Nov  1 03:10:38 2019 +0000

freedreno/ir3: fix printing half constant registers.

Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3737>

---

 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 bbc532a46a4..cd45e912703 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<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);



More information about the mesa-commit mailing list