summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSampo Savolainen <v2@iki.fi>2007-01-09 18:05:50 +0000
committerSampo Savolainen <v2@iki.fi>2007-01-09 18:05:50 +0000
commit5c7a3c680b1dc09bda55401b18d27b98f3b312cb (patch)
treea800fc14a95341f2c3a014b99a483252509219f3
parent40cfe86141f4e47f06d697b470475cfb2551b920 (diff)
Hopefully last in line of assembler fixes
git-svn-id: svn://localhost/ardour2/trunk@1291 d708f5d6-7413-0410-9779-e7cbd77b26cf
-rw-r--r--libs/ardour/globals.cc16
1 files changed, 8 insertions, 8 deletions
diff --git a/libs/ardour/globals.cc b/libs/ardour/globals.cc
index e9d5a01c50..3f47b30c1f 100644
--- a/libs/ardour/globals.cc
+++ b/libs/ardour/globals.cc
@@ -200,39 +200,39 @@ setup_hardware_optimization (bool try_optimization)
#if defined (ARCH_X86) && defined (BUILD_SSE_OPTIMIZATIONS)
- unsigned int use_sse = 0;
+ unsigned long use_sse = 0;
#ifndef USE_X86_64_ASM
- asm volatile (
+ asm (
"mov $1, %%eax\n"
"pushl %%ebx\n"
"cpuid\n"
- "andl $33554432, %%edx\n"
"movl %%edx, %0\n"
"popl %%ebx\n"
- : "=m" (use_sse)
+ : "=l" (use_sse)
:
: "%eax", "%ecx", "%edx", "memory");
+
#else
- asm volatile (
+ asm (
"movq $1, %%rax\n"
"pushq %%rbx\n"
"cpuid\n"
- "andq $33554432, %%rdx\n"
"movq %%rdx, %0\n"
"popq %%rbx\n"
- : "=m" (use_sse)
+ : "=l" (use_sse)
:
: "%rax", "%rcx", "%rdx", "memory");
#endif /* USE_X86_64_ASM */
+ use_sse &= (1 << 25); // bit 25 = SSE support
if (use_sse) {
info << "Using SSE optimized routines" << endmsg;
// SSE SET
- Session::compute_peak = x86_sse_compute_peak;
+ Session::compute_peak = x86_sse_compute_peak;
Session::apply_gain_to_buffer = x86_sse_apply_gain_to_buffer;
Session::mix_buffers_with_gain = x86_sse_mix_buffers_with_gain;
Session::mix_buffers_no_gain = x86_sse_mix_buffers_no_gain;