summaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorSiarhei Siamashka <siarhei.siamashka@nokia.com>2009-11-04 15:18:38 +0200
committerSiarhei Siamashka <siarhei.siamashka@nokia.com>2009-11-11 18:12:56 +0200
commitbcb4bc79321659635d706bade25851cddf563856 (patch)
tree90113d551061d7f149a8588ac4ede14201cbfa43 /configure.ac
parent1eff0ab487efe4720451b8bd92c8423b9772a69a (diff)
ARM: introduction of the new framework for NEON fast path optimizations
GNU assembler and its macro preprocessor is now used to generate NEON optimized functions from a common template. This automatically takes care of nuisances like ensuring optimal alignment, dealing with leading/trailing pixels, doing prefetch, etc. Implementations for a lot of compositing functions are also added, but not enabled.
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac30
1 files changed, 14 insertions, 16 deletions
diff --git a/configure.ac b/configure.ac
index 172656a..8ee91d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -71,6 +71,7 @@ AC_CANONICAL_HOST
test_CFLAGS=${CFLAGS+set} # We may override autoconf default CFLAGS.
AC_PROG_CC
+AM_PROG_AS
AC_PROG_LIBTOOL
AC_CHECK_FUNCS([getisax])
AC_C_BIGENDIAN
@@ -400,19 +401,20 @@ AC_SUBST(ARM_SIMD_CFLAGS)
AM_CONDITIONAL(USE_ARM_SIMD, test $have_arm_simd = yes)
dnl ==========================================================================
-dnl Check for ARM NEON instructions
-ARM_NEON_CFLAGS="-mfpu=neon -mcpu=cortex-a8"
-
+dnl Check if assembler is gas compatible and supports NEON instructions
have_arm_neon=no
-AC_MSG_CHECKING(whether to use ARM NEON)
+AC_MSG_CHECKING(whether to use ARM NEON assembler)
xserver_save_CFLAGS=$CFLAGS
-CFLAGS="$ARM_NEON_CFLAGS $CFLAGS"
-AC_COMPILE_IFELSE([
-#include <arm_neon.h>
-int main () {
- uint8x8_t neon_test=vmov_n_u8(0);
- return 0;
-}], have_arm_neon=yes)
+CFLAGS="-x assembler-with-cpp"
+AC_COMPILE_IFELSE([[
+.text
+.fpu neon
+.altmacro
+#ifndef __ARM_EABI__
+#error EABI is required (to be sure that calling conventions are compatible)
+#endif
+pld [r0]
+vmovn.u16 d0, q0]], have_arm_neon=yes)
CFLAGS=$xserver_save_CFLAGS
AC_ARG_ENABLE(arm-neon,
@@ -425,13 +427,9 @@ if test $enable_arm_neon = no ; then
fi
if test $have_arm_neon = yes ; then
- AC_DEFINE(USE_ARM_NEON, 1, [use ARM NEON compiler intrinsics])
-else
- ARM_NEON_CFLAGS=
+ AC_DEFINE(USE_ARM_NEON, 1, [use ARM NEON assembly optimizations])
fi
-AC_SUBST(ARM_NEON_CFLAGS)
-
AM_CONDITIONAL(USE_ARM_NEON, test $have_arm_neon = yes)
AC_MSG_RESULT($have_arm_neon)