1
0
Fork 0
forked from suyu/suyu

shader/arithmetic_integer: Fix LEA_IMM encoding

The operand order in LEA_IMM was flipped compared to nvdisasm. Fix that
using nxas as reference:

8dbc389957/table.h (L122)
This commit is contained in:
ReinUsesLisp 2020-04-20 21:54:59 -03:00
parent 200f69d2ff
commit 8734ccb0cb

View file

@ -249,8 +249,8 @@ u32 ShaderIR::DecodeArithmeticInteger(NodeBlock& bb, u32 pc) {
} }
case OpCode::Id::LEA_IMM: { case OpCode::Id::LEA_IMM: {
const bool neg = instr.lea.imm.neg != 0; const bool neg = instr.lea.imm.neg != 0;
return {Immediate(static_cast<u32>(instr.lea.imm.entry_a)), return {GetOperandAbsNegInteger(GetRegister(instr.gpr8), false, neg, true),
GetOperandAbsNegInteger(GetRegister(instr.gpr8), false, neg, true), Immediate(static_cast<u32>(instr.lea.imm.entry_a)),
Immediate(static_cast<u32>(instr.lea.imm.entry_b))}; Immediate(static_cast<u32>(instr.lea.imm.entry_b))};
} }
case OpCode::Id::LEA_RZ: { case OpCode::Id::LEA_RZ: {