Fixed "bcl" instruction in the case where the branch is always taken. The old code would emit a "jne" that can skip the updating of LR depending on the state the host CPU happens to be in.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@451 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
72ca1e2355
commit
5ac0c33530
|
@ -161,7 +161,7 @@ namespace Jit64
|
||||||
|
|
||||||
if (doFullTest)
|
if (doFullTest)
|
||||||
{
|
{
|
||||||
TEST(32, R(EAX), R(ECX));
|
TEST(32, R(EAX), R(ECX));
|
||||||
branch = CC_Z;
|
branch = CC_Z;
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
@ -176,7 +176,11 @@ namespace Jit64
|
||||||
{
|
{
|
||||||
SUB(32, M(&CTR), Imm8(1));
|
SUB(32, M(&CTR), Imm8(1));
|
||||||
}
|
}
|
||||||
FixupBranch skip = J_CC(branch);
|
FixupBranch skip;
|
||||||
|
if (inst.BO != 20)
|
||||||
|
{
|
||||||
|
skip = J_CC(branch);
|
||||||
|
}
|
||||||
u32 destination;
|
u32 destination;
|
||||||
if (inst.LK)
|
if (inst.LK)
|
||||||
MOV(32, M(&LR), Imm32(js.compilerPC + 4));
|
MOV(32, M(&LR), Imm32(js.compilerPC + 4));
|
||||||
|
@ -185,8 +189,11 @@ namespace Jit64
|
||||||
else
|
else
|
||||||
destination = js.compilerPC + SignExt16(inst.BD << 2);
|
destination = js.compilerPC + SignExt16(inst.BD << 2);
|
||||||
WriteExit(destination, 0);
|
WriteExit(destination, 0);
|
||||||
SetJumpTarget(skip);
|
if (inst.BO != 20)
|
||||||
WriteExit(js.compilerPC + 4, 1);
|
{
|
||||||
|
SetJumpTarget(skip);
|
||||||
|
WriteExit(js.compilerPC + 4, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void bcctrx(UGeckoInstruction inst)
|
void bcctrx(UGeckoInstruction inst)
|
||||||
|
|
Loading…
Reference in New Issue