forked from dolphin-emu/dolphin
Added Copy EFB hotkey to OpenGL plugin (to be able to easily switch back and forth during emulation). Added Unlimited JIT cache option to debugger. It may fix the Zelda TP crashes.
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@1243 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
@@ -37,14 +37,16 @@ struct SCoreStartupParameter
|
||||
// flags
|
||||
bool bEnableDebugging;
|
||||
bool bUseJIT;
|
||||
bool bJITOff;
|
||||
bool bJITLoadStoreOff;
|
||||
|
||||
bool bJITUnlimitedCache, bJITOff; // JIT
|
||||
bool bJITLoadStoreOff, bJITLoadStorelXzOff, bJITLoadStorelwzOff, bJITLoadStorelbzxOff;
|
||||
bool bJITLoadStoreFloatingOff;
|
||||
bool bJITLoadStorePairedOff;
|
||||
bool bJITFloatingPointOff;
|
||||
bool bJITIntegerOff;
|
||||
bool bJITPairedOff;
|
||||
bool bJITSystemRegistersOff;
|
||||
|
||||
bool bUseDualCore;
|
||||
bool bSkipIdle;
|
||||
bool bNTSC;
|
||||
|
||||
@@ -50,11 +50,13 @@ namespace Jit64
|
||||
|
||||
enum
|
||||
{
|
||||
CODE_SIZE = 1024*1024*8,
|
||||
//CODE_SIZE = 1024*1024*8,
|
||||
GEN_SIZE = 4096,
|
||||
TRAMPOLINE_SIZE = 1024*1024,
|
||||
MAX_NUM_BLOCKS = 65536,
|
||||
//MAX_NUM_BLOCKS = 65536,
|
||||
};
|
||||
int CODE_SIZE = 1024*1024*8; // nonconstant to be able to have an option for it
|
||||
int MAX_NUM_BLOCKS = 65536;
|
||||
|
||||
static u8 **blockCodePointers; // cut these in half and force below 2GB?
|
||||
|
||||
@@ -75,6 +77,12 @@ namespace Jit64
|
||||
|
||||
void InitCache()
|
||||
{
|
||||
if(Core::g_CoreStartupParameter.bJITUnlimitedCache)
|
||||
{
|
||||
CODE_SIZE *= 8;
|
||||
MAX_NUM_BLOCKS *= 8;
|
||||
}
|
||||
|
||||
codeCache = (u8*)AllocateExecutableMemory(CODE_SIZE);
|
||||
genFunctions = (u8*)AllocateExecutableMemory(GEN_SIZE);
|
||||
trampolineCache = (u8*)AllocateExecutableMemory(TRAMPOLINE_SIZE);
|
||||
@@ -103,6 +111,8 @@ namespace Jit64
|
||||
numBlocks = 0;
|
||||
}
|
||||
|
||||
/* This clears the JIT cache. It's called from JitCache.cpp when the JIT cache
|
||||
is full and when saving and loading states */
|
||||
void ClearCache()
|
||||
{
|
||||
Core::DisplayMessage("Cleared code cache.", 3000);
|
||||
@@ -165,6 +175,10 @@ namespace Jit64
|
||||
if (GetCodePtr() >= codeCache + CODE_SIZE - 0x10000 || numBlocks >= MAX_NUM_BLOCKS - 1)
|
||||
{
|
||||
LOG(DYNA_REC, "JIT cache full - clearing.")
|
||||
if(Core::g_CoreStartupParameter.bJITUnlimitedCache)
|
||||
{
|
||||
PanicAlert("What? JIT cache still full - clearing.");
|
||||
}
|
||||
ClearCache();
|
||||
}
|
||||
|
||||
|
||||
@@ -55,7 +55,8 @@ namespace Jit64
|
||||
void lbzx(UGeckoInstruction inst)
|
||||
{
|
||||
#ifdef JIT_OFF_OPTIONS
|
||||
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
|
||||
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff
|
||||
|| Core::g_CoreStartupParameter.bJITLoadStorelbzxOff)
|
||||
{Default(inst); return;} // turn off from debugger
|
||||
#endif
|
||||
INSTRUCTION_START;
|
||||
@@ -80,11 +81,12 @@ namespace Jit64
|
||||
void lXz(UGeckoInstruction inst)
|
||||
{
|
||||
#ifdef JIT_OFF_OPTIONS
|
||||
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff)
|
||||
if(Core::g_CoreStartupParameter.bJITOff || Core::g_CoreStartupParameter.bJITLoadStoreOff
|
||||
|| Core::g_CoreStartupParameter.bJITLoadStorelXzOff)
|
||||
{Default(inst); return;} // turn off from debugger
|
||||
#endif
|
||||
INSTRUCTION_START;
|
||||
|
||||
|
||||
int d = inst.RD;
|
||||
int a = inst.RA;
|
||||
|
||||
@@ -125,10 +127,16 @@ namespace Jit64
|
||||
int accessSize;
|
||||
switch (inst.OPCD)
|
||||
{
|
||||
case 32: accessSize = 32; break; //lwz
|
||||
case 32:
|
||||
accessSize = 32;
|
||||
if(Core::g_CoreStartupParameter.bJITLoadStorelwzOff) {Default(inst); return;}
|
||||
break; //lwz
|
||||
case 40: accessSize = 16; break; //lhz
|
||||
case 34: accessSize = 8; break; //lbz
|
||||
default: _assert_msg_(DYNA_REC, 0, "lXz: invalid access size"); return;
|
||||
default:
|
||||
//_assert_msg_(DYNA_REC, 0, "lXz: invalid access size");
|
||||
PanicAlert("lXz: invalid access size");
|
||||
return;
|
||||
}
|
||||
|
||||
//Still here? Do regular path.
|
||||
|
||||
Reference in New Issue
Block a user