summaryrefslogtreecommitdiff
path: root/src/common/common_funcs.h
diff options
context:
space:
mode:
authorGravatar Yuri Kunde Schlesner2015-05-07 18:17:33 -0300
committerGravatar Yuri Kunde Schlesner2015-05-07 18:22:36 -0300
commitfae5933ad614ca8c2559f499ebe16b518594cca3 (patch)
tree352d4e078789f31408c8f8658ba84cc03c08cbcf /src/common/common_funcs.h
parentMerge pull request #721 from yuriks/more-cleanups (diff)
downloadyuzu-fae5933ad614ca8c2559f499ebe16b518594cca3.tar.gz
yuzu-fae5933ad614ca8c2559f499ebe16b518594cca3.tar.xz
yuzu-fae5933ad614ca8c2559f499ebe16b518594cca3.zip
Common: Add proper macros to test for architecture pointer size
The old system of just defining macros available in some other platform was susceptible to silently using the wrong code if you forgot to include a particular header. This fixes a crash on non-Windows platforms introduced by e1fbac3ca13d37d2625c11d30cfdece4327b446b.
Diffstat (limited to 'src/common/common_funcs.h')
-rw-r--r--src/common/common_funcs.h7
1 files changed, 0 insertions, 7 deletions
diff --git a/src/common/common_funcs.h b/src/common/common_funcs.h
index 4f9e514c9..91b74c6bc 100644
--- a/src/common/common_funcs.h
+++ b/src/common/common_funcs.h
@@ -34,13 +34,6 @@
34 #define MEMORY_ALIGNED64(x) __declspec(align(64)) x 34 #define MEMORY_ALIGNED64(x) __declspec(align(64)) x
35 #define MEMORY_ALIGNED128(x) __declspec(align(128)) x 35 #define MEMORY_ALIGNED128(x) __declspec(align(128)) x
36#else 36#else
37 // Windows compatibility
38 #ifdef _LP64
39 #define _M_X64 1
40 #else
41 #define _M_IX86 1
42 #endif
43
44 #define __forceinline inline __attribute__((always_inline)) 37 #define __forceinline inline __attribute__((always_inline))
45 #define MEMORY_ALIGNED16(x) __attribute__((aligned(16))) x 38 #define MEMORY_ALIGNED16(x) __attribute__((aligned(16))) x
46 #define MEMORY_ALIGNED32(x) __attribute__((aligned(32))) x 39 #define MEMORY_ALIGNED32(x) __attribute__((aligned(32))) x