diff --git a/configure b/configure index ea24e7dae6..f491f2aaa7 100755 --- a/configure +++ b/configure @@ -1114,13 +1114,19 @@ fi cat > $TMPC << EOF #include int main(void) { +__m64 b1; +b1 = _m_pswapd(b1); _m_femms(); return 0; } EOF mm3dnow=no -if $cc -m3dnow -o $TMPO $TMPC 2> /dev/null ; then +march=athlon +if test "$cpu" = "x86_64"; then + march=k8 +fi +if $cc -march=$march -o $TMPO $TMPC 2> /dev/null ; then mm3dnow=yes fi diff --git a/libavcodec/Makefile b/libavcodec/Makefile index 6f82a5bd3e..afc63b752b 100644 --- a/libavcodec/Makefile +++ b/libavcodec/Makefile @@ -350,7 +350,12 @@ depend: CFLAGS+= -msse endif ifdef TARGET_BUILTIN_3DNOW i386/fft_3dn.o: CFLAGS+= -m3dnow -i386/fft_3dn2.o: CFLAGS+= -m3dnow +ifeq ($(TARGET_ARCH_X86),yes) +i386/fft_3dn2.o: CFLAGS+= -march=athlon +endif +ifeq ($(TARGET_ARCH_X86_64),yes) +i386/fft_3dn2.o: CFLAGS+= -march=k8 +endif endif endif