Source-Changes-HG archive

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

[src/trunk]: src/sys/crypto/chacha/arch/arm Fix big-endian build with appropr...



details:   https://anonhg.NetBSD.org/src/rev/635b96f24982
branches:  trunk
changeset: 974357:635b96f24982
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Jul 28 20:05:33 2020 +0000

description:
Fix big-endian build with appropriate casts around vrev32q_u8.

diffstat:

 sys/crypto/chacha/arch/arm/chacha_neon.c |  6 +++---
 1 files changed, 3 insertions(+), 3 deletions(-)

diffs (27 lines):

diff -r d6b9c2c0cdfe -r 635b96f24982 sys/crypto/chacha/arch/arm/chacha_neon.c
--- a/sys/crypto/chacha/arch/arm/chacha_neon.c  Tue Jul 28 19:39:43 2020 +0000
+++ b/sys/crypto/chacha/arch/arm/chacha_neon.c  Tue Jul 28 20:05:33 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: chacha_neon.c,v 1.5 2020/07/27 20:58:56 riastradh Exp $        */
+/*     $NetBSD: chacha_neon.c,v 1.6 2020/07/28 20:05:33 riastradh Exp $        */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -53,7 +53,7 @@
 #if _BYTE_ORDER == _LITTLE_ENDIAN
        return x;
 #elif _BYTE_ORDER == _BIG_ENDIAN
-       return vrev32q_u8(x);
+       return vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(x)));
 #endif
 }
 
@@ -63,7 +63,7 @@
 #if _BYTE_ORDER == _LITTLE_ENDIAN
        return x;
 #elif _BYTE_ORDER == _BIG_ENDIAN
-       return vrev32q_u8(x);
+       return vreinterpretq_u32_u8(vrev32q_u8(vreinterpretq_u8_u32(x)));
 #endif
 }
 



Home | Main Index | Thread Index | Old Index