JitIL: Fixed the wrong implementation of "mtcrf". (The bit order was reverse...) This commit may fix the bugs reported in Issue 3097 and r6127. (I could not test them because I don't have the games which are reported.)
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6134 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
aae0e96682
commit
47fa91250b
|
@ -148,9 +148,12 @@ void JitIL::mtcrf(UGeckoInstruction inst)
|
||||||
IREmitter::InstLoc s = ibuild.EmitLoadGReg(inst.RS);
|
IREmitter::InstLoc s = ibuild.EmitLoadGReg(inst.RS);
|
||||||
for (int i = 0; i < 8; ++i)
|
for (int i = 0; i < 8; ++i)
|
||||||
{
|
{
|
||||||
if (inst.CRM & (1 << i))
|
if (inst.CRM & (0x80 >> i))
|
||||||
{
|
{
|
||||||
ibuild.EmitStoreCR(ibuild.EmitAnd(ibuild.EmitShrl(s, ibuild.EmitIntConst(28 - 4 * i)), ibuild.EmitIntConst(0xf)), i);
|
IREmitter::InstLoc value;
|
||||||
|
value = ibuild.EmitShrl(s, ibuild.EmitIntConst(28 - i * 4));
|
||||||
|
value = ibuild.EmitAnd(value, ibuild.EmitIntConst(0xF));
|
||||||
|
ibuild.EmitStoreCR(value, i);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue