aco: apply the clamped integer addition disassembly workaround for v_add3

LLVM fails to disassemble v_add3 + clamp.

Closes: https://gitlab.freedesktop.org/mesa/mesa/-/issues/3563
Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/6961>
This commit is contained in:
Samuel Pitoiset 2020-10-01 10:12:44 +02:00
parent c9192d1083
commit 01704dd1a4
1 changed files with 3 additions and 1 deletions

View File

@ -164,7 +164,9 @@ void print_asm(Program *program, std::vector<uint32_t>& binary,
if (!l &&
((program->chip_class >= GFX9 && (binary[pos] & 0xffff8000) == 0xd1348000) || /* v_add_u32_e64 + clamp */
(program->chip_class >= GFX10 && (binary[pos] & 0xffff8000) == 0xd7038000) || /* v_add_u16_e64 + clamp */
(program->chip_class <= GFX9 && (binary[pos] & 0xffff8000) == 0xd1268000)) /* v_add_u16_e64 + clamp */) {
(program->chip_class <= GFX9 && (binary[pos] & 0xffff8000) == 0xd1268000) || /* v_add_u16_e64 + clamp */
(program->chip_class >= GFX10 && (binary[pos] & 0xffff8000) == 0xd76d8000) || /* v_add3_u32 + clamp */
(program->chip_class == GFX9 && (binary[pos] & 0xffff8000) == 0xd1ff8000)) /* v_add3_u32 + clamp */) {
out << "\tinteger addition + clamp";
bool has_literal = program->chip_class >= GFX10 &&
(((binary[pos+1] & 0x1ff) == 0xff) || (((binary[pos+1] >> 9) & 0x1ff) == 0xff));