From 5c7a3c680b1dc09bda55401b18d27b98f3b312cb Mon Sep 17 00:00:00 2001 From: Sampo Savolainen Date: Tue, 9 Jan 2007 18:05:50 +0000 Subject: Hopefully last in line of assembler fixes git-svn-id: svn://localhost/ardour2/trunk@1291 d708f5d6-7413-0410-9779-e7cbd77b26cf --- libs/ardour/globals.cc | 16 ++++++++-------- 1 file 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; -- cgit v1.2.3