summaryrefslogtreecommitdiffstats
path: root/src/pulsecore/cpu-x86.c
diff options
context:
space:
mode:
authorLennart Poettering <lennart@poettering.net>2010-01-13 20:31:17 +0100
committerLennart Poettering <lennart@poettering.net>2010-01-13 20:31:17 +0100
commit170812755e0ac235ed2b7182ef637eb317d8b2b2 (patch)
tree2afd0d87f0f09a8cde5f8005e8f66b6b43e03113 /src/pulsecore/cpu-x86.c
parent540ec7b961256d6c7702448ca995f61268064190 (diff)
cpu: check for CMOV flag before using this intsruction in assembly
http://pulseaudio.org/ticket/776
Diffstat (limited to 'src/pulsecore/cpu-x86.c')
-rw-r--r--src/pulsecore/cpu-x86.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/src/pulsecore/cpu-x86.c b/src/pulsecore/cpu-x86.c
index f194a608..b1730722 100644
--- a/src/pulsecore/cpu-x86.c
+++ b/src/pulsecore/cpu-x86.c
@@ -57,6 +57,9 @@ void pa_cpu_init_x86 (void) {
if (level >= 1) {
get_cpuid (0x00000001, &eax, &ebx, &ecx, &edx);
+ if (edx & (1<<15))
+ flags |= PA_CPU_X86_CMOV;
+
if (edx & (1<<23))
flags |= PA_CPU_X86_MMX;
@@ -97,7 +100,8 @@ void pa_cpu_init_x86 (void) {
flags |= PA_CPU_X86_3DNOW;
}
- pa_log_info ("CPU flags: %s%s%s%s%s%s%s%s%s%s",
+ pa_log_info ("CPU flags: %s%s%s%s%s%s%s%s%s%s%s",
+ (flags & PA_CPU_X86_CMOV) ? "CMOV " : "",
(flags & PA_CPU_X86_MMX) ? "MMX " : "",
(flags & PA_CPU_X86_SSE) ? "SSE " : "",
(flags & PA_CPU_X86_SSE2) ? "SSE2 " : "",