Move CoreTiming::downcount to PowerPC::ppcState.

This isn't technically the correct place to have the downcount variable, but it is similar to what PPSSPP does to gain a bit of extra speed on ARM.
We access this variable quite a bit, with each exit in a block it is subtracted from.
On ARM this required four instructions to load and store the value, while now it only requires two.

This gives an average of 1FPS gain to most games.
Examples:
Crazy Taxi: 54FPS -> 55FPS
Luigi's Mansion: 20FPS -> 21FPS
Wind Waker(Save Screen): 27FPS -> 28FPS

This seems to average a 6mhz to 16mhz CPU core emulation improvement in the few games I've tested.
This commit is contained in:
Ryan Houdek committed 2014-06-26 01:48:00 +00:00
1 parent 177658aed6
commit a40ae6883a
13 files changed
+48 -53

No files matched your search

+5
View File
@@ -46,6 +46,11 @@ struct GC_ALIGNED64(PowerPCState)
// Exception management.
volatile u32 Exceptions;
// Downcount for determining when we need to do timing
// This isn't quite the right location for it, but it is here to accelerate the ARM JIT
// This variable should be inside of the CoreTiming namespace if we wanted to be correct.
int downcount;
u32 sr[16]; // Segment registers.
u32 DebugCount;