diff options
author | bunnei <bunneidev@gmail.com> | 2017-03-16 02:01:24 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-16 02:01:24 +0100 |
commit | bc510f942cb561a7ae213132dbd1f7ebffe78d5b (patch) | |
tree | 193aa9b360b2c48cff97d3c2fbaa298fa6be0ccd | |
parent | Merge pull request #2614 from Schplee/patch-1 (diff) | |
parent | externals: Update to boost v1.63.0 (diff) | |
download | yuzu-bc510f942cb561a7ae213132dbd1f7ebffe78d5b.tar yuzu-bc510f942cb561a7ae213132dbd1f7ebffe78d5b.tar.gz yuzu-bc510f942cb561a7ae213132dbd1f7ebffe78d5b.tar.bz2 yuzu-bc510f942cb561a7ae213132dbd1f7ebffe78d5b.tar.lz yuzu-bc510f942cb561a7ae213132dbd1f7ebffe78d5b.tar.xz yuzu-bc510f942cb561a7ae213132dbd1f7ebffe78d5b.tar.zst yuzu-bc510f942cb561a7ae213132dbd1f7ebffe78d5b.zip |
m--------- | externals/boost | 0 | ||||
-rw-r--r-- | src/common/x64/cpu_detect.cpp | 12 |
2 files changed, 7 insertions, 5 deletions
diff --git a/externals/boost b/externals/boost -Subproject f005c955f8147a29667aa0b65257abc3dd520b0 +Subproject 351972396392c97a659b9a02f34ce9269293d21 diff --git a/src/common/x64/cpu_detect.cpp b/src/common/x64/cpu_detect.cpp index 370ae2c80..2cb3ab9cc 100644 --- a/src/common/x64/cpu_detect.cpp +++ b/src/common/x64/cpu_detect.cpp @@ -8,9 +8,9 @@ #include "common/common_types.h" #include "cpu_detect.h" -namespace Common { - -#ifndef _MSC_VER +#ifdef _MSC_VER +#include <intrin.h> +#else #if defined(__DragonFly__) || defined(__FreeBSD__) // clang-format off @@ -37,13 +37,15 @@ static inline void __cpuid(int info[4], int function_id) { } #define _XCR_XFEATURE_ENABLED_MASK 0 -static u64 _xgetbv(u32 index) { +static inline u64 _xgetbv(u32 index) { u32 eax, edx; __asm__ __volatile__("xgetbv" : "=a"(eax), "=d"(edx) : "c"(index)); return ((u64)edx << 32) | eax; } -#endif // ifndef _MSC_VER +#endif // _MSC_VER + +namespace Common { // Detects the various CPU features static CPUCaps Detect() { |