From 67c4614f29188e4af86e1d88ee82759c896b70b5 Mon Sep 17 00:00:00 2001 From: marha Date: Tue, 4 Sep 2012 15:26:24 +0200 Subject: mesa git update 4 sep 2012 --- mesalib/src/gallium/auxiliary/util/u_cpu_detect.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'mesalib/src/gallium/auxiliary/util/u_cpu_detect.c') diff --git a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c index e0c8f73c7..d7f0be40e 100644 --- a/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c +++ b/mesalib/src/gallium/auxiliary/util/u_cpu_detect.c @@ -182,7 +182,7 @@ static int has_cpuid(void) static INLINE void cpuid(uint32_t ax, uint32_t *p) { -#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86) +#if (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO)) && defined(PIPE_ARCH_X86) __asm __volatile ( "xchgl %%ebx, %1\n\t" "cpuid\n\t" @@ -193,7 +193,7 @@ cpuid(uint32_t ax, uint32_t *p) "=d" (p[3]) : "0" (ax) ); -#elif defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86_64) +#elif (defined(PIPE_CC_GCC) || defined(PIPE_CC_SUNPRO)) && defined(PIPE_ARCH_X86_64) __asm __volatile ( "cpuid\n\t" : "=a" (p[0]), @@ -286,6 +286,11 @@ util_cpu_detect(void) util_cpu_caps.cacheline = cacheline; } + if (regs[1] == 0x756e6547 && regs[2] == 0x6c65746e && regs[3] == 0x49656e69) { + /* GenuineIntel */ + util_cpu_caps.has_intel = 1; + } + cpuid(0x80000000, regs); if (regs[0] >= 0x80000001) { -- cgit v1.2.3