diff options
author | Aurelien Jacobs <aurel@gnuage.org> | 2004-10-11 02:19:29 +0000 |
---|---|---|
committer | Michael Niedermayer <michaelni@gmx.at> | 2004-10-11 02:19:29 +0000 |
commit | 053dea12f27e6bb8acf6a103ef954da05419d3dc (patch) | |
tree | a23d86aee2e3ab3c9ad72a6fa1e4882ebd0b1228 /configure | |
parent | 3ba1438dec553ab106aac8895ddebc01e42c5b71 (diff) | |
download | ffmpeg-053dea12f27e6bb8acf6a103ef954da05419d3dc.tar.gz |
adapting existing mmx/mmx2/sse/3dnow optimizations so they work on x86_64 patch by (Aurelien Jacobs <aurel at gnuage dot org>)
Originally committed as revision 3578 to svn://svn.ffmpeg.org/ffmpeg/trunk
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 16 |
1 files changed, 14 insertions, 2 deletions
@@ -106,6 +106,14 @@ case "$cpu" in i386|i486|i586|i686|i86pc|BePC) cpu="x86" ;; + x86_64) + if [ "`$cc -dumpmachine | grep x86_64 | cut -d- -f1`" = "x86_64" -a \ + -z "`echo $CFLAGS | grep -- -m32`" ]; then + cpu="x86_64" + else + cpu="x86" + fi + ;; # armv4l is a subset of armv5tel armv4l|armv5tel) cpu="armv4l" @@ -500,7 +508,7 @@ fi # compute mmx state if test $mmx = "default"; then - if test $cpu = "x86"; then + if test $cpu = "x86" -o $cpu = "x86_64"; then mmx="yes" else mmx="no" @@ -827,6 +835,7 @@ done # test gcc version to see if vector builtins can be used # currently only used on i386 for MMX builtins cat > $TMPC << EOF +#include <xmmintrin.h> int main(void) { #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2) return 0; @@ -985,7 +994,7 @@ echo "CPU $cpu ($tune)" echo "Big Endian $bigendian" echo "inttypes.h $inttypes" echo "broken inttypes.h $emu_fast_int" -if test $cpu = "x86"; then +if test $cpu = "x86" -o $cpu = "x86_64"; then echo "MMX enabled $mmx" echo "Vector Builtins $builtin_vector" fi @@ -1074,6 +1083,9 @@ echo "TARGET_OS=$TARGET_OS" >> config.mak if test "$cpu" = "x86" ; then echo "TARGET_ARCH_X86=yes" >> config.mak echo "#define ARCH_X86 1" >> $TMPH +elif test "$cpu" = "x86_64" ; then + echo "TARGET_ARCH_X86_64=yes" >> config.mak + echo "#define ARCH_X86_64 1" >> $TMPH elif test "$cpu" = "armv4l" ; then echo "TARGET_ARCH_ARMV4L=yes" >> config.mak echo "#define ARCH_ARMV4L 1" >> $TMPH |