diff options
author | Emanuel Haupt <ehaupt@FreeBSD.org> | 2010-09-28 10:49:27 +0000 |
---|---|---|
committer | Emanuel Haupt <ehaupt@FreeBSD.org> | 2010-09-28 10:49:27 +0000 |
commit | 51eb8386ab4c49aa7f4de09db292a88a69d7ab53 (patch) | |
tree | 61040bddd76c53d7610719897549c315c3a1627b /audio/festalon/files/patch-src__cputest.c | |
parent | - Update to 5.5.6 RC release [1] (diff) |
Provide patches to make it build on amd64.
Diffstat (limited to 'audio/festalon/files/patch-src__cputest.c')
-rw-r--r-- | audio/festalon/files/patch-src__cputest.c | 48 |
1 files changed, 48 insertions, 0 deletions
diff --git a/audio/festalon/files/patch-src__cputest.c b/audio/festalon/files/patch-src__cputest.c new file mode 100644 index 000000000000..313a06a7d842 --- /dev/null +++ b/audio/festalon/files/patch-src__cputest.c @@ -0,0 +1,48 @@ +--- ./src/cputest.c.orig 2005-02-28 01:26:01.000000000 +0100 ++++ ./src/cputest.c 2010-09-28 11:21:52.000000000 +0200 +@@ -31,18 +31,33 @@ + { + #ifdef ARCH_X86 + int rval; ++#ifdef __x86_64__ ++ int64_t eax, ebx, ecx, edx; ++#else + int eax, ebx, ecx, edx; ++#endif + char vendor[13] = "UnknownVndr"; + + __asm__ __volatile__ ( + /* See if CPUID instruction is supported ... */ + /* ... Get copies of EFLAGS into eax and ecx */ +- "pushf\n\t" + #ifdef __x86_64__ ++ "pushf\n\t" ++ "pop %0\n\t" ++ "mov %0, %1\n\t" ++ ++ /* ... Toggle the ID bit in one copy and store */ ++ /* to the EFLAGS reg */ ++ "xor $0x200000, %0\n\t" ++ "push %0\n\t" ++ "popf\n\t" ++ ++ /* ... Get the (hopefully modified) EFLAGS */ ++ "pushf\n\t" + "pop %0\n\t" + #else ++ "pushf\n\t" + "popl %0\n\t" +-#endif + "movl %0, %1\n\t" + + /* ... Toggle the ID bit in one copy and store */ +@@ -53,9 +68,6 @@ + + /* ... Get the (hopefully modified) EFLAGS */ + "pushf\n\t" +-#ifdef __x86_64__ +- "pop %0\n\t" +-#else + "popl %0\n\t" + #endif + : "=a" (eax), "=c" (ecx) |