panfrost/midgard: Print the actual source register for store operations
authorBoris Brezillon <boris.brezillon@collabora.com>
Mon, 20 Jan 2020 21:00:48 +0000 (22:00 +0100)
committerMarge Bot <eric+marge@anholt.net>
Tue, 21 Jan 2020 14:57:12 +0000 (14:57 +0000)
Store operation use r26/r27 but have a word->reg set to 0 or 1 (base is
r26). Let's take this base offset into account in
print_load_store_instr().

Signed-off-by: Boris Brezillon <boris.brezillon@collabora.com>
Reviewed-by: Alyssa Rosenzweig <alyssa.rosenzweig@collabora.com>
Tested-by: Marge Bot <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3482>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/merge_requests/3482>

src/panfrost/midgard/disassemble.c

index eb0471bc90c732ec0cfc260b041ff2733035385e..e92214417c41b91d8a81acec959157d48ca59d2e 100644 (file)
@@ -1121,7 +1121,7 @@ print_load_store_instr(uint64_t data,
                         midg_stats.attribute_count = -16;
         }
 
-        printf(" r%u", word->reg);
+        printf(" r%u", word->reg + (OP_IS_STORE(word->op) ? 26 : 0));
         print_mask_4(word->mask, false);
 
         if (!OP_IS_STORE(word->op))