Add support for disabling branch JIT. Potentially useful for
debugging and experimenting with the JIT. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1654 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
799bb5fc53
commit
76108a98d5
|
@ -46,6 +46,7 @@ struct SCoreStartupParameter
|
|||
bool bJITIntegerOff;
|
||||
bool bJITPairedOff;
|
||||
bool bJITSystemRegistersOff;
|
||||
bool bJITBranchOff;
|
||||
|
||||
bool bUseDualCore;
|
||||
bool bSkipIdle;
|
||||
|
|
|
@ -221,6 +221,11 @@ namespace CPUCompare
|
|||
}
|
||||
Interpreter::_interpreterInstruction instr = GetInterpreterOp(inst);
|
||||
ABI_CallFunctionC((void*)instr, inst.hex);
|
||||
if (js.isLastInstruction)
|
||||
{
|
||||
MOV(32, R(EAX), M(&NPC));
|
||||
WriteRfiExitDestInEAX();
|
||||
}
|
||||
}
|
||||
|
||||
void Jit64::unknown_instruction(UGeckoInstruction inst)
|
||||
|
@ -377,6 +382,8 @@ namespace CPUCompare
|
|||
|
||||
const u8* Jit64::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buffer, JitBlock *b)
|
||||
{
|
||||
Core::g_CoreStartupParameter.bJITOff = true;
|
||||
|
||||
if (em_address == 0)
|
||||
PanicAlert("ERROR : Trying to compile at 0. LR=%08x", LR);
|
||||
|
||||
|
|
|
@ -17,6 +17,7 @@
|
|||
#include "Common.h"
|
||||
#include "Thunk.h"
|
||||
|
||||
#include "../../Core.h"
|
||||
#include "../PowerPC.h"
|
||||
#include "../../CoreTiming.h"
|
||||
#include "../PPCTables.h"
|
||||
|
@ -40,15 +41,21 @@
|
|||
|
||||
using namespace Gen;
|
||||
|
||||
void Jit64::sc(UGeckoInstruction _inst)
|
||||
void Jit64::sc(UGeckoInstruction inst)
|
||||
{
|
||||
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITBranchOff)
|
||||
{Default(inst); return;} // turn off from debugger
|
||||
|
||||
gpr.Flush(FLUSH_ALL);
|
||||
fpr.Flush(FLUSH_ALL);
|
||||
WriteExceptionExit(EXCEPTION_SYSCALL);
|
||||
}
|
||||
|
||||
void Jit64::rfi(UGeckoInstruction _inst)
|
||||
void Jit64::rfi(UGeckoInstruction inst)
|
||||
{
|
||||
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITBranchOff)
|
||||
{Default(inst); return;} // turn off from debugger
|
||||
|
||||
gpr.Flush(FLUSH_ALL);
|
||||
fpr.Flush(FLUSH_ALL);
|
||||
//Bits SRR1[0, 5-9, 16-23, 25-27, 30-31] are placed into the corresponding bits of the MSR.
|
||||
|
@ -70,6 +77,9 @@ using namespace Gen;
|
|||
|
||||
void Jit64::bx(UGeckoInstruction inst)
|
||||
{
|
||||
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITBranchOff)
|
||||
{Default(inst); return;} // turn off from debugger
|
||||
|
||||
if (inst.LK)
|
||||
MOV(32, M(&LR), Imm32(js.compilerPC + 4));
|
||||
gpr.Flush(FLUSH_ALL);
|
||||
|
@ -107,6 +117,9 @@ using namespace Gen;
|
|||
// variants of this instruction.
|
||||
void Jit64::bcx(UGeckoInstruction inst)
|
||||
{
|
||||
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITBranchOff)
|
||||
{Default(inst); return;} // turn off from debugger
|
||||
|
||||
// USES_CR
|
||||
_assert_msg_(DYNA_REC, js.isLastInstruction, "bcx not last instruction of block");
|
||||
|
||||
|
@ -198,6 +211,9 @@ using namespace Gen;
|
|||
|
||||
void Jit64::bcctrx(UGeckoInstruction inst)
|
||||
{
|
||||
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITBranchOff)
|
||||
{Default(inst); return;} // turn off from debugger
|
||||
|
||||
gpr.Flush(FLUSH_ALL);
|
||||
fpr.Flush(FLUSH_ALL);
|
||||
|
||||
|
@ -237,6 +253,9 @@ using namespace Gen;
|
|||
|
||||
void Jit64::bclrx(UGeckoInstruction inst)
|
||||
{
|
||||
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITBranchOff)
|
||||
{Default(inst); return;} // turn off from debugger
|
||||
|
||||
gpr.Flush(FLUSH_ALL);
|
||||
fpr.Flush(FLUSH_ALL);
|
||||
//Special case BLR
|
||||
|
@ -255,6 +274,4 @@ using namespace Gen;
|
|||
}
|
||||
// Call interpreter
|
||||
Default(inst);
|
||||
MOV(32, R(EAX), M(&NPC));
|
||||
WriteExitDestInEAX(0);
|
||||
}
|
||||
|
|
|
@ -118,8 +118,8 @@
|
|||
// --------------
|
||||
void Jit64::mtmsr(UGeckoInstruction inst)
|
||||
{
|
||||
//if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
|
||||
// {Default(inst); return;} // turn off from debugger
|
||||
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITSystemRegistersOff)
|
||||
{Default(inst); return;} // turn off from debugger
|
||||
INSTRUCTION_START;
|
||||
gpr.LoadToX64(inst.RS, true, false);
|
||||
MOV(32, M(&MSR), gpr.R(inst.RS));
|
||||
|
|
Loading…
Reference in New Issue