diff options
author | José Fonseca <[email protected]> | 2009-10-27 20:29:19 +0000 |
---|---|---|
committer | José Fonseca <[email protected]> | 2009-10-28 11:26:26 +0000 |
commit | 0426227b68be9ad4ab7ed3591e77f31f3e21fbec (patch) | |
tree | a10441ac70ba54214478f3267463e2b9157d05c5 | |
parent | 095e66f695ce1d869a824d9e22f63b54c95ca0ac (diff) |
util: Fix cpuid on MSVC.
-rw-r--r-- | src/gallium/auxiliary/util/u_cpu_detect.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/gallium/auxiliary/util/u_cpu_detect.c b/src/gallium/auxiliary/util/u_cpu_detect.c index c93e0db23c3..623b1fd6945 100644 --- a/src/gallium/auxiliary/util/u_cpu_detect.c +++ b/src/gallium/auxiliary/util/u_cpu_detect.c @@ -67,6 +67,9 @@ #if defined(PIPE_OS_WINDOWS) #include <windows.h> +#if defined(MSVC) +#include <intrin.h> +#endif #endif @@ -337,6 +340,7 @@ static int has_cpuid(void) /** * @sa cpuid.h included in gcc-4.3 onwards. + * @sa http://msdn.microsoft.com/en-us/library/hskdteyh.aspx */ static INLINE int cpuid(uint32_t ax, uint32_t *p) @@ -366,7 +370,7 @@ cpuid(uint32_t ax, uint32_t *p) ); ret = 0; #elif defined(PIPE_CC_MSVC) - __cpuid(ax, p); + __cpuid(p, ax); ret = 0; #endif |