mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-30 18:40:13 +01:00
util: Add cpuid for Solaris Studio.
Signed-off-by: Vinson Lee <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
51b069e7aa
commit
19b3910bd5
2 changed files with 6 additions and 2 deletions
|
|
@ -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]),
|
||||
|
|
|
|||
|
|
@ -73,6 +73,10 @@
|
|||
#define PIPE_CC_ICL
|
||||
#endif
|
||||
|
||||
#if defined(__SUNPRO_C) || defined(__SUNPRO_CC)
|
||||
#define PIPE_CC_SUNPRO
|
||||
#endif
|
||||
|
||||
|
||||
/*
|
||||
* Processor architecture
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue