Skip to content
Snippets Groups Projects
Commit ade7779c authored by Niels Möller's avatar Niels Möller
Browse files

Reorganization of ARM assembly.

Renamed directory armv7 to arm. New subdirectory arm/neon, for files
using neon instructions. configure.ac hacked to make use of neon
configurable.
parent b7c95363
No related branches found
No related tags found
No related merge requests found
Showing with 52 additions and 3 deletions
2013-04-18 Niels Möller <nisse@lysator.liu.se> 2013-04-18 Niels Möller <nisse@lysator.liu.se>
* arm/aes-encrypt-internal.asm: Updated include of aes.m4.
* arm/aes-decrypt-internal.asm: Likewise.
* Makefile.in (distdir): Updated for ARM reorganization.
* configure.ac (asm_path): Generalized, can now be a list of
directories. On ARM, check for neon instructions, and add arm/neon
if appropriate. New command line options
--enable-arm-neon/--disable-arm-neon, for overriding the default.
arm/neon: New subdirectory, for assembly files making use of neon
instructions.
arm: Renamed directory, from...
armv7: ...old name.
* aclocal.m4 (NETTLE_CHECK_ARM_NEON): New macro.
* nettle.texinfo (Keyed hash functions): Document UMAC. * nettle.texinfo (Keyed hash functions): Document UMAC.
* umac.h (UMAC32_DIGEST_SIZE, UMAC64_DIGEST_SIZE) * umac.h (UMAC32_DIGEST_SIZE, UMAC64_DIGEST_SIZE)
......
...@@ -516,7 +516,7 @@ distdir: $(DISTFILES) ...@@ -516,7 +516,7 @@ distdir: $(DISTFILES)
else cp "$(srcdir)/$$f" "$(distdir)" ; \ else cp "$(srcdir)/$$f" "$(distdir)" ; \
fi ; \ fi ; \
done done
set -e; for d in sparc32 sparc64 x86 x86_64 armv7 ; do \ set -e; for d in sparc32 sparc64 x86 x86_64 arm arm/neon ; do \
mkdir "$(distdir)/$$d" ; \ mkdir "$(distdir)/$$d" ; \
cp $(srcdir)/$$d/*.asm $(srcdir)/$$d/*.m4 "$(distdir)/$$d" ; \ cp $(srcdir)/$$d/*.asm $(srcdir)/$$d/*.m4 "$(distdir)/$$d" ; \
done done
......
...@@ -608,6 +608,37 @@ fi ...@@ -608,6 +608,37 @@ fi
AC_SUBST(EXEEXT_FOR_BUILD,$gmp_cv_prog_exeext_for_build) AC_SUBST(EXEEXT_FOR_BUILD,$gmp_cv_prog_exeext_for_build)
]) ])
dnl NETTLE_CHECK_ARM_NEON
dnl ---------------------
dnl Check if ARM Neon instructinos should be used.
dnl Obeys enable_arn_neon, which should be set earlier.
AC_DEFUN([NETTLE_CHECK_ARM_NEON],
[if test "$enable_arm_neon" = auto ; then
if test "$cross_compiling" = yes ; then
dnl Check if compiler/assembler accepts it,
dnl without an explicit .fpu neon directive.
AC_CACHE_CHECK([if assembler accepts Neon instructions],
nettle_cv_asm_arm_neon,
[GMP_TRY_ASSEMBLE([
.text
foo:
vmlal.u32 q1, d0, d1
],
[nettle_cv_asm_arm_neon=yes],
[nettle_cv_asm_arm_neon=no])])
enable_arm_neon="$nettle_cv_asm_arm_neon"
else
AC_MSG_CHECKING([if /proc/cpuinfo claims neon support])
if grep '^Features.*:.* neon' /proc/cpuinfo >/dev/null ; then
enable_arm_neon=yes
else
enable_arm_neon=no
fi
AC_MSG_RESULT($enable_arm_neon)
fi
fi
])
dnl @synopsis AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEADERS-TO-CHECK])] dnl @synopsis AX_CREATE_STDINT_H [( HEADER-TO-GENERATE [, HEADERS-TO-CHECK])]
dnl dnl
dnl the "ISO C9X: 7.18 Integer types <stdint.h>" section requires the dnl the "ISO C9X: 7.18 Integer types <stdint.h>" section requires the
......
File moved
...@@ -17,7 +17,7 @@ C along with the nettle library; see the file COPYING.LIB. If not, write to ...@@ -17,7 +17,7 @@ C along with the nettle library; see the file COPYING.LIB. If not, write to
C the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, C the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
C MA 02111-1301, USA. C MA 02111-1301, USA.
include_src(<armv7/aes.m4>) include_src(<arm/aes.m4>)
C Benchmarked at at 785, 914, 1051 cycles/block on cortex A9, C Benchmarked at at 785, 914, 1051 cycles/block on cortex A9,
C for 128, 192 and 256 bit key sizes. Unclear why it is slower C for 128, 192 and 256 bit key sizes. Unclear why it is slower
......
...@@ -17,7 +17,7 @@ C along with the nettle library; see the file COPYING.LIB. If not, write to ...@@ -17,7 +17,7 @@ C along with the nettle library; see the file COPYING.LIB. If not, write to
C the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, C the Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston,
C MA 02111-1301, USA. C MA 02111-1301, USA.
include_src(<armv7/aes.m4>) include_src(<arm/aes.m4>)
C Benchmarked at at 693, 824, 950 cycles/block on cortex A9, C Benchmarked at at 693, 824, 950 cycles/block on cortex A9,
C for 128, 192 and 256 bit key sizes. C for 128, 192 and 256 bit key sizes.
......
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
File moved
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment