summaryrefslogtreecommitdiff
path: root/Source
diff options
context:
space:
mode:
authorskidau <skidau@gmail.com>2012-07-23 22:15:34 +1000
committerskidau <skidau@gmail.com>2012-07-23 22:15:34 +1000
commit00df727d2fb367eef2fd5d62fd2e2195d39e09ec (patch)
treea8148ed699eb14f220a188f3dd7391c32b870526 /Source
parent174c1b00f80ba8da57fecb2922403162cd9b2a1e (diff)
Optimised the JitCache struct size from 88 bytes to 80 bytes. Thanks to Lioncash for the patch.
Diffstat (limited to 'Source')
-rw-r--r--Source/Core/Core/Src/PowerPC/JitCommon/JitCache.h18
1 files changed, 9 insertions, 9 deletions
diff --git a/Source/Core/Core/Src/PowerPC/JitCommon/JitCache.h b/Source/Core/Core/Src/PowerPC/JitCommon/JitCache.h
index 16f16d6d14..a62e2713b4 100644
--- a/Source/Core/Core/Src/PowerPC/JitCommon/JitCache.h
+++ b/Source/Core/Core/Src/PowerPC/JitCommon/JitCache.h
@@ -39,12 +39,13 @@
#define JIT_ICACHE_INVALID_BYTE 0x14
#define JIT_ICACHE_INVALID_WORD 0x14141414
-// TODO(ector) - optimize this struct for size
struct JitBlock
{
+ const u8 *checkedEntry;
+ const u8 *normalEntry;
+
+ u8 *exitPtrs[2]; // to be able to rewrite the exit jum
u32 exitAddress[2]; // 0xFFFFFFFF == unknown
- u8 *exitPtrs[2]; // to be able to rewrite the exit jump
- bool linkStatus[2];
u32 originalAddress;
u32 originalFirstOpcode; //to be able to restore
@@ -52,6 +53,11 @@ struct JitBlock
u32 originalSize;
int runCount; // for profiling.
int blockNum;
+ int flags;
+
+ bool invalid;
+ bool linkStatus[2];
+ bool ContainsAddress(u32 em_address);
#ifdef _WIN32
// we don't really need to save start and stop
@@ -60,12 +66,6 @@ struct JitBlock
u64 ticStop; // for profiling - time.
u64 ticCounter; // for profiling - time.
#endif
- const u8 *checkedEntry;
- const u8 *normalEntry;
- bool invalid;
- int flags;
-
- bool ContainsAddress(u32 em_address);
};
typedef void (*CompiledCode)();