From cc1a1da8abbc88e17fc6dec8d000436898187971 Mon Sep 17 00:00:00 2001 From: Samuel Pitoiset Date: Fri, 8 May 2020 18:02:12 +0200 Subject: [PATCH] aco: fix off-by-one error with 16-bit MTBUF opcodes on GFX10 Signed-off-by: Samuel Pitoiset Reviewed-by: Rhys Perry Part-of: --- src/amd/compiler/aco_assembler.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/amd/compiler/aco_assembler.cpp b/src/amd/compiler/aco_assembler.cpp index bac91c899e7..8876b5bc8f8 100644 --- a/src/amd/compiler/aco_assembler.cpp +++ b/src/amd/compiler/aco_assembler.cpp @@ -408,7 +408,7 @@ void emit_instruction(asm_context& ctx, std::vector& out, Instruction* encoding |= (0xFF & instr->operands[1].physReg()); if (ctx.chip_class >= GFX10) { - encoding |= (((opcode & 0x08) >> 4) << 21); /* MSB of 4-bit OPCODE */ + encoding |= (((opcode & 0x08) >> 3) << 21); /* MSB of 4-bit OPCODE */ } out.push_back(encoding); -- 2.30.2