JITIL fixes:
* ble involving CR flags was branching the wrong way around. * xorx now works when sent the same register for both the src and dest * lbzu disabled (same as JIT) fixing a Dolphin crash * JITIL provided with the memory exception handler fixing crashes when memory is read out of bounds. These fixes are able to get F-Zero GX in-game when JIT FloatingPoint is disabled. Once in-game, F-Zero retires the player just like it does in JIT. This change might fix Dolphin crashes involving JITIL in other games too. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4723 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
acef487f8a
commit
0d0a7c515f
|
@ -300,9 +300,7 @@ THREAD_RETURN CpuThread(void *pArg)
|
|||
{
|
||||
#ifdef _M_X64
|
||||
// Let's run under memory watch
|
||||
#ifndef JITTEST
|
||||
EMM::InstallExceptionHandler();
|
||||
#endif
|
||||
#else
|
||||
PanicAlert("32-bit platforms do not support fastmem yet. Report this bug.");
|
||||
#endif
|
||||
|
|
|
@ -84,7 +84,7 @@ static IREmitter::InstLoc TestBranch(IREmitter::IRBuilder& ibuild, UGeckoInstruc
|
|||
IREmitter::InstLoc CRCmp = ibuild.EmitIntConst(8 >> (inst.BI & 3));
|
||||
CRTest = ibuild.EmitAnd(CRReg, CRCmp);
|
||||
if (!(inst.BO & 8))
|
||||
CRTest = ibuild.EmitXor(CRTest, CRCmp);
|
||||
CRTest = ibuild.EmitXor(CRCmp, CRTest);
|
||||
}
|
||||
|
||||
if ((inst.BO & 4) == 0) {
|
||||
|
|
|
@ -146,6 +146,13 @@ void Jit64::xorx(UGeckoInstruction inst)
|
|||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(Integer)
|
||||
if (inst.RB == inst.RS)
|
||||
{
|
||||
IREmitter::InstLoc val = ibuild.EmitStoreGReg(ibuild.EmitIntConst(0), inst.RA);
|
||||
if (inst.Rc)
|
||||
ComputeRC(ibuild, val);
|
||||
return;
|
||||
}
|
||||
IREmitter::InstLoc val = ibuild.EmitLoadGReg(inst.RB);
|
||||
val = ibuild.EmitXor(ibuild.EmitLoadGReg(inst.RS), val);
|
||||
ibuild.EmitStoreGReg(val, inst.RA);
|
||||
|
|
|
@ -61,7 +61,7 @@ void Jit64::lXz(UGeckoInstruction inst)
|
|||
{
|
||||
case 32: val = ibuild.EmitLoad32(addr); break; //lwz
|
||||
case 40: val = ibuild.EmitLoad16(addr); break; //lhz
|
||||
case 34: val = ibuild.EmitLoad8(addr); break; //lbz
|
||||
case 34: val = ibuild.EmitLoad8(addr); break; //lbz - lbzu crashes GFZP01 @ 0x8008575C
|
||||
default: PanicAlert("lXz: invalid access size");
|
||||
}
|
||||
ibuild.EmitStoreGReg(val, inst.RD);
|
||||
|
@ -164,7 +164,7 @@ void Jit64::stXx(UGeckoInstruction inst)
|
|||
}
|
||||
}
|
||||
|
||||
// A few games use these heavily in video codecs.
|
||||
// A few games use these heavily in video codecs. (GFZP01 @ 0x80020E18)
|
||||
void Jit64::lmw(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
|
|
|
@ -37,6 +37,10 @@ void Jit64::mtspr(UGeckoInstruction inst)
|
|||
JITDISABLE(SystemRegisters)
|
||||
u32 iIndex = (inst.SPRU << 5) | (inst.SPRL & 0x1F);
|
||||
switch(iIndex) {
|
||||
case SPR_TL:
|
||||
case SPR_TU:
|
||||
Default(inst);
|
||||
return;
|
||||
case SPR_LR:
|
||||
ibuild.EmitStoreLink(ibuild.EmitLoadGReg(inst.RD));
|
||||
return;
|
||||
|
@ -70,6 +74,10 @@ void Jit64::mfspr(UGeckoInstruction inst)
|
|||
u32 iIndex = (inst.SPRU << 5) | (inst.SPRL & 0x1F);
|
||||
switch (iIndex)
|
||||
{
|
||||
case SPR_TL:
|
||||
case SPR_TU:
|
||||
Default(inst);
|
||||
return;
|
||||
case SPR_LR:
|
||||
ibuild.EmitStoreGReg(ibuild.EmitLoadLink(), inst.RD);
|
||||
return;
|
||||
|
|
|
@ -82,7 +82,7 @@ static GekkoOPTemplate primarytable[] =
|
|||
{32, &Jit64::lXz}, //"lwz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}},
|
||||
{33, &Jit64::lXz}, //"lwzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}},
|
||||
{34, &Jit64::lXz}, //"lbz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}},
|
||||
{35, &Jit64::lXz}, //"lbzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}},
|
||||
{35, &Jit64::Default}, //"lbzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}},
|
||||
{40, &Jit64::lXz}, //"lhz", OPTYPE_LOAD, FL_OUT_D | FL_IN_A}},
|
||||
{41, &Jit64::lXz}, //"lhzu", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A}},
|
||||
#else
|
||||
|
|
Loading…
Reference in New Issue