Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Fix fastmem on ARM
  • Loading branch information
Sonicadvance1 committed Apr 12, 2013
1 parent 6d9c0c8 commit 62adcaf
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions Source/Core/Core/Src/PowerPC/JitArm32/JitArmCache.cpp
Expand Up @@ -33,6 +33,7 @@ using namespace ArmGen;
{
ARMXEmitter emit(location);
emit.B(address);
emit.FlushIcache();
}
void JitArmBlockCache::WriteDestroyBlock(const u8* location, u32 address)
{
Expand All @@ -41,6 +42,7 @@ using namespace ArmGen;
emit.MOVI2R(R12, (u32)jit->GetAsmRoutines()->dispatcher);
emit.STR(R11, R9, PPCSTATE_OFF(pc));
emit.B(R12);
emit.FlushIcache();
}


9 changes: 4 additions & 5 deletions Source/Core/Core/Src/PowerPC/JitArm32/JitArm_BackPatch.cpp
Expand Up @@ -50,33 +50,32 @@ static void BackPatchError(const std::string &text, u8 *codePtr, u32 emAddress)
bool DisamLoadStore(const u32 inst, ARMReg &rD, u8 &accessSize, bool &Store)
{
u8 op = (inst >> 20) & 0xFF;
printf("op: 0x%08x\n", op);
switch (op)
{
case 0x58: // STR
{
rD = (ARMReg)((inst >> 16) & 0xF);
rD = (ARMReg)((inst >> 12) & 0xF);
Store = true;
accessSize = 32;
}
break;
case 0x59: // LDR
{
rD = (ARMReg)((inst >> 16) & 0xF);
rD = (ARMReg)((inst >> 12) & 0xF);
Store = false;
accessSize = 32;
}
break;
case 0x05: // LDRH
{
rD = (ARMReg)((inst >> 16) & 0xF);
rD = (ARMReg)((inst >> 12) & 0xF);
Store = false;
accessSize = 16;
}
break;
case 0x45 + 0x18: // LDRB
{
rD = (ARMReg)((inst >> 16) & 0xF);
rD = (ARMReg)((inst >> 12) & 0xF);
Store = false;
accessSize = 8;
}
Expand Down
2 changes: 1 addition & 1 deletion Source/Core/Core/Src/PowerPC/JitArm32/JitArm_LoadStore.cpp
Expand Up @@ -34,7 +34,7 @@
#ifdef ANDROID
#define FASTMEM 0
#else
#define FASTMEM 0
#define FASTMEM 1
#endif
void JitArm::stw(UGeckoInstruction inst)
{
Expand Down

0 comments on commit 62adcaf

Please sign in to comment.