diff options
Diffstat (limited to 'cpuid_x86.c')
-rw-r--r-- | cpuid_x86.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/cpuid_x86.c b/cpuid_x86.c index ebbbe3fff..6e4eae20d 100644 --- a/cpuid_x86.c +++ b/cpuid_x86.c @@ -114,12 +114,15 @@ static inline int have_excpuid(void){ return eax & 0xffff; } +#ifndef NO_AVX static inline void xgetbv(int op, int * eax, int * edx){ __asm__ __volatile__ ("xgetbv": "=a" (*eax), "=d" (*edx) : "c" (op) : "cc"); } +#endif int support_avx(){ +#ifndef NO_AVX int eax, ebx, ecx, edx; int ret=0; @@ -131,8 +134,12 @@ int support_avx(){ } } return ret; +#else + return 0; +#endif } + int get_vendor(void){ int eax, ebx, ecx, edx; char vendor[13]; |