diff options
Diffstat (limited to 'src/common/platform.h')
| -rw-r--r-- | src/common/platform.h | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/src/common/platform.h b/src/common/platform.h index fc680d549..1516dc88a 100644 --- a/src/common/platform.h +++ b/src/common/platform.h | |||
| @@ -64,6 +64,25 @@ | |||
| 64 | #endif | 64 | #endif |
| 65 | 65 | ||
| 66 | //////////////////////////////////////////////////////////////////////////////////////////////////// | 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 | //////////////////////////////////////////////////////////////////////////////////////////////////// | ||
| 67 | // Compiler-Specific Definitions | 86 | // Compiler-Specific Definitions |
| 68 | 87 | ||
| 69 | #define GCC_VERSION_AVAILABLE(major, minor) (defined(__GNUC__) && (__GNUC__ > (major) || \ | 88 | #define GCC_VERSION_AVAILABLE(major, minor) (defined(__GNUC__) && (__GNUC__ > (major) || \ |