Add configure check for Aarch64-specific Neon intrinsics.
authorJonathan Lennox <jonathan@vidyo.com>
Sat, 21 Nov 2015 04:03:57 +0000 (23:03 -0500)
committerTimothy B. Terriberry <tterribe@xiph.org>
Wed, 6 Jul 2016 22:00:02 +0000 (15:00 -0700)
Signed-off-by: Timothy B. Terriberry <tterribe@xiph.org>
configure.ac

index 7374b5e..8071af6 100644 (file)
@@ -504,6 +504,26 @@ AS_IF([test x"$enable_intrinsics" = x"yes"],[
                  [rtcd_support="$rtcd_support (NE10)"])
          ])
 
+         OPUS_CHECK_INTRINSICS(
+            [Aarch64 Neon],
+            [$ARM_NEON_INTR_CFLAGS],
+            [OPUS_ARM_MAY_HAVE_AARCH64_NEON_INTR],
+            [OPUS_ARM_PRESUME_AARCH64_NEON_INTR],
+            [[#include <arm_neon.h>
+            ]],
+            [[
+               static int32_t IN;
+               static int16_t OUT;
+               OUT = vqmovns_s32(IN);
+            ]]
+         )
+
+         AS_IF([test x"$OPUS_ARM_PRESUME_AARCH64_NEON_INTR" = x"1"],
+         [
+            AC_DEFINE([OPUS_ARM_PRESUME_AARCH64_NEON_INTR], 1, [Define if binary requires Aarch64 Neon Intrinsics])
+            intrinsics_support="$intrinsics_support (NEON [Aarch64])"
+         ])
+
          AS_IF([test x"$intrinsics_support" = x""],
             [intrinsics_support=no],
             [intrinsics_support="ARM$intrinsics_support"])