summaryrefslogtreecommitdiff
path: root/Source/Core/Common
diff options
context:
space:
mode:
Diffstat (limited to 'Source/Core/Common')
-rw-r--r--Source/Core/Common/Src/Common.h17
-rw-r--r--Source/Core/Common/Src/CommonFuncs.h1
-rw-r--r--Source/Core/Common/Src/x64CPUDetect.cpp1
3 files changed, 16 insertions, 3 deletions
diff --git a/Source/Core/Common/Src/Common.h b/Source/Core/Common/Src/Common.h
index 7db22c2c87..6556f1fd17 100644
--- a/Source/Core/Common/Src/Common.h
+++ b/Source/Core/Common/Src/Common.h
@@ -49,7 +49,6 @@ private:
#include "Log.h"
#include "CommonTypes.h"
#include "MsgHandler.h"
-#include "CommonFuncs.h"
#ifdef __APPLE__
// The Darwin ABI requires that stack frames be aligned to 16-byte boundaries.
@@ -100,14 +99,24 @@ private:
#endif
// Windows compatibility
+#define _M_64BIT defined(_LP64) || defined(_WIN64)
#ifndef _WIN32
#include <limits.h>
#define MAX_PATH PATH_MAX
-#ifdef _LP64
+#ifdef __x86_64__
#define _M_X64 1
-#else
+#endif
+#ifdef __i386__
#define _M_IX86 1
#endif
+#ifdef __arm__
+#define _M_ARM 1
+#define _M_GENERIC 1
+#endif
+#ifdef __mips__
+#define _M_MIPS 1
+#define _M_GENERIC 1
+#endif
#define __forceinline inline __attribute__((always_inline))
#define GC_ALIGNED16(x) __attribute__((aligned(16))) x
#define GC_ALIGNED32(x) __attribute__((aligned(32))) x
@@ -164,4 +173,6 @@ enum EMUSTATE_CHANGE
EMUSTATE_CHANGE_STOP
};
+#include "CommonFuncs.h"
+
#endif // _COMMON_H_
diff --git a/Source/Core/Common/Src/CommonFuncs.h b/Source/Core/Common/Src/CommonFuncs.h
index 7f62684efb..daf135373e 100644
--- a/Source/Core/Common/Src/CommonFuncs.h
+++ b/Source/Core/Common/Src/CommonFuncs.h
@@ -14,6 +14,7 @@
#include <cstddef>
#include <type_traits>
+#include "Common.h"
// Will fail to compile on a non-array:
// TODO: make this a function when constexpr is available
diff --git a/Source/Core/Common/Src/x64CPUDetect.cpp b/Source/Core/Common/Src/x64CPUDetect.cpp
index e4eac54ef1..3db6227ca7 100644
--- a/Source/Core/Common/Src/x64CPUDetect.cpp
+++ b/Source/Core/Common/Src/x64CPUDetect.cpp
@@ -3,6 +3,7 @@
// Refer to the license.txt file included.
#include <memory.h>
+#include "Common.h"
#ifdef _WIN32
#define _interlockedbittestandset workaround_ms_header_bug_platform_sdk6_set