# HG changeset patch # User zuxy # Date 1235404419 0 # Node ID a50419dcda5307f88b5f283b2477742fdb42b510 # Parent 1de11a984fc63e117518fcdbba18690a1c772aa4 Remove CPUID availability check on AMD64 as it's architectural. diff -r 1de11a984fc6 -r a50419dcda53 x86/cpuid.c --- a/x86/cpuid.c Mon Feb 23 15:18:28 2009 +0000 +++ b/x86/cpuid.c Mon Feb 23 15:53:39 2009 +0000 @@ -42,19 +42,13 @@ int rval = 0; int eax, ebx, ecx, edx; int max_std_level, max_ext_level, std_caps=0, ext_caps=0; + +#if ARCH_X86_32 x86_reg a, c; - -#if ARCH_X86_64 -#define PUSHF "pushfq\n\t" -#define POPF "popfq\n\t" -#else -#define PUSHF "pushfl\n\t" -#define POPF "popfl\n\t" -#endif __asm__ volatile ( /* See if CPUID instruction is supported ... */ /* ... Get copies of EFLAGS into eax and ecx */ - PUSHF + "pushfl\n\t" "pop %0\n\t" "mov %0, %1\n\t" @@ -62,10 +56,10 @@ /* to the EFLAGS reg */ "xor $0x200000, %0\n\t" "push %0\n\t" - POPF + "popfl\n\t" /* ... Get the (hopefully modified) EFLAGS */ - PUSHF + "pushfl\n\t" "pop %0\n\t" : "=a" (a), "=c" (c) : @@ -74,6 +68,7 @@ if (a == c) return 0; /* CPUID not supported */ +#endif cpuid(0, max_std_level, ebx, ecx, edx);