Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/crypto/aes/arch/arm Fix missing clang big-endian case.



details:   https://anonhg.NetBSD.org/src/rev/cc60904b880c
branches:  trunk
changeset: 1012195:cc60904b880c
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Sat Jul 25 22:42:31 2020 +0000

description:
Fix missing clang big-endian case.

diffstat:

 sys/crypto/aes/arch/arm/arm_neon.h |  11 ++++++++---
 1 files changed, 8 insertions(+), 3 deletions(-)

diffs (32 lines):

diff -r 105db4eefeca -r cc60904b880c sys/crypto/aes/arch/arm/arm_neon.h
--- a/sys/crypto/aes/arch/arm/arm_neon.h        Sat Jul 25 22:42:03 2020 +0000
+++ b/sys/crypto/aes/arch/arm/arm_neon.h        Sat Jul 25 22:42:31 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: arm_neon.h,v 1.4 2020/07/25 22:36:06 riastradh Exp $   */
+/*     $NetBSD: arm_neon.h,v 1.5 2020/07/25 22:42:31 riastradh Exp $   */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -237,7 +237,12 @@
        return (uint8x16_t)__builtin_neon_vld1v16qi(__p);
 #endif
 #elif defined(__clang__)
-       return (uint8x16_t)__builtin_neon_vld1q_v(__p8, 48);
+       uint8x16_t __v = (uint8x16_t)__builtin_neon_vld1q_v(__p8, 48);
+#ifndef __LITTLE_ENDIAN__
+       __v = __builtin_shufflevector(__v, __v,
+           15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0);
+#endif
+       return __v;
 #endif
 }
 
@@ -442,7 +447,7 @@
 #elif defined(__clang__)
 #ifndef __LITTLE_ENDIAN__
        __v = __builtin_shufflevector(__v, __v,
-           15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0);
+           15,14,13,12,11,10,9,8,7,6,5,4,3,2,1,0);
 #endif
        __builtin_neon_vst1q_v(__p8, __v, 48);
 #endif



Home | Main Index | Thread Index | Old Index