2014-09-09 07:47:16 +00:00
|
|
|
AC_DEFUN([AX_ARM_FEATURES],
|
|
|
|
[
|
|
|
|
AC_REQUIRE([AC_CANONICAL_HOST])
|
|
|
|
|
|
|
|
case $target_cpu in
|
|
|
|
arm*)
|
|
|
|
AX_CHECK_COMPILE_FLAG(-mfpu=neon, ax_cv_support_neon_ext=yes, [])
|
|
|
|
if test x"$ax_cv_support_neon_ext" = x"yes"; then
|
|
|
|
ARM_NEON_FLAGS="-mfpu=neon -DARM_NEON"
|
|
|
|
AC_SUBST(ARM_NEON_FLAGS)
|
|
|
|
ARM_FLAGS="$ARM_FLAGS $ARM_NEON_FLAGS"
|
|
|
|
AC_DEFINE(HAVE_NEON,,[Support NEON instructions])
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
aarch64*)
|
2015-01-21 03:29:05 +00:00
|
|
|
AX_CHECK_COMPILE_FLAG(-march=armv8-a, ax_cv_support_armv8=yes, [])
|
|
|
|
if test x"$ax_cv_support_armv8" = x"yes"; then
|
|
|
|
ARM_ARCH_FLAGS="-march=armv8-a"
|
|
|
|
ARM_DEFINE_FLAGS="-DARCH_AARCH64"
|
|
|
|
fi
|
2014-09-09 07:47:16 +00:00
|
|
|
AX_CHECK_COMPILE_FLAG(-march=armv8-a+simd, ax_cv_support_neon_ext=yes, [])
|
|
|
|
if test x"$ax_cv_support_neon_ext" = x"yes"; then
|
2015-01-21 03:29:05 +00:00
|
|
|
ARM_ARCH_FLAGS="$ARM_ARCH_FLAGS+simd"
|
|
|
|
ARM_DEFINE_FLAGS="$ARM_DEFINE_FLAGS -DARM_NEON"
|
2014-09-09 07:47:16 +00:00
|
|
|
ARM_NEON_FLAGS="-march=armv8-a+simd -DARCH_AARCH64 -DARM_NEON"
|
|
|
|
AC_DEFINE(HAVE_NEON,,[Support NEON instructions])
|
2015-01-21 03:29:05 +00:00
|
|
|
AC_SUBST(ARM_NEON_FLAGS)
|
|
|
|
fi
|
|
|
|
AX_CHECK_COMPILE_FLAG(-march=armv8-a+crc, ax_cv_support_crc_ext=yes, [])
|
|
|
|
if test x"$ax_cv_support_crc_ext" = x"yes"; then
|
|
|
|
ARM_ARCH_FLAGS="$ARM_ARCH_FLAGS+crc"
|
|
|
|
ARM_CRC_FLAGS="-march=armv8-a+crc -DARCH_AARCH64"
|
|
|
|
AC_DEFINE(HAVE_ARMV8_CRC,,[Support ARMv8 CRC instructions])
|
|
|
|
AC_SUBST(ARM_CRC_FLAGS)
|
2014-09-09 07:47:16 +00:00
|
|
|
fi
|
2015-01-21 03:29:05 +00:00
|
|
|
ARM_FLAGS="$ARM_ARCH_FLAGS $ARM_DEFINE_FLAGS"
|
2014-09-09 07:47:16 +00:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
AC_SUBST(ARM_FLAGS)
|
|
|
|
])
|