diff --git a/src/core/cpu_core.cpp b/src/core/cpu_core.cpp index 99b818c67..cf80b066c 100644 --- a/src/core/cpu_core.cpp +++ b/src/core/cpu_core.cpp @@ -992,7 +992,7 @@ restart_instruction: const u32 shamt = ReadReg(inst.r.rs) & UINT32_C(0x1F); const u32 rdVal = rtVal << shamt; if constexpr (pgxp_mode >= PGXPMode::CPU) - PGXP::CPU_SLLV(inst, rtVal, shamt); + PGXP::CPU_SLLV(inst, shamt, rtVal); WriteReg(inst.r.rd, rdVal); } @@ -1006,7 +1006,7 @@ restart_instruction: WriteReg(inst.r.rd, rdVal); if constexpr (pgxp_mode >= PGXPMode::CPU) - PGXP::CPU_SRLV(inst, rtVal, shamt); + PGXP::CPU_SRLV(inst, shamt, rtVal); } END_INSTRUCTION() @@ -1018,7 +1018,7 @@ restart_instruction: WriteReg(inst.r.rd, rdVal); if constexpr (pgxp_mode >= PGXPMode::CPU) - PGXP::CPU_SRAV(inst, rtVal, shamt); + PGXP::CPU_SRAV(inst, shamt, rtVal); } END_INSTRUCTION() diff --git a/src/core/cpu_pgxp.cpp b/src/core/cpu_pgxp.cpp index 2f597d56e..241ad73d6 100644 --- a/src/core/cpu_pgxp.cpp +++ b/src/core/cpu_pgxp.cpp @@ -1606,7 +1606,7 @@ void CPU::PGXP::CPU_SLL(Instruction instr, u32 rtVal) CPU_SLL(instr, rtVal, sh); } -void CPU::PGXP::CPU_SLLV(Instruction instr, u32 rtVal, u32 rsVal) +void CPU::PGXP::CPU_SLLV(Instruction instr, u32 rsVal, u32 rtVal) { LOG_VALUES_C2(instr.r.rt.GetValue(), rtVal, instr.r.rs.GetValue(), rsVal); @@ -1697,7 +1697,7 @@ void CPU::PGXP::CPU_SRL(Instruction instr, u32 rtVal) CPU_SRx(instr, rtVal, sh, false, false); } -void CPU::PGXP::CPU_SRLV(Instruction instr, u32 rtVal, u32 rsVal) +void CPU::PGXP::CPU_SRLV(Instruction instr, u32 rsVal, u32 rtVal) { LOG_VALUES_C2(instr.r.rt.GetValue(), rtVal, instr.r.rs.GetValue(), rsVal); @@ -1715,7 +1715,7 @@ void CPU::PGXP::CPU_SRA(Instruction instr, u32 rtVal) CPU_SRx(instr, rtVal, sh, true, false); } -void CPU::PGXP::CPU_SRAV(Instruction instr, u32 rtVal, u32 rsVal) +void CPU::PGXP::CPU_SRAV(Instruction instr, u32 rsVal, u32 rtVal) { LOG_VALUES_C2(instr.r.rt.GetValue(), rtVal, instr.r.rs.GetValue(), rsVal); diff --git a/src/core/cpu_pgxp.h b/src/core/cpu_pgxp.h index 0f6b47c56..58823580e 100644 --- a/src/core/cpu_pgxp.h +++ b/src/core/cpu_pgxp.h @@ -69,9 +69,9 @@ void CPU_DIVU(Instruction instr, u32 rsVal, u32 rtVal); void CPU_SLL(Instruction instr, u32 rtVal); void CPU_SRL(Instruction instr, u32 rtVal); void CPU_SRA(Instruction instr, u32 rtVal); -void CPU_SLLV(Instruction instr, u32 rtVal, u32 rsVal); -void CPU_SRLV(Instruction instr, u32 rtVal, u32 rsVal); -void CPU_SRAV(Instruction instr, u32 rtVal, u32 rsVal); +void CPU_SLLV(Instruction instr, u32 rsVal, u32 rtVal); +void CPU_SRLV(Instruction instr, u32 rsVal, u32 rtVal); +void CPU_SRAV(Instruction instr, u32 rsVal, u32 rtVal); void CPU_MFC0(Instruction instr, u32 rdVal); void CPU_MTC0(Instruction instr, u32 rdVal, u32 rtVal);