diff options
Diffstat (limited to 'src/common/platform.h')
| -rw-r--r-- | src/common/platform.h | 55 |
1 files changed, 0 insertions, 55 deletions
diff --git a/src/common/platform.h b/src/common/platform.h index df780ac6f..0a912dda3 100644 --- a/src/common/platform.h +++ b/src/common/platform.h | |||
| @@ -24,66 +24,11 @@ | |||
| 24 | 24 | ||
| 25 | #pragma once | 25 | #pragma once |
| 26 | 26 | ||
| 27 | #include "common/common_types.h" | ||
| 28 | |||
| 29 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 30 | // Platform definitions | ||
| 31 | |||
| 32 | /// Enumeration for defining the supported platforms | ||
| 33 | #define PLATFORM_NULL 0 | ||
| 34 | #define PLATFORM_WINDOWS 1 | ||
| 35 | #define PLATFORM_MACOSX 2 | ||
| 36 | #define PLATFORM_LINUX 3 | ||
| 37 | #define PLATFORM_ANDROID 4 | ||
| 38 | |||
| 39 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 27 | //////////////////////////////////////////////////////////////////////////////////////////////////// |
| 40 | // Platform detection | 28 | // Platform detection |
| 41 | 29 | ||
| 42 | #ifndef EMU_PLATFORM | ||
| 43 | |||
| 44 | #if defined( __WIN32__ ) || defined( _WIN32 ) | ||
| 45 | #define EMU_PLATFORM PLATFORM_WINDOWS | ||
| 46 | |||
| 47 | #elif defined( __APPLE__ ) || defined( __APPLE_CC__ ) | ||
| 48 | #define EMU_PLATFORM PLATFORM_MACOSX | ||
| 49 | |||
| 50 | #elif defined(__linux__) | ||
| 51 | #define EMU_PLATFORM PLATFORM_LINUX | ||
| 52 | |||
| 53 | #else // Assume linux otherwise | ||
| 54 | #define EMU_PLATFORM PLATFORM_LINUX | ||
| 55 | |||
| 56 | #endif | ||
| 57 | |||
| 58 | #endif | ||
| 59 | |||
| 60 | #if defined(__x86_64__) || defined(_M_X64) || defined(__aarch64__) | 30 | #if defined(__x86_64__) || defined(_M_X64) || defined(__aarch64__) |
| 61 | #define EMU_ARCH_BITS 64 | 31 | #define EMU_ARCH_BITS 64 |
| 62 | #elif defined(__i386) || defined(_M_IX86) || defined(__arm__) || defined(_M_ARM) | 32 | #elif defined(__i386) || defined(_M_IX86) || defined(__arm__) || defined(_M_ARM) |
| 63 | #define EMU_ARCH_BITS 32 | 33 | #define EMU_ARCH_BITS 32 |
| 64 | #endif | 34 | #endif |
| 65 | |||
| 66 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 67 | // Feature detection | ||
| 68 | |||
| 69 | #if defined _M_GENERIC | ||
| 70 | # define _M_SSE 0x0 | ||
| 71 | #elif defined __GNUC__ | ||
| 72 | # if defined __SSE4_2__ | ||
| 73 | # define _M_SSE 0x402 | ||
| 74 | # elif defined __SSE4_1__ | ||
| 75 | # define _M_SSE 0x401 | ||
| 76 | # elif defined __SSSE3__ | ||
| 77 | # define _M_SSE 0x301 | ||
| 78 | # elif defined __SSE3__ | ||
| 79 | # define _M_SSE 0x300 | ||
| 80 | # endif | ||
| 81 | #elif (_MSC_VER >= 1500) || __INTEL_COMPILER // Visual Studio 2008 | ||
| 82 | # define _M_SSE 0x402 | ||
| 83 | #endif | ||
| 84 | |||
| 85 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 86 | // Compiler-Specific Definitions | ||
| 87 | |||
| 88 | #define GCC_VERSION_AVAILABLE(major, minor) (defined(__GNUC__) && (__GNUC__ > (major) || \ | ||
| 89 | (__GNUC__ == (major) && __GNUC_MINOR__ >= (minor)))) | ||