Skip to content

Commit

Permalink
First pass at ARMv8 64-bit NEON SIMD support
Browse files Browse the repository at this point in the history
  • Loading branch information
dcommander committed Feb 5, 2014
1 parent abb6a51 commit 1bb1e69
Show file tree
Hide file tree
Showing 4 changed files with 1,888 additions and 0 deletions.
33 changes: 33 additions & 0 deletions acinclude.m4
Original file line number Diff line number Diff line change
Expand Up @@ -210,3 +210,36 @@ AC_DEFUN([AC_CHECK_COMPATIBLE_MIPSEL_ASSEMBLER_IFELSE],[
$2
fi
])

AC_DEFUN([AC_CHECK_COMPATIBLE_ARM64_ASSEMBLER_IFELSE],[
ac_good_gnu_arm_assembler=no
ac_save_CC="$CC"
ac_save_CFLAGS="$CFLAGS"
CFLAGS="$CCASFLAGS -x assembler-with-cpp"
CC="$CCAS"
AC_COMPILE_IFELSE([[
.text
movi v0.16b, #100]], ac_good_gnu_arm_assembler=yes)
ac_use_gas_preprocessor=no
if test "x$ac_good_gnu_arm_assembler" = "xno" ; then
CC="gas-preprocessor.pl $CCAS"
AC_COMPILE_IFELSE([[
.text
movi v0.16b, #100]], ac_use_gas_preprocessor=yes)
fi
CFLAGS="$ac_save_CFLAGS"
CC="$ac_save_CC"
if test "x$ac_use_gas_preprocessor" = "xyes" ; then
CCAS="gas-preprocessor.pl $CCAS"
AC_SUBST([CCAS])
ac_good_gnu_arm_assembler=yes
fi
if test "x$ac_good_gnu_arm_assembler" = "xyes" ; then
$1
else
$2
fi
])
17 changes: 17 additions & 0 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -430,7 +430,23 @@ if test "x${with_simd}" != "xno"; then
AC_MSG_ERROR([SIMD support can't be enabled.])
else
AC_MSG_WARN([SIMD support can't be enabled. Performance will suffer.])
fi
fi
;;
aarch64*)
AC_MSG_RESULT([yes (arm64)])
AC_MSG_CHECKING([if the assembler is GNU-compatible and can be used])
AC_CHECK_COMPATIBLE_ARM64_ASSEMBLER_IFELSE(
[AC_MSG_RESULT([yes])
simd_arch=aarch64],
[AC_MSG_RESULT([no])
with_simd=no])
if test "x${with_simd}" = "xno"; then
if test "x${require_simd}" = "xyes"; then
AC_MSG_ERROR([SIMD support can't be enabled.])
else
AC_MSG_WARN([SIMD support can't be enabled. Performance will suffer.])
fi
fi
;;
mipsel*)
Expand Down Expand Up @@ -472,6 +488,7 @@ AM_CONDITIONAL([WITH_SSE_FLOAT_DCT], [test "x$simd_arch" = "xx86_64" -o "x$simd_
AM_CONDITIONAL([SIMD_I386], [test "x$simd_arch" = "xi386"])
AM_CONDITIONAL([SIMD_X86_64], [test "x$simd_arch" = "xx86_64"])
AM_CONDITIONAL([SIMD_ARM], [test "x$simd_arch" = "xarm"])
AM_CONDITIONAL([SIMD_ARM_64], [test "x$simd_arch" = "xaarch64"])
AM_CONDITIONAL([SIMD_MIPSEL], [test "x$simd_arch" = "xmipsel"])
AM_CONDITIONAL([X86_64], [test "x$host_cpu" = "xx86_64" -o "x$host_cpu" = "xamd64"])
AM_CONDITIONAL([WITH_TURBOJPEG], [test "x$with_turbojpeg" != "xno"])
Expand Down
6 changes: 6 additions & 0 deletions simd/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@ libsimd_la_SOURCES = jsimd_arm.c jsimd_arm_neon.S

endif

if SIMD_ARM_64

libsimd_la_SOURCES = jsimd_arm.c jsimd_arm_neon_64.S

endif

if SIMD_MIPSEL

libsimd_la_SOURCES = jsimd_mips.c jsimd_mips_dspr2_asm.h jsimd_mips_dspr2.S
Expand Down

0 comments on commit 1bb1e69

Please sign in to comment.