Permalink
Browse files

PCSX2: Remove Unused And Unneeded Argument. (#1799)

EE interpeter: remove unused argument

rdd is neither used, nor needed. It appears it was there to pass the _Rd_ word to write to, but the writing was moved to PHMSBH() to have one "if (_Rd_)".

Add a note on undefined behavior
  • Loading branch information...
1 parent af38b8b commit c56ac2cf3e2cd5fa5d72eb7b56c0cd9eca3f40c1 @Huud Huud committed with gregory38 Feb 1, 2017
Showing with 8 additions and 8 deletions.
  1. +8 −8 pcsx2/MMI.cpp
View
@@ -1301,28 +1301,28 @@ void PMSUBH() { // JayteeMaster: changed a bit to avoid screw up
}
// JayteeMaster: changed a bit to avoid screw up
-static __fi void _PHMSBH_LO(int dd, int n, int rdd)
+static __fi void _PHMSBH_LO(int dd, int n)
{
s32 firsttemp = (s32)cpuRegs.GPR.r[_Rs_].SS[n+1] * (s32)cpuRegs.GPR.r[_Rt_].SS[n+1];
s32 temp = firsttemp - (s32)cpuRegs.GPR.r[_Rs_].SS[n] * (s32)cpuRegs.GPR.r[_Rt_].SS[n];
cpuRegs.LO.UL[dd] = temp;
- cpuRegs.LO.UL[dd+1] = ~firsttemp;
+ cpuRegs.LO.UL[dd+1] = ~firsttemp; // undocumented behaviour
}
-static __fi void _PHMSBH_HI(int dd, int n, int rdd)
+static __fi void _PHMSBH_HI(int dd, int n)
{
s32 firsttemp = (s32)cpuRegs.GPR.r[_Rs_].SS[n+1] * (s32)cpuRegs.GPR.r[_Rt_].SS[n+1];
s32 temp = firsttemp - (s32)cpuRegs.GPR.r[_Rs_].SS[n] * (s32)cpuRegs.GPR.r[_Rt_].SS[n];
cpuRegs.HI.UL[dd] = temp;
- cpuRegs.HI.UL[dd+1] = ~firsttemp;
+ cpuRegs.HI.UL[dd+1] = ~firsttemp; // undocumented behaviour
}
void PHMSBH() { // JayteeMaster: changed a bit to avoid screw up
- _PHMSBH_LO(0, 0, 0);
- _PHMSBH_HI(0, 2, 1);
- _PHMSBH_LO(2, 4, 2);
- _PHMSBH_HI(2, 6, 3);
+ _PHMSBH_LO(0, 0);
+ _PHMSBH_HI(0, 2);
+ _PHMSBH_LO(2, 4);
+ _PHMSBH_HI(2, 6);
if (_Rd_) {
cpuRegs.GPR.r[_Rd_].UL[0] = cpuRegs.LO.UL[0];
cpuRegs.GPR.r[_Rd_].UL[1] = cpuRegs.HI.UL[0];

0 comments on commit c56ac2c

Please sign in to comment.