diff options
| author | Mustafa Yigit Bilgen <mbilgen@gpartner-nvidia.com> | 2018-12-03 18:31:30 -0800 |
|---|---|---|
| committer | android-build-merger <android-build-merger@google.com> | 2018-12-03 18:31:30 -0800 |
| commit | 3f4cdcd166f381ec53b9e340fe3e0d8dfe8b5ee0 (patch) | |
| tree | 6d61864b509d96c0d059b204237f6137006b0e65 | |
| parent | 35975965acd9072b692c1bf1e59bb86ea4a54c60 (diff) | |
| parent | df0fac0f9c9ea554abd8778c41f8711744edb9ce (diff) | |
| download | android_system_keymaster-3f4cdcd166f381ec53b9e340fe3e0d8dfe8b5ee0.tar.gz android_system_keymaster-3f4cdcd166f381ec53b9e340fe3e0d8dfe8b5ee0.tar.bz2 android_system_keymaster-3f4cdcd166f381ec53b9e340fe3e0d8dfe8b5ee0.zip | |
Merge "Align ARM Neon blocks to 16 bytes" am: bf1f16488d am: 1f6ad22ce4
am: df0fac0f9c
Change-Id: I3ca77f508f5ae8c94053757b1265cd348e51f169
| -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 |
