aco/assembler: handle ds_(add|sub)_gs_reg_rtn encoding

They are different than normal DS instructions, only
use DATA[0], not use ADDR.

Reviewed-by: Rhys Perry <pendingchaos02@gmail.com>
Signed-off-by: Qiang Yu <yuq825@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/23094>
This commit is contained in:
Qiang Yu 2023-05-16 16:48:38 +08:00 committed by Marge Bot
parent 460b528c9e
commit 438dcf6d0f

View file

@ -473,7 +473,8 @@ emit_instruction(asm_context& ctx, std::vector<uint32_t>& out, Instruction* inst
encoding |= reg(ctx, instr->operands[2], 8) << 16;
if (instr->operands.size() >= 2 && instr->operands[1].physReg() != m0)
encoding |= reg(ctx, instr->operands[1], 8) << 8;
encoding |= reg(ctx, instr->operands[0], 8);
if (!instr->operands[0].isUndefined())
encoding |= reg(ctx, instr->operands[0], 8);
out.push_back(encoding);
break;
}