diff options
author | Mustafa Yigit Bilgen <mbilgen@gpartner-nvidia.com> | 2018-12-03 18:27:29 -0800 |
---|---|---|
committer | android-build-merger <android-build-merger@google.com> | 2018-12-03 18:27:29 -0800 |
commit | df0fac0f9c9ea554abd8778c41f8711744edb9ce (patch) | |
tree | 6d61864b509d96c0d059b204237f6137006b0e65 | |
parent | f4ccf273176a43818d0ddecb447584e019a4b94b (diff) | |
parent | 1f6ad22ce4414a38a187307feb312d934db5acf5 (diff) | |
download | keymaster-df0fac0f9c9ea554abd8778c41f8711744edb9ce.tar.gz |
Merge "Align ARM Neon blocks to 16 bytes" am: bf1f16488d
am: 1f6ad22ce4
Change-Id: Iba1c5752405c174858df45c16bd3760163523444
-rw-r--r-- | key_blob_utils/ocb.c | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/key_blob_utils/ocb.c b/key_blob_utils/ocb.c index 1d3d6e3..9a68182 100644 --- a/key_blob_utils/ocb.c +++ b/key_blob_utils/ocb.c @@ -239,7 +239,7 @@ static inline block double_block(block b) { } #elif __ARM_NEON__ #include <arm_neon.h> -typedef int8x16_t block; /* Yay! Endian-neutral reads! */ +typedef int8x16_t block __attribute__ ((aligned (16))); /* Yay! Endian-neutral reads! */ #define xor_block(x, y) veorq_s8(x, y) #define zero_block() vdupq_n_s8(0) static inline int unequal_blocks(block a, block b) { @@ -672,6 +672,8 @@ ae_ctx* ae_allocate(void* misc) { #elif(__ALTIVEC__ && !__PPC64__) if (posix_memalign(&p, 16, sizeof(ae_ctx)) != 0) p = NULL; +#elif __ARM_NEON__ + p = memalign(16, sizeof(ae_ctx)); #else p = malloc(sizeof(ae_ctx)); #endif |