[PATCH 2/5] cipher: bufhelp: allow unaligned memory accesses on ARM

Jussi Kivilinna jussi.kivilinna at iki.fi
Mon Aug 19 11:16:01 CEST 2013


* cipher/bufhelp.h [__arm__ && __ARM_FEATURE_UNALIGNED]: Enable
BUFHELP_FAST_UNALIGNED_ACCESS.
--

Newer ARM systems support unaligned memory accesses and on gcc-4.7 and onwards
this is identified by __ARM_FEATURE_UNALIGNED macro.

Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
---
 cipher/bufhelp.h |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/cipher/bufhelp.h b/cipher/bufhelp.h
index 1c173e2..d829cf1 100644
--- a/cipher/bufhelp.h
+++ b/cipher/bufhelp.h
@@ -29,7 +29,8 @@
 #endif
 
 
-#if defined(__i386__) || defined(__x86_64__)
+#if defined(__i386__) || defined(__x86_64__) || \
+    (defined(__arm__) && defined(__ARM_FEATURE_UNALIGNED))
 /* These architectures are able of unaligned memory accesses and can
    handle those fast.
  */




More information about the Gcrypt-devel mailing list