Mesa (master): pan/mdg: Fix printing of r26 ld/st sources post-RA
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Aug 19 12:19:22 UTC 2020
Module: Mesa
Branch: master
Commit: 529f79d639dfe6ba325b04edd78cecd5cbbf55cc
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=529f79d639dfe6ba325b04edd78cecd5cbbf55cc
Author: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Date: Fri Aug 14 11:02:47 2020 -0400
pan/mdg: Fix printing of r26 ld/st sources post-RA
Signed-off-by: Alyssa Rosenzweig <alyssa.rosenzweig at collabora.com>
Reviewed-by: Tomeu Vizoso <tomeu.vizoso at collabora.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6321>
---
src/panfrost/midgard/midgard_print.c | 7 +++++--
1 file changed, 5 insertions(+), 2 deletions(-)
diff --git a/src/panfrost/midgard/midgard_print.c b/src/panfrost/midgard/midgard_print.c
index 2bbc616ae31..b2b56f99862 100644
--- a/src/panfrost/midgard/midgard_print.c
+++ b/src/panfrost/midgard/midgard_print.c
@@ -250,9 +250,12 @@ mir_print_instruction(midgard_instruction *ins)
printf(", ");
+ /* Only ALU can have an embedded constant, r26 as read on load/store is
+ * something else entirely */
+ bool is_alu = ins->type == TAG_ALU_4;
unsigned r_constant = SSA_FIXED_REGISTER(REGISTER_CONSTANT);
- if (ins->src[0] == r_constant)
+ if (ins->src[0] == r_constant && is_alu)
mir_print_embedded_constant(ins, 0);
else
PRINT_SRC(ins, 0);
@@ -261,7 +264,7 @@ mir_print_instruction(midgard_instruction *ins)
if (ins->has_inline_constant)
printf("#%d", ins->inline_constant);
- else if (ins->src[1] == r_constant)
+ else if (ins->src[1] == r_constant && is_alu)
mir_print_embedded_constant(ins, 1);
else
PRINT_SRC(ins, 1);
More information about the mesa-commit
mailing list