Add check for certain POWER8/9 intrinsic in altivec.h to configure
This commit is contained in:
parent
a4156cd78b
commit
d15bcf80a0
12
configure.ac
12
configure.ac
@ -182,6 +182,16 @@ if test x"$have_cpu_power9" = xyes ; then
|
|||||||
AH_TEMPLATE(FLAC__HAS_TARGET_POWER9, [define if compiler has __attribute__((target("cpu=power9"))) support])
|
AH_TEMPLATE(FLAC__HAS_TARGET_POWER9, [define if compiler has __attribute__((target("cpu=power9"))) support])
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if test x"$have_cpu_power8" = xyes || test x"$have_cpu_power9" = xyes ; then
|
||||||
|
AC_MSG_CHECKING([whether altivec.h has vec_doubleh()])
|
||||||
|
AC_COMPILE_IFELSE(
|
||||||
|
[AC_LANG_PROGRAM([[#include <altivec.h>]],
|
||||||
|
[[vector float d = {0.0f,0.0f,0.0f,0.0f}; vec_doubleh(d);]])],
|
||||||
|
[AC_MSG_RESULT([yes])
|
||||||
|
has_vec_doubleh=true],
|
||||||
|
[AC_MSG_RESULT([no])])
|
||||||
|
fi
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
case "$host" in
|
case "$host" in
|
||||||
@ -257,7 +267,7 @@ AS_HELP_STRING([--disable-vsx],[Disable VSX optimizations]),
|
|||||||
*) AC_MSG_ERROR(bad value ${enableval} for --enable-vsx) ;;
|
*) AC_MSG_ERROR(bad value ${enableval} for --enable-vsx) ;;
|
||||||
esac],[use_vsx=true])
|
esac],[use_vsx=true])
|
||||||
AM_CONDITIONAL(FLaC__USE_VSX, test "x$use_vsx" = xtrue)
|
AM_CONDITIONAL(FLaC__USE_VSX, test "x$use_vsx" = xtrue)
|
||||||
if test "x$use_vsx" = xtrue ; then
|
if test "x$use_vsx$has_vec_doubleh" = xtruetrue ; then
|
||||||
AC_DEFINE(FLAC__USE_VSX)
|
AC_DEFINE(FLAC__USE_VSX)
|
||||||
AH_TEMPLATE(FLAC__USE_VSX, [define to enable use of VSX instructions])
|
AH_TEMPLATE(FLAC__USE_VSX, [define to enable use of VSX instructions])
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user