mirror of
https://github.com/dolphin-emu/dolphin.git
synced 2025-01-26 21:35:28 +00:00
ExRAM iCache support in JIT IL
git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@4359 8ced0084-cf51-0410-be5f-012b33b47a6e
This commit is contained in:
parent
26a60eb9bf
commit
d52f0fc915
@ -89,23 +89,8 @@ void AsmRoutineManager::Generate()
|
|||||||
MOV(32, R(EAX), M(&PowerPC::ppcState.pc));
|
MOV(32, R(EAX), M(&PowerPC::ppcState.pc));
|
||||||
dispatcherPcInEAX = GetCodePtr();
|
dispatcherPcInEAX = GetCodePtr();
|
||||||
|
|
||||||
#ifdef JIT_UNLIMITED_ICACHE
|
FixupBranch needinst = J(true);
|
||||||
AND(32, R(EAX), Imm32(JIT_ICACHE_MASK));
|
const u8* haveinst = GetCodePtr();
|
||||||
#ifdef _M_IX86
|
|
||||||
MOV(32, R(EAX), MDisp(EAX, (u32)jit.GetBlockCache()->GetICache()));
|
|
||||||
#else
|
|
||||||
MOV(64, R(RSI), Imm64((u64)jit.GetBlockCache()->GetICache()));
|
|
||||||
MOV(32, R(EAX), MComplex(RSI, EAX, SCALE_1, 0));
|
|
||||||
#endif
|
|
||||||
#else
|
|
||||||
#ifdef _M_IX86
|
|
||||||
AND(32, R(EAX), Imm32(Memory::MEMVIEW32_MASK));
|
|
||||||
MOV(32, R(EBX), Imm32((u32)Memory::base));
|
|
||||||
MOV(32, R(EAX), MComplex(EBX, EAX, SCALE_1, 0));
|
|
||||||
#else
|
|
||||||
MOV(32, R(EAX), MComplex(RBX, RAX, SCALE_1, 0));
|
|
||||||
#endif
|
|
||||||
#endif
|
|
||||||
|
|
||||||
TEST(32, R(EAX), Imm32(0xFC));
|
TEST(32, R(EAX), Imm32(0xFC));
|
||||||
FixupBranch notfound = J_CC(CC_NZ);
|
FixupBranch notfound = J_CC(CC_NZ);
|
||||||
@ -176,6 +161,43 @@ void AsmRoutineManager::Generate()
|
|||||||
ABI_PopAllCalleeSavedRegsAndAdjustStack();
|
ABI_PopAllCalleeSavedRegsAndAdjustStack();
|
||||||
RET();
|
RET();
|
||||||
|
|
||||||
|
SetJumpTarget(needinst);
|
||||||
|
#ifdef JIT_UNLIMITED_ICACHE
|
||||||
|
|
||||||
|
TEST(32, R(EAX), Imm32(JIT_ICACHE_EXRAM_BIT));
|
||||||
|
FixupBranch exram = J_CC(CC_NZ);
|
||||||
|
|
||||||
|
AND(32, R(EAX), Imm32(JIT_ICACHE_MASK));
|
||||||
|
#ifdef _M_IX86
|
||||||
|
MOV(32, R(EAX), MDisp(EAX, (u32)jit.GetBlockCache()->GetICache()));
|
||||||
|
#else
|
||||||
|
MOV(64, R(RSI), Imm64((u64)jit.GetBlockCache()->GetICache()));
|
||||||
|
MOV(32, R(EAX), MComplex(RSI, EAX, SCALE_1, 0));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
FixupBranch getinst = J();
|
||||||
|
SetJumpTarget(exram);
|
||||||
|
|
||||||
|
AND(32, R(EAX), Imm32(JIT_ICACHEEX_MASK));
|
||||||
|
#ifdef _M_IX86
|
||||||
|
MOV(32, R(EAX), MDisp(EAX, (u32)jit.GetBlockCache()->GetICacheEx()));
|
||||||
|
#else
|
||||||
|
MOV(64, R(RSI), Imm64((u64)jit.GetBlockCache()->GetICacheEx()));
|
||||||
|
MOV(32, R(EAX), MComplex(RSI, EAX, SCALE_1, 0));
|
||||||
|
#endif
|
||||||
|
|
||||||
|
SetJumpTarget(getinst);
|
||||||
|
#else
|
||||||
|
#ifdef _M_IX86
|
||||||
|
AND(32, R(EAX), Imm32(Memory::MEMVIEW32_MASK));
|
||||||
|
MOV(32, R(EBX), Imm32((u32)Memory::base));
|
||||||
|
MOV(32, R(EAX), MComplex(EBX, EAX, SCALE_1, 0));
|
||||||
|
#else
|
||||||
|
MOV(32, R(EAX), MComplex(RBX, RAX, SCALE_1, 0));
|
||||||
|
#endif
|
||||||
|
#endif
|
||||||
|
JMP(haveinst, true);
|
||||||
|
|
||||||
GenerateCommon();
|
GenerateCommon();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user