mirror of https://github.com/PCSX2/pcsx2.git
eeInt: Fix logically dead code in PMFLH.
-Coverity CID 146817: In R5900::Interpreter::OpcodeImpl::MMI::PMFHL(): Code can never be reached because of a logical contradiction (CWE-561) -This code is used by both the Interpreter and Recompiler, however it was probably never checked because nothing much uses it. Out of 248 games, it was called 0 times.
This commit is contained in:
parent
379adf3a8e
commit
5b4eb65e68
|
@ -183,18 +183,20 @@ void PMFHL() {
|
|||
case 0x02: // SLW
|
||||
{
|
||||
s64 TempS64 = ((u64)cpuRegs.HI.UL[0] << 32) | (u64)cpuRegs.LO.UL[0];
|
||||
|
||||
if (TempS64 >= 0x000000007fffffffLL) {
|
||||
cpuRegs.GPR.r[_Rd_].UD[0] = 0x000000007fffffffLL;
|
||||
} else if (TempS64 <= 0xffffffff80000000LL) {
|
||||
} else if (TempS64 <= -0x80000000LL) {
|
||||
cpuRegs.GPR.r[_Rd_].UD[0] = 0xffffffff80000000LL;
|
||||
} else {
|
||||
cpuRegs.GPR.r[_Rd_].UD[0] = (s64)cpuRegs.LO.SL[0];
|
||||
}
|
||||
|
||||
TempS64 = ((u64)cpuRegs.HI.UL[2] << 32) | (u64)cpuRegs.LO.UL[2];
|
||||
|
||||
if (TempS64 >= 0x000000007fffffffLL) {
|
||||
cpuRegs.GPR.r[_Rd_].UD[1] = 0x000000007fffffffLL;
|
||||
} else if (TempS64 <= 0xffffffff80000000LL) {
|
||||
} else if (TempS64 <= -0x80000000LL) {
|
||||
cpuRegs.GPR.r[_Rd_].UD[1] = 0xffffffff80000000LL;
|
||||
} else {
|
||||
cpuRegs.GPR.r[_Rd_].UD[1] = (s64)cpuRegs.LO.SL[2];
|
||||
|
|
Loading…
Reference in New Issue