From 29cb3cba9ffde348aaf33576e5cbe974f024685c Mon Sep 17 00:00:00 2001 From: Rhys Perry Date: Mon, 7 Sep 2020 20:20:50 +0100 Subject: [PATCH] aco: workaround disassembler bug of v_writelane_b32 with literal MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Rhys Perry Reviewed-by: Daniel Schürmann Part-of: --- src/amd/compiler/aco_print_asm.cpp | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/src/amd/compiler/aco_print_asm.cpp b/src/amd/compiler/aco_print_asm.cpp index ce12aac..b9a6226 100644 --- a/src/amd/compiler/aco_print_asm.cpp +++ b/src/amd/compiler/aco_print_asm.cpp @@ -153,6 +153,13 @@ void print_asm(Program *program, std::vector& binary, (exec_size - pos) * sizeof(uint32_t), pos * 4, outline, sizeof(outline)); + if (program->chip_class >= GFX10 && l == 8 && + ((binary[pos] & 0xffff0000) == 0xd7610000) && + ((binary[pos + 1] & 0x1ff) == 0xff)) { + /* v_writelane with literal uses 3 dwords but llvm consumes only 2 */ + l += 4; + } + size_t new_pos; if (!l && ((program->chip_class >= GFX9 && (binary[pos] & 0xffff8000) == 0xd1348000) || /* v_add_u32_e64 + clamp */ -- 2.7.4