mirror of
https://git.ffmpeg.org/ffmpeg.git
synced 2025-02-17 20:37:04 +00:00
allow easy use of GCC vector builtins on x86 (has someone a better idea?)
Originally committed as revision 1409 to svn://svn.ffmpeg.org/ffmpeg/trunk
This commit is contained in:
parent
5a508a98e9
commit
52b41d7f70
25
configure
vendored
25
configure
vendored
@ -469,6 +469,26 @@ for restrict_keyword in restrict __restrict__ __restrict; do
|
|||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
|
# test gcc version to see if vector builtins can be used
|
||||||
|
# currently only used on i386 for MMX builtins
|
||||||
|
cat > $TMPC << EOF
|
||||||
|
int main(void) {
|
||||||
|
#if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 2)
|
||||||
|
return 0;
|
||||||
|
#else
|
||||||
|
#error no vector builtins
|
||||||
|
#endif
|
||||||
|
}
|
||||||
|
EOF
|
||||||
|
|
||||||
|
builtin_vector=no
|
||||||
|
if $cc -o $TMPO $TMPC 2> /dev/null ; then
|
||||||
|
builtin_vector=yes
|
||||||
|
if test "$mmx" = "yes" ; then
|
||||||
|
CFLAGS="$CFLAGS -msse"
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
|
if test x"$1" = x"-h" -o x"$1" = x"--help" ; then
|
||||||
cat << EOF
|
cat << EOF
|
||||||
|
|
||||||
@ -522,6 +542,7 @@ echo "CPU $cpu"
|
|||||||
echo "Big Endian $bigendian"
|
echo "Big Endian $bigendian"
|
||||||
if test $cpu = "x86"; then
|
if test $cpu = "x86"; then
|
||||||
echo "MMX enabled $mmx"
|
echo "MMX enabled $mmx"
|
||||||
|
echo "Vector Builtins $builtin_vector"
|
||||||
fi
|
fi
|
||||||
if test $cpu = "mips"; then
|
if test $cpu = "mips"; then
|
||||||
echo "MMI enabled $mmi"
|
echo "MMI enabled $mmi"
|
||||||
@ -583,6 +604,10 @@ if test "$mmx" = "yes" ; then
|
|||||||
echo "TARGET_MMX=yes" >> config.mak
|
echo "TARGET_MMX=yes" >> config.mak
|
||||||
echo "#define HAVE_MMX 1" >> $TMPH
|
echo "#define HAVE_MMX 1" >> $TMPH
|
||||||
fi
|
fi
|
||||||
|
if test "$builtin_vector" = "yes" ; then
|
||||||
|
echo "TARGET_BUILTIN_VECTOR=yes" >> config.mak
|
||||||
|
echo "#define HAVE_BUILTIN_VECTOR 1" >> $TMPH
|
||||||
|
fi
|
||||||
if test "$mmi" = "yes" ; then
|
if test "$mmi" = "yes" ; then
|
||||||
echo "TARGET_MMI=yes" >> config.mak
|
echo "TARGET_MMI=yes" >> config.mak
|
||||||
echo "#define HAVE_MMI 1" >> $TMPH
|
echo "#define HAVE_MMI 1" >> $TMPH
|
||||||
|
Loading…
Reference in New Issue
Block a user