summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorGravatar ReinUsesLisp2020-04-20 21:54:59 -0300
committerGravatar ReinUsesLisp2020-04-20 21:54:59 -0300
commit8734ccb0cb4b019ad6c4b9f236a58b7f9048c6e3 (patch)
tree36b1983d616711d98c8d5a679961618f54c21bd1 /src
parentMerge pull request #3739 from MerryMage/disable_cpu_opt (diff)
downloadyuzu-8734ccb0cb4b019ad6c4b9f236a58b7f9048c6e3.tar.gz
yuzu-8734ccb0cb4b019ad6c4b9f236a58b7f9048c6e3.tar.xz
yuzu-8734ccb0cb4b019ad6c4b9f236a58b7f9048c6e3.zip
shader/arithmetic_integer: Fix LEA_IMM encoding
The operand order in LEA_IMM was flipped compared to nvdisasm. Fix that using nxas as reference: https://github.com/ReinUsesLisp/nxas/blob/8dbc38995711cc12206aa370145a3a02665fd989/table.h#L122
Diffstat (limited to 'src')
-rw-r--r--src/video_core/shader/decode/arithmetic_integer.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/video_core/shader/decode/arithmetic_integer.cpp b/src/video_core/shader/decode/arithmetic_integer.cpp
index 0f4c3103a..9af8c606d 100644
--- a/src/video_core/shader/decode/arithmetic_integer.cpp
+++ b/src/video_core/shader/decode/arithmetic_integer.cpp
@@ -249,8 +249,8 @@ u32 ShaderIR::DecodeArithmeticInteger(NodeBlock& bb, u32 pc) {
249 } 249 }
250 case OpCode::Id::LEA_IMM: { 250 case OpCode::Id::LEA_IMM: {
251 const bool neg = instr.lea.imm.neg != 0; 251 const bool neg = instr.lea.imm.neg != 0;
252 return {Immediate(static_cast<u32>(instr.lea.imm.entry_a)), 252 return {GetOperandAbsNegInteger(GetRegister(instr.gpr8), false, neg, true),
253 GetOperandAbsNegInteger(GetRegister(instr.gpr8), false, neg, true), 253 Immediate(static_cast<u32>(instr.lea.imm.entry_a)),
254 Immediate(static_cast<u32>(instr.lea.imm.entry_b))}; 254 Immediate(static_cast<u32>(instr.lea.imm.entry_b))};
255 } 255 }
256 case OpCode::Id::LEA_RZ: { 256 case OpCode::Id::LEA_RZ: {