summaryrefslogtreecommitdiffstats
path: root/src/gallium/auxiliary
diff options
context:
space:
mode:
authorJosé Fonseca <[email protected]>2009-10-27 20:45:53 +0000
committerJosé Fonseca <[email protected]>2009-10-28 11:26:26 +0000
commit5eba607db6c50181bb12be5aee3735aafb40372e (patch)
treeb656e908912fd793c59e3550808be4d9219e7e1a /src/gallium/auxiliary
parent0426227b68be9ad4ab7ed3591e77f31f3e21fbec (diff)
util: Drop return value from cpuid().
Diffstat (limited to 'src/gallium/auxiliary')
-rw-r--r--src/gallium/auxiliary/util/u_cpu_detect.c16
1 files changed, 6 insertions, 10 deletions
diff --git a/src/gallium/auxiliary/util/u_cpu_detect.c b/src/gallium/auxiliary/util/u_cpu_detect.c
index 623b1fd6945..facbe69173b 100644
--- a/src/gallium/auxiliary/util/u_cpu_detect.c
+++ b/src/gallium/auxiliary/util/u_cpu_detect.c
@@ -76,7 +76,6 @@
struct util_cpu_caps util_cpu_caps;
static int has_cpuid(void);
-static int cpuid(uint32_t ax, uint32_t *p);
#if defined(PIPE_ARCH_X86)
@@ -342,11 +341,9 @@ 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
+static INLINE void
cpuid(uint32_t ax, uint32_t *p)
{
- int ret = -1;
-
#if defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86)
__asm __volatile (
"xchgl %%ebx, %1\n\t"
@@ -358,7 +355,6 @@ cpuid(uint32_t ax, uint32_t *p)
"=d" (p[3])
: "0" (ax)
);
- ret = 0;
#elif defined(PIPE_CC_GCC) && defined(PIPE_ARCH_X86_64)
__asm __volatile (
"cpuid\n\t"
@@ -368,14 +364,14 @@ cpuid(uint32_t ax, uint32_t *p)
"=d" (p[3])
: "0" (ax)
);
- ret = 0;
#elif defined(PIPE_CC_MSVC)
__cpuid(p, ax);
-
- ret = 0;
+#else
+ p[0] = 0;
+ p[1] = 0;
+ p[2] = 0;
+ p[3] = 0;
#endif
-
- return ret;
}
#endif /* X86 or X86_64 */