Link Unconditionally (#1566)

EE Interpreter: Link Unconditionally on Branch and Link instructions
-Link instructions used to store the return address if the branch was
taken, but the correct behaviour is to store the return address whether
or not the branch is taken.
This commit is contained in:
Nobbs66 2016-09-16 03:58:37 -05:00 committed by refractionpcsx2
parent 3994141d40
commit 6589feaacd
1 changed files with 4 additions and 7 deletions

View File

@ -299,10 +299,9 @@ void BGEZ() // Branch if Rs >= 0
void BGEZAL() // Branch if Rs >= 0 and link
{
_SetLink(31);
if (cpuRegs.GPR.r[_Rs_].SD[0] >= 0)
{
_SetLink(31);
doBranch(_BranchTarget_);
}
}
@ -333,9 +332,9 @@ void BLTZ() // Branch if Rs < 0
void BLTZAL() // Branch if Rs < 0 and link
{
_SetLink(31);
if (cpuRegs.GPR.r[_Rs_].SD[0] < 0)
{
_SetLink(31);
doBranch(_BranchTarget_);
}
}
@ -426,10 +425,9 @@ void BGEZL() // Branch if Rs >= 0
void BLTZALL() // Branch if Rs < 0 and link
{
_SetLink(31);
if(cpuRegs.GPR.r[_Rs_].SD[0] < 0)
{
_SetLink(31);
doBranch(_BranchTarget_);
}
else
@ -441,10 +439,9 @@ void BLTZALL() // Branch if Rs < 0 and link
void BGEZALL() // Branch if Rs >= 0 and link
{
_SetLink(31);
if(cpuRegs.GPR.r[_Rs_].SD[0] >= 0)
{
_SetLink(31);
doBranch(_BranchTarget_);
}
else