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 Use a working macro to detect big...



details:   https://anonhg.NetBSD.org/src/rev/d7f5fef8f0ea
branches:  trunk
changeset: 954649:d7f5fef8f0ea
user:      jakllsch <jakllsch%NetBSD.org@localhost>
date:      Mon Sep 07 18:05:17 2020 +0000

description:
Use a working macro to detect big endian aarch64.

Fixes aarch64eb NEON ChaCha.

diffstat:

 sys/crypto/chacha/arch/arm/chacha_neon_64.S |  12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diffs (35 lines):

diff -r 17cbce0af92f -r d7f5fef8f0ea sys/crypto/chacha/arch/arm/chacha_neon_64.S
--- a/sys/crypto/chacha/arch/arm/chacha_neon_64.S       Mon Sep 07 13:19:20 2020 +0000
+++ b/sys/crypto/chacha/arch/arm/chacha_neon_64.S       Mon Sep 07 18:05:17 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: chacha_neon_64.S,v 1.6 2020/08/08 14:47:01 riastradh Exp $     */
+/*     $NetBSD: chacha_neon_64.S,v 1.7 2020/09/07 18:05:17 jakllsch Exp $      */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
 
 #include <aarch64/asm.h>
 
-RCSID("$NetBSD: chacha_neon_64.S,v 1.6 2020/08/08 14:47:01 riastradh Exp $")
+RCSID("$NetBSD: chacha_neon_64.S,v 1.7 2020/09/07 18:05:17 jakllsch Exp $")
 
 #define        ROUND(a0,b0,c0,d0,a1,b1,c1,d1,a2,b2,c2,d2,a3,b3,c3,d3,t0,t1,t2,t3, r) \
 STEP(STEP0,a0,b0,c0,d0,a1,b1,c1,d1,a2,b2,c2,d2,a3,b3,c3,d3,t0,t1,t2,t3, r);   \
@@ -130,12 +130,12 @@
 #define        STEP19(a,b,c,d, t, r)   /* nothing */
 #endif
 
-#if _BYTE_ORDER == _LITTLE_ENDIAN
-#define        HTOLE32(x)
-#define        LE32TOH(x)
-#elif _BYTE_ORDER == _BIG_ENDIAN
+#if defined(__AARCH64EB__)
 #define        HTOLE32(x)      rev32   x, x
 #define        LE32TOH(x)      rev32   x, x
+#else
+#define        LE32TOH(x)
+#define        HTOLE32(x)
 #endif
 
 /*



Home | Main Index | Thread Index | Old Index