mirror of
https://github.com/izzy2lost/dolphin.git
synced 2026-06-19 01:16:48 -07:00
Merge pull request #122 from lioncash/rename-default
Rename the JIT function Default() to FallBackToInterpreter(). Communicates intent way better in terms of telling the reader what's going on.
This commit is contained in:
@@ -199,7 +199,7 @@ void Jit64::Shutdown()
|
||||
asm_routines.Shutdown();
|
||||
}
|
||||
|
||||
// This is only called by Default() in this file. It will execute an instruction with the interpreter functions.
|
||||
// This is only called by FallBackToInterpreter() in this file. It will execute an instruction with the interpreter functions.
|
||||
void Jit64::WriteCallInterpreter(UGeckoInstruction inst)
|
||||
{
|
||||
gpr.Flush(FLUSH_ALL);
|
||||
@@ -218,7 +218,7 @@ void Jit64::unknown_instruction(UGeckoInstruction inst)
|
||||
PanicAlert("unknown_instruction %08x - Fix me ;)", inst.hex);
|
||||
}
|
||||
|
||||
void Jit64::Default(UGeckoInstruction _inst)
|
||||
void Jit64::FallBackToInterpreter(UGeckoInstruction _inst)
|
||||
{
|
||||
WriteCallInterpreter(_inst.hex);
|
||||
}
|
||||
|
||||
@@ -113,7 +113,7 @@ public:
|
||||
|
||||
// OPCODES
|
||||
void unknown_instruction(UGeckoInstruction _inst);
|
||||
void Default(UGeckoInstruction _inst);
|
||||
void FallBackToInterpreter(UGeckoInstruction _inst);
|
||||
void DoNothing(UGeckoInstruction _inst);
|
||||
void HLEFunction(UGeckoInstruction _inst);
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -75,13 +75,18 @@ void Jit64::fp_arith(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
if (inst.Rc) {
|
||||
Default(inst); return;
|
||||
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
// Only the interpreter has "proper" support for (some) FP flags
|
||||
if (inst.SUBOP5 == 25 && Core::g_CoreStartupParameter.bEnableFPRF) {
|
||||
Default(inst); return;
|
||||
if (inst.SUBOP5 == 25 && Core::g_CoreStartupParameter.bEnableFPRF)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
bool single = inst.OPCD == 59;
|
||||
@@ -98,29 +103,35 @@ void Jit64::fp_arith(UGeckoInstruction inst)
|
||||
|
||||
void Jit64::frsqrtex(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
int d = inst.FD;
|
||||
int b = inst.FB;
|
||||
fpr.Lock(b, d);
|
||||
fpr.BindToRegister(d, true, true);
|
||||
MOVSD(XMM0, M((void *)&one_const));
|
||||
SQRTSD(XMM1, fpr.R(b));
|
||||
DIVSD(XMM0, R(XMM1));
|
||||
MOVSD(fpr.R(d), XMM0);
|
||||
fpr.UnlockAll();
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
int d = inst.FD;
|
||||
int b = inst.FB;
|
||||
fpr.Lock(b, d);
|
||||
fpr.BindToRegister(d, true, true);
|
||||
MOVSD(XMM0, M((void *)&one_const));
|
||||
SQRTSD(XMM1, fpr.R(b));
|
||||
DIVSD(XMM0, R(XMM1));
|
||||
MOVSD(fpr.R(d), XMM0);
|
||||
fpr.UnlockAll();
|
||||
}
|
||||
|
||||
void Jit64::fmaddXX(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
if (inst.Rc) {
|
||||
Default(inst); return;
|
||||
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
// Only the interpreter has "proper" support for (some) FP flags
|
||||
if (inst.SUBOP5 == 29 && Core::g_CoreStartupParameter.bEnableFPRF) {
|
||||
Default(inst); return;
|
||||
if (inst.SUBOP5 == 29 && Core::g_CoreStartupParameter.bEnableFPRF)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
bool single_precision = inst.OPCD == 59;
|
||||
@@ -172,8 +183,11 @@ void Jit64::fsign(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
if (inst.Rc) {
|
||||
Default(inst); return;
|
||||
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
int d = inst.FD;
|
||||
@@ -203,9 +217,13 @@ void Jit64::fmrx(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
if (inst.Rc) {
|
||||
Default(inst); return;
|
||||
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
int d = inst.FD;
|
||||
int b = inst.FB;
|
||||
fpr.Lock(b, d);
|
||||
@@ -219,8 +237,11 @@ void Jit64::fcmpx(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
if (jo.fpAccurateFcmp) {
|
||||
Default(inst); return; // turn off from debugger
|
||||
|
||||
if (jo.fpAccurateFcmp)
|
||||
{
|
||||
FallBackToInterpreter(inst); // turn off from debugger
|
||||
return;
|
||||
}
|
||||
|
||||
//bool ordered = inst.SUBOP10 == 32;
|
||||
|
||||
@@ -296,7 +296,7 @@ void Jit64::reg_imm(UGeckoInstruction inst)
|
||||
case 12: regimmop(d, a, false, (u32)(s32)inst.SIMM_16, Add, &XEmitter::ADD, false, true); break; //addic
|
||||
case 13: regimmop(d, a, true, (u32)(s32)inst.SIMM_16, Add, &XEmitter::ADD, true, true); break; //addic_rc
|
||||
default:
|
||||
Default(inst);
|
||||
FallBackToInterpreter(inst);
|
||||
break;
|
||||
}
|
||||
}
|
||||
@@ -2111,15 +2111,21 @@ void Jit64::srawix(UGeckoInstruction inst)
|
||||
}
|
||||
else
|
||||
{
|
||||
Default(inst); return; // FIXME
|
||||
// FIXME
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
|
||||
gpr.Lock(a, s);
|
||||
JitClearCA();
|
||||
gpr.BindToRegister(a, a == s, true);
|
||||
|
||||
if (a != s)
|
||||
{
|
||||
MOV(32, gpr.R(a), gpr.R(s));
|
||||
}
|
||||
if (inst.Rc) {
|
||||
|
||||
if (inst.Rc)
|
||||
{
|
||||
ComputeRC(gpr.R(a));
|
||||
}
|
||||
gpr.UnlockAll();
|
||||
|
||||
@@ -20,11 +20,20 @@ void Jit64::lXXx(UGeckoInstruction inst)
|
||||
|
||||
// Skip disabled JIT instructions
|
||||
if (Core::g_CoreStartupParameter.bJITLoadStorelbzxOff && (inst.OPCD == 31) && (inst.SUBOP10 == 87))
|
||||
{ Default(inst); return; }
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
if (Core::g_CoreStartupParameter.bJITLoadStorelXzOff && ((inst.OPCD == 34) || (inst.OPCD == 40) || (inst.OPCD == 32)))
|
||||
{ Default(inst); return; }
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
if (Core::g_CoreStartupParameter.bJITLoadStorelwzOff && (inst.OPCD == 32))
|
||||
{ Default(inst); return; }
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
// Determine memory access size and sign extend
|
||||
int accessSize = 0;
|
||||
@@ -225,7 +234,8 @@ void Jit64::dcbst(UGeckoInstruction inst)
|
||||
// dcbt = 0x7c00022c
|
||||
if ((Memory::ReadUnchecked_U32(js.compilerPC - 4) & 0x7c00022c) != 0x7c00022c)
|
||||
{
|
||||
Default(inst); return;
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -235,7 +245,9 @@ void Jit64::dcbz(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITLoadStoreOff)
|
||||
|
||||
Default(inst); return;
|
||||
// FIXME
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
|
||||
MOV(32, R(EAX), gpr.R(inst.RB));
|
||||
if (inst.RA)
|
||||
@@ -398,7 +410,7 @@ void Jit64::stXx(UGeckoInstruction inst)
|
||||
int a = inst.RA, b = inst.RB, s = inst.RS;
|
||||
if (!a || a == s || a == b)
|
||||
{
|
||||
Default(inst);
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
gpr.Lock(a, b, s);
|
||||
@@ -451,7 +463,8 @@ void Jit64::lmw(UGeckoInstruction inst)
|
||||
}
|
||||
gpr.UnlockAllX();
|
||||
#else
|
||||
Default(inst); return;
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
@@ -473,12 +486,13 @@ void Jit64::stmw(UGeckoInstruction inst)
|
||||
}
|
||||
gpr.UnlockAllX();
|
||||
#else
|
||||
Default(inst); return;
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
|
||||
void Jit64::icbi(UGeckoInstruction inst)
|
||||
{
|
||||
Default(inst);
|
||||
FallBackToInterpreter(inst);
|
||||
WriteExit(js.compilerPC + 4);
|
||||
}
|
||||
|
||||
@@ -36,9 +36,10 @@ void Jit64::lfs(UGeckoInstruction inst)
|
||||
int a = inst.RA;
|
||||
if (!a)
|
||||
{
|
||||
Default(inst);
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
s32 offset = (s32)(s16)inst.SIMM_16;
|
||||
|
||||
SafeLoadToReg(EAX, gpr.R(a), 32, offset, RegistersInUse(), false);
|
||||
@@ -60,15 +61,20 @@ void Jit64::lfd(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITLoadStoreFloatingOff)
|
||||
|
||||
if (js.memcheck) { Default(inst); return; }
|
||||
if (js.memcheck)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
int d = inst.RD;
|
||||
int a = inst.RA;
|
||||
if (!a)
|
||||
{
|
||||
Default(inst);
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
s32 offset = (s32)(s16)inst.SIMM_16;
|
||||
gpr.FlushLockX(ABI_PARAM1);
|
||||
gpr.Lock(a);
|
||||
@@ -129,13 +135,17 @@ void Jit64::stfd(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITLoadStoreFloatingOff)
|
||||
|
||||
if (js.memcheck) { Default(inst); return; }
|
||||
if (js.memcheck)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
int s = inst.RS;
|
||||
int a = inst.RA;
|
||||
if (!a)
|
||||
{
|
||||
Default(inst);
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -218,8 +228,10 @@ void Jit64::stfs(UGeckoInstruction inst)
|
||||
int s = inst.RS;
|
||||
int a = inst.RA;
|
||||
s32 offset = (s32)(s16)inst.SIMM_16;
|
||||
if (!a || update) {
|
||||
Default(inst);
|
||||
|
||||
if (!a || update)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -19,12 +19,16 @@ void Jit64::psq_st(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITLoadStorePairedOff)
|
||||
|
||||
if (js.memcheck) { Default(inst); return; }
|
||||
if (js.memcheck)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!inst.RA)
|
||||
{
|
||||
// TODO: Support these cases if it becomes necessary.
|
||||
Default(inst);
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -71,11 +75,15 @@ void Jit64::psq_l(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITLoadStorePairedOff)
|
||||
|
||||
if (js.memcheck) { Default(inst); return; }
|
||||
if (js.memcheck)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
if (!inst.RA)
|
||||
{
|
||||
Default(inst);
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
@@ -22,13 +22,18 @@ void Jit64::ps_mr(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITPairedOff)
|
||||
if (inst.Rc) {
|
||||
Default(inst); return;
|
||||
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
int d = inst.FD;
|
||||
int b = inst.FB;
|
||||
if (d == b)
|
||||
return;
|
||||
|
||||
fpr.BindToRegister(d, false);
|
||||
MOVAPD(fpr.RX(d), fpr.R(b));
|
||||
}
|
||||
@@ -41,9 +46,12 @@ void Jit64::ps_sel(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITPairedOff)
|
||||
|
||||
if (inst.Rc) {
|
||||
Default(inst); return;
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
int d = inst.FD;
|
||||
int a = inst.FA;
|
||||
int b = inst.FB;
|
||||
@@ -67,9 +75,13 @@ void Jit64::ps_sign(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITPairedOff)
|
||||
if (inst.Rc) {
|
||||
Default(inst); return;
|
||||
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
int d = inst.FD;
|
||||
int b = inst.FB;
|
||||
|
||||
@@ -105,9 +117,13 @@ void Jit64::ps_recip(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITPairedOff)
|
||||
if (inst.Rc) {
|
||||
Default(inst); return;
|
||||
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
OpArg divisor;
|
||||
int d = inst.FD;
|
||||
int b = inst.FB;
|
||||
@@ -185,9 +201,13 @@ void Jit64::ps_arith(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITPairedOff)
|
||||
if (inst.Rc) {
|
||||
Default(inst); return;
|
||||
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
switch (inst.SUBOP5)
|
||||
{
|
||||
case 18: tri_op(inst.FD, inst.FA, inst.FB, false, &XEmitter::DIVPD); break; //div
|
||||
@@ -203,10 +223,14 @@ void Jit64::ps_sum(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITPairedOff)
|
||||
|
||||
// TODO: (inst.SUBOP5 == 10) breaks Sonic Colours (black screen)
|
||||
if (inst.Rc || (inst.SUBOP5 == 10)) {
|
||||
Default(inst); return;
|
||||
if (inst.Rc || (inst.SUBOP5 == 10))
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
int d = inst.FD;
|
||||
int a = inst.FA;
|
||||
int b = inst.FB;
|
||||
@@ -245,9 +269,13 @@ void Jit64::ps_muls(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITPairedOff)
|
||||
if (inst.Rc) {
|
||||
Default(inst); return;
|
||||
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
int d = inst.FD;
|
||||
int a = inst.FA;
|
||||
int c = inst.FC;
|
||||
@@ -284,9 +312,13 @@ void Jit64::ps_mergeXX(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITPairedOff)
|
||||
if (inst.Rc) {
|
||||
Default(inst); return;
|
||||
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
int d = inst.FD;
|
||||
int a = inst.FA;
|
||||
int b = inst.FB;
|
||||
@@ -321,9 +353,13 @@ void Jit64::ps_maddXX(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITPairedOff)
|
||||
if (inst.Rc) {
|
||||
Default(inst); return;
|
||||
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
int a = inst.FA;
|
||||
int b = inst.FB;
|
||||
int c = inst.FC;
|
||||
@@ -364,7 +400,7 @@ void Jit64::ps_maddXX(UGeckoInstruction inst)
|
||||
break;
|
||||
default:
|
||||
_assert_msg_(DYNA_REC, 0, "ps_maddXX WTF!!!");
|
||||
//Default(inst);
|
||||
//FallBackToInterpreter(inst);
|
||||
//fpr.UnlockAll();
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -49,7 +49,7 @@ void Jit64::mtspr(UGeckoInstruction inst)
|
||||
break;
|
||||
|
||||
default:
|
||||
Default(inst);
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -79,7 +79,7 @@ void Jit64::mfspr(UGeckoInstruction inst)
|
||||
case SPR_PMC2:
|
||||
case SPR_PMC3:
|
||||
case SPR_PMC4:
|
||||
Default(inst);
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
default:
|
||||
gpr.Lock(d);
|
||||
|
||||
@@ -595,7 +595,7 @@ static void DoWriteCode(IRBuilder* ibuild, JitIL* Jit, u32 exitAddress) {
|
||||
case LoadGQR:
|
||||
case BlockEnd:
|
||||
case BlockStart:
|
||||
case InterpreterFallback:
|
||||
case FallBackToInterpreter:
|
||||
case SystemCall:
|
||||
case RFIExit:
|
||||
case InterpreterBranch:
|
||||
@@ -742,7 +742,7 @@ static void DoWriteCode(IRBuilder* ibuild, JitIL* Jit, u32 exitAddress) {
|
||||
}
|
||||
|
||||
switch (getOpcode(*I)) {
|
||||
case InterpreterFallback: {
|
||||
case FallBackToInterpreter: {
|
||||
unsigned InstCode = ibuild->GetImmValue(getOp1(I));
|
||||
unsigned InstLoc = ibuild->GetImmValue(getOp2(I));
|
||||
// There really shouldn't be anything live across an
|
||||
|
||||
@@ -316,9 +316,9 @@ void JitIL::unknown_instruction(UGeckoInstruction inst)
|
||||
PanicAlert("unknown_instruction %08x - Fix me ;)", inst.hex);
|
||||
}
|
||||
|
||||
void JitIL::Default(UGeckoInstruction _inst)
|
||||
void JitIL::FallBackToInterpreter(UGeckoInstruction _inst)
|
||||
{
|
||||
ibuild.EmitInterpreterFallback(
|
||||
ibuild.EmitFallBackToInterpreter(
|
||||
ibuild.EmitIntConst(_inst.hex),
|
||||
ibuild.EmitIntConst(js.compilerPC));
|
||||
}
|
||||
|
||||
@@ -38,7 +38,7 @@
|
||||
|
||||
#if _M_X86_64
|
||||
#define DISABLE64 \
|
||||
{Default(inst); return;}
|
||||
{FallBackToInterpreter(inst); return;}
|
||||
#else
|
||||
#define DISABLE64
|
||||
#endif
|
||||
@@ -116,7 +116,7 @@ public:
|
||||
|
||||
// OPCODES
|
||||
void unknown_instruction(UGeckoInstruction _inst) override;
|
||||
void Default(UGeckoInstruction _inst) override;
|
||||
void FallBackToInterpreter(UGeckoInstruction _inst) override;
|
||||
void DoNothing(UGeckoInstruction _inst) override;
|
||||
void HLEFunction(UGeckoInstruction _inst) override;
|
||||
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@@ -55,7 +55,7 @@ void JitArm::Shutdown()
|
||||
asm_routines.Shutdown();
|
||||
}
|
||||
|
||||
// This is only called by Default() in this file. It will execute an instruction with the interpreter functions.
|
||||
// This is only called by FallBackToInterpreter() in this file. It will execute an instruction with the interpreter functions.
|
||||
void JitArm::WriteCallInterpreter(UGeckoInstruction inst)
|
||||
{
|
||||
gpr.Flush();
|
||||
@@ -70,7 +70,7 @@ void JitArm::unknown_instruction(UGeckoInstruction inst)
|
||||
PanicAlert("unknown_instruction %08x - Fix me ;)", inst.hex);
|
||||
}
|
||||
|
||||
void JitArm::Default(UGeckoInstruction _inst)
|
||||
void JitArm::FallBackToInterpreter(UGeckoInstruction _inst)
|
||||
{
|
||||
WriteCallInterpreter(_inst.hex);
|
||||
}
|
||||
|
||||
@@ -114,7 +114,7 @@ public:
|
||||
|
||||
// OPCODES
|
||||
void unknown_instruction(UGeckoInstruction _inst);
|
||||
void Default(UGeckoInstruction _inst);
|
||||
void FallBackToInterpreter(UGeckoInstruction _inst);
|
||||
void DoNothing(UGeckoInstruction _inst);
|
||||
void HLEFunction(UGeckoInstruction _inst);
|
||||
|
||||
|
||||
@@ -345,8 +345,9 @@ void JitArm::fabsx(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
|
||||
if (inst.Rc) {
|
||||
Default(inst);
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -361,8 +362,9 @@ void JitArm::fnabsx(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
|
||||
if (inst.Rc) {
|
||||
Default(inst);
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -378,8 +380,9 @@ void JitArm::fnegx(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
|
||||
if (inst.Rc) {
|
||||
Default(inst);
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -394,8 +397,9 @@ void JitArm::faddsx(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
|
||||
if (inst.Rc) {
|
||||
Default(inst);
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -413,8 +417,9 @@ void JitArm::faddx(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
|
||||
if (inst.Rc) {
|
||||
Default(inst);
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -430,8 +435,9 @@ void JitArm::fsubsx(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
|
||||
if (inst.Rc) {
|
||||
Default(inst);
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -449,8 +455,9 @@ void JitArm::fsubx(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
|
||||
if (inst.Rc) {
|
||||
Default(inst);
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -466,8 +473,9 @@ void JitArm::fmulsx(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
|
||||
if (inst.Rc) {
|
||||
Default(inst);
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -484,8 +492,9 @@ void JitArm::fmulx(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
|
||||
if (inst.Rc) {
|
||||
Default(inst);
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -500,8 +509,9 @@ void JitArm::fmrx(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
|
||||
if (inst.Rc) {
|
||||
Default(inst);
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -516,8 +526,9 @@ void JitArm::fmaddsx(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
|
||||
if (inst.Rc) {
|
||||
Default(inst);
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -546,8 +557,9 @@ void JitArm::fmaddx(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITFloatingPointOff)
|
||||
|
||||
if (inst.Rc) {
|
||||
Default(inst);
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -576,8 +588,9 @@ void JitArm::fnmaddx(UGeckoInstruction inst)
|
||||
|
||||
u32 a = inst.FA, b = inst.FB, c = inst.FC, d = inst.FD;
|
||||
|
||||
if (inst.Rc) {
|
||||
Default(inst);
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -603,8 +616,9 @@ void JitArm::fnmaddsx(UGeckoInstruction inst)
|
||||
|
||||
u32 a = inst.FA, b = inst.FB, c = inst.FC, d = inst.FD;
|
||||
|
||||
if (inst.Rc) {
|
||||
Default(inst);
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -634,12 +648,14 @@ void JitArm::fresx(UGeckoInstruction inst)
|
||||
|
||||
u32 b = inst.FB, d = inst.FD;
|
||||
|
||||
if (inst.Rc) {
|
||||
Default(inst);
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
Default(inst); return;
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
|
||||
ARMReg vB0 = fpr.R0(b);
|
||||
ARMReg vD0 = fpr.R0(d, false);
|
||||
@@ -660,9 +676,12 @@ void JitArm::fselx(UGeckoInstruction inst)
|
||||
|
||||
u32 a = inst.FA, b = inst.FB, c = inst.FC, d = inst.FD;
|
||||
|
||||
if (inst.Rc) {
|
||||
Default(inst); return;
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
ARMReg vA0 = fpr.R0(a);
|
||||
ARMReg vB0 = fpr.R0(b);
|
||||
ARMReg vC0 = fpr.R0(c);
|
||||
@@ -685,9 +704,13 @@ void JitArm::frsqrtex(UGeckoInstruction inst)
|
||||
JITDISABLE(bJITPairedOff)
|
||||
|
||||
u32 b = inst.FB, d = inst.FD;
|
||||
if (inst.Rc){
|
||||
Default(inst); return;
|
||||
|
||||
if (inst.Rc)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
ARMReg vB0 = fpr.R0(b);
|
||||
ARMReg vD0 = fpr.R0(d, false);
|
||||
ARMReg fpscrReg = gpr.GetReg();
|
||||
|
||||
@@ -109,7 +109,11 @@ void JitArm::subfic(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITIntegerOff)
|
||||
Default(inst); return; // FIXME
|
||||
|
||||
// FIXME
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
|
||||
int a = inst.RA, d = inst.RD;
|
||||
|
||||
int imm = inst.SIMM_16;
|
||||
@@ -328,8 +332,9 @@ void JitArm::arith(UGeckoInstruction inst)
|
||||
}
|
||||
break;
|
||||
default:
|
||||
WARN_LOG(DYNA_REC, "Unkown OPCD %d with arith function", inst.OPCD);
|
||||
Default(inst); return;
|
||||
WARN_LOG(DYNA_REC, "Unknown OPCD %d with arith function", inst.OPCD);
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
break;
|
||||
}
|
||||
if (isImm[0] && isImm[1]) // Immediate propagation
|
||||
@@ -615,7 +620,11 @@ void JitArm::addex(UGeckoInstruction inst)
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITIntegerOff)
|
||||
u32 a = inst.RA, b = inst.RB, d = inst.RD;
|
||||
Default(inst); return; // FIXME
|
||||
|
||||
// FIXME
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
|
||||
ARMReg RA = gpr.R(a);
|
||||
ARMReg RB = gpr.R(b);
|
||||
ARMReg RD = gpr.R(d);
|
||||
|
||||
@@ -448,8 +448,11 @@ void JitArm::lmw(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITLoadStoreOff)
|
||||
if (!Core::g_CoreStartupParameter.bFastmem){
|
||||
Default(inst); return;
|
||||
|
||||
if (!Core::g_CoreStartupParameter.bFastmem)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
u32 a = inst.RA;
|
||||
@@ -476,8 +479,11 @@ void JitArm::stmw(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
JITDISABLE(bJITLoadStoreOff)
|
||||
if (!Core::g_CoreStartupParameter.bFastmem){
|
||||
Default(inst); return;
|
||||
|
||||
if (!Core::g_CoreStartupParameter.bFastmem)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
u32 a = inst.RA;
|
||||
@@ -500,6 +506,7 @@ void JitArm::stmw(UGeckoInstruction inst)
|
||||
}
|
||||
gpr.Unlock(rA, rB, rC);
|
||||
}
|
||||
|
||||
void JitArm::dcbst(UGeckoInstruction inst)
|
||||
{
|
||||
INSTRUCTION_START
|
||||
@@ -511,12 +518,14 @@ void JitArm::dcbst(UGeckoInstruction inst)
|
||||
// dcbt = 0x7c00022c
|
||||
if ((Memory::ReadUnchecked_U32(js.compilerPC - 4) & 0x7c00022c) != 0x7c00022c)
|
||||
{
|
||||
Default(inst); return;
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
void JitArm::icbi(UGeckoInstruction inst)
|
||||
{
|
||||
Default(inst);
|
||||
FallBackToInterpreter(inst);
|
||||
WriteExit(js.compilerPC + 4);
|
||||
}
|
||||
|
||||
|
||||
@@ -25,7 +25,11 @@ void JitArm::psq_l(UGeckoInstruction inst)
|
||||
// R12 contains scale
|
||||
// R11 contains type
|
||||
// R10 is the ADDR
|
||||
if (js.memcheck || !Core::g_CoreStartupParameter.bFastmem) { Default(inst); return; }
|
||||
if (js.memcheck || !Core::g_CoreStartupParameter.bFastmem)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
LDR(R11, R9, PPCSTATE_OFF(spr[SPR_GQR0 + inst.I]));
|
||||
UBFX(R12, R11, 16, 3); // Type
|
||||
@@ -63,7 +67,11 @@ void JitArm::psq_lx(UGeckoInstruction inst)
|
||||
// R12 contains scale
|
||||
// R11 contains type
|
||||
// R10 is the ADDR
|
||||
if (js.memcheck || !Core::g_CoreStartupParameter.bFastmem) { Default(inst); return; }
|
||||
if (js.memcheck || !Core::g_CoreStartupParameter.bFastmem)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
LDR(R11, R9, PPCSTATE_OFF(spr[SPR_GQR0 + inst.Ix]));
|
||||
UBFX(R12, R11, 16, 3); // Type
|
||||
@@ -113,7 +121,11 @@ void JitArm::psq_st(UGeckoInstruction inst)
|
||||
// R12 contains scale
|
||||
// R11 contains type
|
||||
// R10 is the ADDR
|
||||
if (js.memcheck || !Core::g_CoreStartupParameter.bFastmem) { Default(inst); return; }
|
||||
if (js.memcheck || !Core::g_CoreStartupParameter.bFastmem)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
LDR(R11, R9, PPCSTATE_OFF(spr[SPR_GQR0 + inst.I]));
|
||||
UBFX(R12, R11, 0, 3); // Type
|
||||
@@ -157,7 +169,11 @@ void JitArm::psq_stx(UGeckoInstruction inst)
|
||||
// R12 contains scale
|
||||
// R11 contains type
|
||||
// R10 is the ADDR
|
||||
if (js.memcheck || !Core::g_CoreStartupParameter.bFastmem) { Default(inst); return; }
|
||||
if (js.memcheck || !Core::g_CoreStartupParameter.bFastmem)
|
||||
{
|
||||
FallBackToInterpreter(inst);
|
||||
return;
|
||||
}
|
||||
|
||||
LDR(R11, R9, PPCSTATE_OFF(spr[SPR_GQR0 + inst.I]));
|
||||
UBFX(R12, R11, 0, 3); // Type
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user