Hopefully last in line of assembler fixes

git-svn-id: svn://localhost/ardour2/trunk@1291 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Sampo Savolainen 2007-01-09 18:05:50 +00:00
parent 40cfe86141
commit 5c7a3c680b

View file

@ -200,33 +200,33 @@ setup_hardware_optimization (bool try_optimization)
#if defined (ARCH_X86) && defined (BUILD_SSE_OPTIMIZATIONS) #if defined (ARCH_X86) && defined (BUILD_SSE_OPTIMIZATIONS)
unsigned int use_sse = 0; unsigned long use_sse = 0;
#ifndef USE_X86_64_ASM #ifndef USE_X86_64_ASM
asm volatile ( asm (
"mov $1, %%eax\n" "mov $1, %%eax\n"
"pushl %%ebx\n" "pushl %%ebx\n"
"cpuid\n" "cpuid\n"
"andl $33554432, %%edx\n"
"movl %%edx, %0\n" "movl %%edx, %0\n"
"popl %%ebx\n" "popl %%ebx\n"
: "=m" (use_sse) : "=l" (use_sse)
: :
: "%eax", "%ecx", "%edx", "memory"); : "%eax", "%ecx", "%edx", "memory");
#else #else
asm volatile ( asm (
"movq $1, %%rax\n" "movq $1, %%rax\n"
"pushq %%rbx\n" "pushq %%rbx\n"
"cpuid\n" "cpuid\n"
"andq $33554432, %%rdx\n"
"movq %%rdx, %0\n" "movq %%rdx, %0\n"
"popq %%rbx\n" "popq %%rbx\n"
: "=m" (use_sse) : "=l" (use_sse)
: :
: "%rax", "%rcx", "%rdx", "memory"); : "%rax", "%rcx", "%rdx", "memory");
#endif /* USE_X86_64_ASM */ #endif /* USE_X86_64_ASM */
use_sse &= (1 << 25); // bit 25 = SSE support
if (use_sse) { if (use_sse) {
info << "Using SSE optimized routines" << endmsg; info << "Using SSE optimized routines" << endmsg;