13
0

use compiler-generated _LP64 macro to detect x86_64 rather than USE_X86_64_ASM

git-svn-id: svn://localhost/ardour2/branches/3.0@10871 d708f5d6-7413-0410-9779-e7cbd77b26cf
This commit is contained in:
Paul Davis 2011-12-02 20:38:31 +00:00
parent 14d601a0ff
commit 639bb7dc5d
2 changed files with 6 additions and 7 deletions

View File

@ -19,12 +19,12 @@ FPU::FPU ()
_flags = Flags (0); _flags = Flags (0);
#ifndef ARCH_X86 #if !( (defined __x86_64__) || (defined __i386__) ) // !ARCH_X86
return; return;
#endif #else
#ifndef USE_X86_64_ASM #ifndef _LP64 //USE_X86_64_ASM
asm volatile ( asm volatile (
"mov $1, %%eax\n" "mov $1, %%eax\n"
"pushl %%ebx\n" "pushl %%ebx\n"
@ -102,6 +102,7 @@ FPU::FPU ()
free (fxbuf); free (fxbuf);
} }
} }
#endif
} }
FPU::~FPU () FPU::~FPU ()

View File

@ -182,7 +182,8 @@ def set_compiler_flags (conf,opt):
# #
# ARCH_X86 means anything in the x86 family from i386 to x86_64 # ARCH_X86 means anything in the x86 family from i386 to x86_64
# USE_X86_64_ASM is used to distingush 32 and 64 bit assembler # the compile-time presence of the macro _LP64 is used to
# distingush 32 and 64 bit assembler
# #
if (re.search ("(i[0-9]86|x86_64)", config[config_cpu]) != None): if (re.search ("(i[0-9]86|x86_64)", config[config_cpu]) != None):
@ -227,9 +228,6 @@ def set_compiler_flags (conf,opt):
elif conf.env['build_target'] == 'i686' or conf.env['build_target'] == 'x86_64': elif conf.env['build_target'] == 'i686' or conf.env['build_target'] == 'x86_64':
optimization_flags.append ("-DBUILD_SSE_OPTIMIZATIONS") optimization_flags.append ("-DBUILD_SSE_OPTIMIZATIONS")
debug_flags.append ("-DBUILD_SSE_OPTIMIZATIONS") debug_flags.append ("-DBUILD_SSE_OPTIMIZATIONS")
elif conf.env['build_target'] == 'x86_64':
optimization_flags.append ("-DUSE_X86_64_ASM")
debug_flags.append ("-DUSE_X86_64_ASM")
if not build_host_supports_sse: if not build_host_supports_sse:
print("\nWarning: you are building Ardour with SSE support even though your system does not support these instructions. (This may not be an error, especially if you are a package maintainer)") print("\nWarning: you are building Ardour with SSE support even though your system does not support these instructions. (This may not be an error, especially if you are a package maintainer)")