small code cleanup in JIT: use JITIL's nice JITDISABLE macro

git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4477 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
Shawn Hoffman 2009-10-29 04:40:26 +00:00
parent 31e61da40d
commit 5b4d12c1f3
9 changed files with 1788 additions and 1867 deletions

View File

@ -77,7 +77,10 @@ void Jit(u32 em_address);
// #define INSTRUCTION_START PPCTables::CountInstruction(inst);
#define INSTRUCTION_START
#define JITDISABLE(type) \
if (Core::g_CoreStartupParameter.bJITOff || \
Core::g_CoreStartupParameter.bJIT##type##Off) \
{Default(inst); return;}
class TrampolineCache : public Gen::XCodeBlock
{

View File

@ -73,9 +73,8 @@ void Jit64::fp_tri_op(int d, int a, int b, bool reversible, bool dupe, void (XEm
void Jit64::fp_arith_s(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITFloatingPointOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(FloatingPoint)
if (inst.Rc) {
Default(inst); return;
}
@ -104,9 +103,8 @@ void Jit64::fp_arith_s(UGeckoInstruction inst)
void Jit64::fmaddXX(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITFloatingPointOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(FloatingPoint)
if (inst.Rc) {
Default(inst); return;
}
@ -162,9 +160,8 @@ void Jit64::fmaddXX(UGeckoInstruction inst)
void Jit64::fsign(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITFloatingPointOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(FloatingPoint)
if (inst.Rc) {
Default(inst); return;
}
@ -195,8 +192,7 @@ void Jit64::fsign(UGeckoInstruction inst)
void Jit64::fmrx(UGeckoInstruction inst)
{
INSTRUCTION_START
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITFloatingPointOff)
{Default(inst); return;} // turn off from debugger
JITDISABLE(FloatingPoint)
if (inst.Rc) {
Default(inst); return;
}
@ -213,9 +209,9 @@ void Jit64::fcmpx(UGeckoInstruction inst)
{
// TODO : This still causes crashes in Nights, and broken graphics
// in Paper Mario, Super Paper Mario as well as SoulCalibur 2 prolly others too.. :(
INSTRUCTION_START;
if(Core::g_CoreStartupParameter.bJITOff || jo.fpAccurateFcmp
|| Core::g_CoreStartupParameter.bJITFloatingPointOff) {
INSTRUCTION_START
JITDISABLE(FloatingPoint)
if (jo.fpAccurateFcmp) {
Default(inst); return; // turn off from debugger
}

View File

@ -87,10 +87,8 @@
void Jit64::reg_imm(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int d = inst.RD, a = inst.RA, s = inst.RS;
switch (inst.OPCD)
{
@ -129,10 +127,8 @@
void Jit64::cmpXX(UGeckoInstruction inst)
{
// USES_CR
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA;
int b = inst.RB;
int crf = inst.CRFD;
@ -248,10 +244,8 @@
void Jit64::orx(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA;
int s = inst.RS;
int b = inst.RB;
@ -289,10 +283,8 @@
// m_GPR[_inst.RA] = m_GPR[_inst.RS] ^ m_GPR[_inst.RB];
void Jit64::xorx(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA;
int s = inst.RS;
int b = inst.RB;
@ -319,10 +311,8 @@
void Jit64::andx(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA, s = inst.RS, b = inst.RB;
if (a != s && a != b) {
gpr.LoadToX64(a, false, true);
@ -343,10 +333,8 @@
void Jit64::extsbx(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA,
s = inst.RS;
gpr.LoadToX64(a, a == s, true);
@ -363,10 +351,8 @@
void Jit64::extshx(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA, s = inst.RS;
gpr.KillImmediate(s);
gpr.LoadToX64(a, a == s, true);
@ -382,10 +368,8 @@
void Jit64::subfic(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA, d = inst.RD;
gpr.FlushLockX(ECX);
gpr.Lock(a, d);
@ -436,10 +420,8 @@
void Jit64::subfx(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA, b = inst.RB, d = inst.RD;
gpr.Lock(a, b, d);
if (d != a && d != b) {
@ -460,10 +442,8 @@
void Jit64::mulli(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA, d = inst.RD;
gpr.Lock(a, d);
gpr.LoadToX64(d, (d == a), true);
@ -474,10 +454,8 @@
void Jit64::mullwx(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA, b = inst.RB, d = inst.RD;
gpr.Lock(a, b, d);
gpr.LoadToX64(d, (d == a || d == b), true);
@ -498,10 +476,8 @@
void Jit64::mulhwux(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA, b = inst.RB, d = inst.RD;
gpr.FlushLockX(EDX);
gpr.Lock(a, b, d);
@ -562,10 +538,8 @@
void Jit64::addx(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA, b = inst.RB, d = inst.RD;
_assert_msg_(DYNA_REC, !inst.OE, "Add - OE enabled :(");
@ -620,10 +594,8 @@
void Jit64::addex(UGeckoInstruction inst)
{
// USES_XER
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA, b = inst.RB, d = inst.RD;
gpr.FlushLockX(ECX);
gpr.Lock(a, b, d);
@ -647,10 +619,8 @@
void Jit64::rlwinmx(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA;
int s = inst.RS;
if (gpr.R(s).IsImm() && !inst.Rc)
@ -705,10 +675,8 @@
void Jit64::rlwimix(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA;
int s = inst.RS;
if (gpr.R(a).IsImm() || gpr.R(s).IsImm())
@ -740,10 +708,8 @@
void Jit64::rlwnmx(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA, b = inst.RB, s = inst.RS;
if (gpr.R(a).IsImm())
{
@ -771,10 +737,8 @@
void Jit64::negx(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA;
int d = inst.RD;
gpr.Lock(a, d);
@ -792,10 +756,8 @@
void Jit64::srwx(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA;
int b = inst.RB;
int s = inst.RS;
@ -821,10 +783,8 @@
void Jit64::slwx(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA;
int b = inst.RB;
int s = inst.RS;
@ -851,10 +811,8 @@
void Jit64::srawx(UGeckoInstruction inst)
{
// USES_XER
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA;
int b = inst.RB;
int s = inst.RS;
@ -897,10 +855,8 @@
void Jit64::srawix(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA;
int s = inst.RS;
int amount = inst.SH;
@ -943,10 +899,8 @@
// count leading zeroes
void Jit64::cntlzwx(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITIntegerOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Integer)
int a = inst.RA;
int s = inst.RS;
if (gpr.R(a).IsImm() || gpr.R(s).IsImm() || s == a)

View File

@ -35,10 +35,10 @@
void Jit64::lbzx(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff
|| Core::g_CoreStartupParameter.bJITLoadStorelbzxOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(LoadStore)
if (Core::g_CoreStartupParameter.bJITLoadStorelbzxOff)
Default(inst); return;
int a = inst.RA, b = inst.RB, d = inst.RD;
gpr.Lock(a, b, d);
@ -62,9 +62,8 @@
void Jit64::lwzx(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(LoadStore)
int a = inst.RA, b = inst.RB, d = inst.RD;
gpr.Lock(a, b, d);
@ -88,9 +87,8 @@
void Jit64::lhax(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(LoadStore)
int a = inst.RA, b = inst.RB, d = inst.RD;
gpr.Lock(a, b, d);
@ -113,10 +111,10 @@
void Jit64::lXz(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff
|| Core::g_CoreStartupParameter.bJITLoadStorelXzOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(LoadStore)
if (Core::g_CoreStartupParameter.bJITLoadStorelXzOff)
Default(inst); return;
int d = inst.RD;
int a = inst.RA;
@ -232,9 +230,8 @@
void Jit64::lha(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(LoadStore)
int d = inst.RD;
int a = inst.RA;
@ -253,9 +250,8 @@
void Jit64::lwzux(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(LoadStore)
int a = inst.RA, b = inst.RB, d = inst.RD;
if (!a || a == d || a == b)
@ -279,11 +275,10 @@
// Zero cache line.
void Jit64::dcbz(UGeckoInstruction inst)
{
Default(inst); return;
INSTRUCTION_START
JITDISABLE(LoadStore)
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
Default(inst); return;
MOV(32, R(EAX), gpr.R(inst.RB));
if (inst.RA)
@ -302,9 +297,8 @@
void Jit64::stX(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(LoadStore)
int s = inst.RS;
int a = inst.RA;
@ -432,9 +426,8 @@
void Jit64::stXx(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(LoadStore)
int a = inst.RA, b = inst.RB, s = inst.RS;
if (!a || a == s || a == b)

View File

@ -51,9 +51,8 @@ u32 GC_ALIGNED16(temp32);
void Jit64::lfs(UGeckoInstruction inst)
{
if (Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(LoadStoreFloating)
int d = inst.RD;
int a = inst.RA;
@ -88,9 +87,8 @@ void Jit64::lfs(UGeckoInstruction inst)
void Jit64::lfd(UGeckoInstruction inst)
{
if (Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(LoadStoreFloating)
int d = inst.RD;
int a = inst.RA;
@ -155,10 +153,8 @@ void Jit64::lfd(UGeckoInstruction inst)
void Jit64::stfd(UGeckoInstruction inst)
{
if (Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(LoadStoreFloating)
int s = inst.RS;
int a = inst.RA;
@ -234,9 +230,8 @@ void Jit64::stfd(UGeckoInstruction inst)
void Jit64::stfs(UGeckoInstruction inst)
{
if (Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(LoadStoreFloating)
bool update = inst.OPCD & 1;
int s = inst.RS;
@ -291,9 +286,8 @@ void Jit64::stfs(UGeckoInstruction inst)
void Jit64::stfsx(UGeckoInstruction inst)
{
if (Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(LoadStoreFloating)
// We can take a shortcut here - it's not likely that a hardware access would use this instruction.
gpr.FlushLockX(ABI_PARAM1);
@ -311,9 +305,8 @@ void Jit64::stfsx(UGeckoInstruction inst)
void Jit64::lfsx(UGeckoInstruction inst)
{
if (Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreFloatingOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(LoadStoreFloating)
fpr.Lock(inst.RS);
fpr.LoadToX64(inst.RS, false, true);

View File

@ -91,9 +91,8 @@ const double GC_ALIGNED16(m_dequantizeTableD[]) =
// We will have to break block after quantizers are written to.
void Jit64::psq_st(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStorePairedOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(LoadStorePaired)
js.block_flags |= BLOCK_USE_GQR0 << inst.I;
if (js.blockSetsQuantizers || !Core::GetStartupParameter().bOptimizeQuantizers)
@ -296,9 +295,8 @@ void Jit64::psq_st(UGeckoInstruction inst)
void Jit64::psq_l(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStorePairedOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(LoadStorePaired)
js.block_flags |= BLOCK_USE_GQR0 << inst.I;

View File

@ -41,9 +41,8 @@
void Jit64::ps_mr(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Paired)
if (inst.Rc) {
Default(inst); return;
}
@ -57,11 +56,10 @@
void Jit64::ps_sel(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
Default(inst);
return;
INSTRUCTION_START
JITDISABLE(Paired)
Default(inst); return;
if (inst.Rc) {
Default(inst); return;
@ -90,9 +88,8 @@
void Jit64::ps_sign(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Paired)
if (inst.Rc) {
Default(inst); return;
}
@ -128,9 +125,8 @@
void Jit64::ps_rsqrte(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Paired)
if (inst.Rc) {
Default(inst); return;
}
@ -201,9 +197,8 @@
void Jit64::ps_arith(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Paired)
if (inst.Rc) {
Default(inst); return;
}
@ -226,9 +221,8 @@
void Jit64::ps_sum(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Paired)
if (inst.Rc) {
Default(inst); return;
}
@ -268,9 +262,8 @@
void Jit64::ps_muls(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Paired)
if (inst.Rc) {
Default(inst); return;
}
@ -308,9 +301,8 @@
//TODO: find easy cases and optimize them, do a breakout like ps_arith
void Jit64::ps_mergeXX(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Paired)
if (inst.Rc) {
Default(inst); return;
}
@ -346,9 +338,8 @@
//TODO: add optimized cases
void Jit64::ps_maddXX(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITPairedOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(Paired)
if (inst.Rc) {
Default(inst); return;
}

View File

@ -31,9 +31,8 @@
void Jit64::mtspr(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(SystemRegisters)
u32 iIndex = (inst.SPRU << 5) | (inst.SPRL & 0x1F);
int d = inst.RD;
@ -82,9 +81,8 @@
void Jit64::mfspr(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(SystemRegisters)
u32 iIndex = (inst.SPRU << 5) | (inst.SPRL & 0x1F);
int d = inst.RD;
switch (iIndex)
@ -114,9 +112,8 @@
// --------------
void Jit64::mtmsr(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(SystemRegisters)
gpr.LoadToX64(inst.RS, true, false);
MOV(32, M(&MSR), gpr.R(inst.RS));
gpr.Flush(FLUSH_ALL);
@ -128,9 +125,8 @@
void Jit64::mfmsr(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(SystemRegisters)
//Privileged?
gpr.LoadToX64(inst.RD, false);
MOV(32, gpr.R(inst.RD), M(&MSR));
@ -138,17 +134,15 @@
void Jit64::mftb(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(SystemRegisters)
mfspr(inst);
}
void Jit64::mfcr(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(SystemRegisters)
// USES_CR
int d = inst.RD;
gpr.LoadToX64(d, false, true);
@ -164,9 +158,8 @@
void Jit64::mtcrf(UGeckoInstruction inst)
{
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
{Default(inst); return;} // turn off from debugger
INSTRUCTION_START;
INSTRUCTION_START
JITDISABLE(SystemRegisters)
// USES_CR
u32 mask = 0;