1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
|
$NetBSD: patch-ai,v 1.4 2006/05/09 08:01:07 rillig Exp $
--- lib-src/soundtouch/source/SoundTouch/cpu_detect_x86_gcc.cpp.orig 2005-07-22 17:07:42.000000000 +0000
+++ lib-src/soundtouch/source/SoundTouch/cpu_detect_x86_gcc.cpp
@@ -83,6 +83,7 @@ uint detectCPUextensions(void)
if (_dwDisabledISA == 0xffffffff) return 0;
asm volatile(
+ "\n\tpushl %%ebx"
"\n\txor %%esi, %%esi" // clear %%esi = result register
// check if 'cpuid' instructions is available by toggling eflags bit 21
@@ -131,10 +132,11 @@ uint detectCPUextensions(void)
"\n\tend:"
"\n\tmov %%esi, %0"
+ "\n\tpopl %%ebx"
: "=rm" (res)
: /* no inputs */
- : "%edx", "%eax", "%ecx", "%ebx", "%esi" );
+ : "%edx", "%eax", "%ecx", "%esi" );
return res & ~_dwDisabledISA;
#endif
|