summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
authorpierre <pierre@pirsoft.de>2011-01-14 18:00:25 +0000
committerpierre <pierre@pirsoft.de>2011-01-14 18:00:25 +0000
commitfb1ebd80225fefc591583b8c70ac45f01bab3142 (patch)
tree5721c61798e63dc956bb9879ac9379e6c8e2cd91 /Source/Core/Common
parentc99f0d03a43d383b0afc8b3a603c10f0c9f2d47c (diff)
Core/DSPCore: Consolidation of register accesses(except for the four hw
stacks), addition of a register cache(currently accumulators on 64bit only). It feels a bit slower, but the numbers are about the same. Caching accumulators doesn't change speed either. git-svn-id: https://dolphin-emu.googlecode.com/svn/trunk@6848 8ced0084-cf51-0410-be5f-012b33b47a6e
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/Src/x64Emitter.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/Source/Core/Common/Src/x64Emitter.h b/Source/Core/Common/Src/x64Emitter.h
index 182cde1cf3..4501ad17aa 100644
--- a/Source/Core/Common/Src/x64Emitter.h
+++ b/Source/Core/Common/Src/x64Emitter.h
@@ -195,16 +195,16 @@ inline u32 PtrOffset(void* ptr, void* base) {
_assert_msg_(DYNA_REC, 0, "pointer offset out of range");
return 0;
}
- return distance;
+ return (u32)distance;
#else
return (u32)ptr-(u32)base;
#endif
}
//usage: int a[]; ARRAY_OFFSET(a,10)
-#define ARRAY_OFFSET(array,index) ((u64)&(array)[index]-(u64)&(array)[0])
+#define ARRAY_OFFSET(array,index) ((u32)((u64)&(array)[index]-(u64)&(array)[0]))
//usage: struct {int e;} s; STRUCT_OFFSET(s,e)
-#define STRUCT_OFFSET(str,elem) ((u64)&(str).elem-(u64)&(str))
+#define STRUCT_OFFSET(str,elem) ((u32)((u64)&(str).elem-(u64)&(str)))
struct FixupBranch
{