Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
On ARM Hosts, increase the instruction run count to 64bit. 32bit is /…
…very/ quickly overflown.
  • Loading branch information
Sonicadvance1 committed Jul 17, 2013
1 parent f4b414a commit bab3032
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 3 deletions.
13 changes: 10 additions & 3 deletions Source/Core/Core/Src/PowerPC/JitArm32/Jit.cpp
Expand Up @@ -457,13 +457,20 @@ const u8* JitArm::DoJit(u32 em_address, PPCAnalyst::CodeBuffer *code_buf, JitBlo
if (Core::g_CoreStartupParameter.bEnableDebugging)
{
// Add run count
static const u64 One = 1;
ARMReg RA = gpr.GetReg();
ARMReg RB = gpr.GetReg();
ARMReg VA = fpr.GetReg();
ARMReg VB = fpr.GetReg();
MOVI2R(RA, (u32)&opinfo->runCount);
LDR(RB, RA);
ADD(RB, RB, 1);
STR(RB, RA);
MOVI2R(RB, (u32)&One);
VLDR(VA, RA, 0);
VLDR(VB, RB, 0);
VADD(I_I64, VA, VA, VB);
VSTR(VA, RA, 0);
gpr.Unlock(RA, RB);
fpr.Unlock(VA);
fpr.Unlock(VB);
}
if (!ops[i].skip)
{
Expand Down
4 changes: 4 additions & 0 deletions Source/Core/Core/Src/PowerPC/PPCTables.h
Expand Up @@ -77,7 +77,11 @@ struct GekkoOPInfo
int type;
int flags;
int numCyclesMinusOne;
#ifdef _M_ARM
u64 runCount;
#else
int runCount;
#endif
int compileCount;
u32 lastUse;
};
Expand Down

0 comments on commit bab3032

Please sign in to comment.