Mesa (master): aco: workaround disassembler bug of v_writelane_b32 with literal
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Sep 9 15:10:26 UTC 2020
Module: Mesa
Branch: master
Commit: 29cb3cba9ffde348aaf33576e5cbe974f024685c
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=29cb3cba9ffde348aaf33576e5cbe974f024685c
Author: Rhys Perry <pendingchaos02 at gmail.com>
Date: Mon Sep 7 20:20:50 2020 +0100
aco: workaround disassembler bug of v_writelane_b32 with literal
Signed-off-by: Rhys Perry <pendingchaos02 at gmail.com>
Reviewed-by: Daniel Schürmann <daniel at schuermann.dev>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6662>
---
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 ce12aacf9e4..b9a6226fb7a 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<uint32_t>& 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 */
More information about the mesa-commit
mailing list