JIT implementations of lwzux and stwux. Unfortunately, not really a
visible performance increase. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1672 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
ba58962d24
commit
32402b465d
|
@ -275,6 +275,10 @@ public:
|
||||||
void lbzx(UGeckoInstruction inst);
|
void lbzx(UGeckoInstruction inst);
|
||||||
void lwzx(UGeckoInstruction inst);
|
void lwzx(UGeckoInstruction inst);
|
||||||
void lhax(UGeckoInstruction inst);
|
void lhax(UGeckoInstruction inst);
|
||||||
|
|
||||||
|
void lwzux(UGeckoInstruction inst);
|
||||||
|
|
||||||
|
void stwux(UGeckoInstruction inst);
|
||||||
|
|
||||||
void lmw(UGeckoInstruction inst);
|
void lmw(UGeckoInstruction inst);
|
||||||
void stmw(UGeckoInstruction inst);
|
void stmw(UGeckoInstruction inst);
|
||||||
|
|
|
@ -230,6 +230,31 @@
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Jit64::lwzux(UGeckoInstruction inst)
|
||||||
|
{
|
||||||
|
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
|
||||||
|
{Default(inst); return;} // turn off from debugger
|
||||||
|
INSTRUCTION_START;
|
||||||
|
|
||||||
|
int a = inst.RA, b = inst.RB, d = inst.RD;
|
||||||
|
if (!a || a == d || a == b)
|
||||||
|
{
|
||||||
|
Default(inst);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
gpr.Lock(a, b, d);
|
||||||
|
|
||||||
|
gpr.LoadToX64(d, b == d, true);
|
||||||
|
gpr.LoadToX64(a, true, true);
|
||||||
|
ADD(32, gpr.R(a), gpr.R(b));
|
||||||
|
MOV(32, R(EAX), gpr.R(a));
|
||||||
|
SafeLoadRegToEAX(EAX, 32, 0, false);
|
||||||
|
MOV(32, gpr.R(d), R(EAX));
|
||||||
|
|
||||||
|
gpr.UnlockAll();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// Zero cache line.
|
// Zero cache line.
|
||||||
void Jit64::dcbz(UGeckoInstruction inst)
|
void Jit64::dcbz(UGeckoInstruction inst)
|
||||||
{
|
{
|
||||||
|
@ -390,6 +415,32 @@
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
void Jit64::stwux(UGeckoInstruction inst)
|
||||||
|
{
|
||||||
|
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
|
||||||
|
{Default(inst); return;} // turn off from debugger
|
||||||
|
INSTRUCTION_START;
|
||||||
|
|
||||||
|
int a = inst.RA, b = inst.RB, s = inst.RS;
|
||||||
|
if (!a || a == s || a == b)
|
||||||
|
{
|
||||||
|
Default(inst);
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
gpr.Lock(a, b, s);
|
||||||
|
gpr.FlushLockX(ABI_PARAM1, ABI_PARAM2);
|
||||||
|
|
||||||
|
gpr.LoadToX64(a, true, true);
|
||||||
|
ADD(32, gpr.R(a), gpr.R(b));
|
||||||
|
MOV(32, R(ABI_PARAM2), gpr.R(a));
|
||||||
|
MOV(32, R(ABI_PARAM1), gpr.R(s));
|
||||||
|
SafeWriteRegToReg(ABI_PARAM1, ABI_PARAM2, 32, 0);
|
||||||
|
|
||||||
|
gpr.UnlockAll();
|
||||||
|
gpr.UnlockAllX();
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
// A few games use these heavily in video codecs.
|
// A few games use these heavily in video codecs.
|
||||||
void Jit64::lmw(UGeckoInstruction inst)
|
void Jit64::lmw(UGeckoInstruction inst)
|
||||||
{
|
{
|
||||||
|
|
|
@ -311,7 +311,7 @@ static GekkoOPTemplate table31[] =
|
||||||
|
|
||||||
//load word
|
//load word
|
||||||
{23, Interpreter::lwzx, &Jit64::lwzx, {"lwzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
|
{23, Interpreter::lwzx, &Jit64::lwzx, {"lwzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
|
||||||
{55, Interpreter::lwzux, &Jit64::Default, {"lwzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}},
|
{55, Interpreter::lwzux, &Jit64::lwzux, {"lwzux", OPTYPE_LOAD, FL_OUT_D | FL_OUT_A | FL_IN_A | FL_IN_B}},
|
||||||
|
|
||||||
//load halfword
|
//load halfword
|
||||||
{279, Interpreter::lhzx, &Jit64::Default, {"lhzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
|
{279, Interpreter::lhzx, &Jit64::Default, {"lhzx", OPTYPE_LOAD, FL_OUT_D | FL_IN_A0 | FL_IN_B}},
|
||||||
|
@ -339,7 +339,7 @@ static GekkoOPTemplate table31[] =
|
||||||
|
|
||||||
//store word
|
//store word
|
||||||
{151, Interpreter::stwx, &Jit64::Default, {"stwx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}},
|
{151, Interpreter::stwx, &Jit64::Default, {"stwx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}},
|
||||||
{183, Interpreter::stwux, &Jit64::Default, {"stwux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}},
|
{183, Interpreter::stwux, &Jit64::stwux, {"stwux", OPTYPE_STORE, FL_OUT_A | FL_IN_A | FL_IN_B}},
|
||||||
|
|
||||||
//store halfword
|
//store halfword
|
||||||
{407, Interpreter::sthx, &Jit64::Default, {"sthx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}},
|
{407, Interpreter::sthx, &Jit64::Default, {"sthx", OPTYPE_STORE, FL_IN_A0 | FL_IN_B}},
|
||||||
|
|
Loading…
Reference in New Issue