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 aesarmv8: Issue two 4-register ld/st...



details:   https://anonhg.NetBSD.org/src/rev/019bf0e571b6
branches:  trunk
changeset: 954717:019bf0e571b6
user:      riastradh <riastradh%NetBSD.org@localhost>
date:      Tue Sep 08 23:57:43 2020 +0000

description:
aesarmv8: Issue two 4-register ld/st, not four 2-register ld/st.

diffstat:

 sys/crypto/aes/arch/arm/aes_armv8_64.S |  16 ++++++----------
 1 files changed, 6 insertions(+), 10 deletions(-)

diffs (44 lines):

diff -r 191c25d28752 -r 019bf0e571b6 sys/crypto/aes/arch/arm/aes_armv8_64.S
--- a/sys/crypto/aes/arch/arm/aes_armv8_64.S    Tue Sep 08 23:57:13 2020 +0000
+++ b/sys/crypto/aes/arch/arm/aes_armv8_64.S    Tue Sep 08 23:57:43 2020 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: aes_armv8_64.S,v 1.13 2020/09/08 23:57:13 riastradh Exp $      */
+/*     $NetBSD: aes_armv8_64.S,v 1.14 2020/09/08 23:57:43 riastradh Exp $      */
 
 /*-
  * Copyright (c) 2020 The NetBSD Foundation, Inc.
@@ -28,7 +28,7 @@
 
 #include <aarch64/asm.h>
 
-RCSID("$NetBSD: aes_armv8_64.S,v 1.13 2020/09/08 23:57:13 riastradh Exp $")
+RCSID("$NetBSD: aes_armv8_64.S,v 1.14 2020/09/08 23:57:43 riastradh Exp $")
 
        .arch_extension aes
 
@@ -693,10 +693,8 @@
        mov     v30.16b, v31.16b        /* q30 := tweak[6] */
        bl      aesarmv8_xts_mulx       /* q31 *= x; trash x0/q0/q1 */
                                        /* q31 := tweak[7] */
-       ld1     {v0.16b,v1.16b}, [x1], #0x20    /* q[i] := ptxt[i] */
-       ld1     {v2.16b,v3.16b}, [x1], #0x20
-       ld1     {v4.16b,v5.16b}, [x1], #0x20
-       ld1     {v6.16b,v7.16b}, [x1], #0x20
+       ld1     {v0.16b-v3.16b}, [x1], #0x40    /* q[i] := ptxt[i] */
+       ld1     {v4.16b-v7.16b}, [x1], #0x40
        eor     v0.16b, v0.16b, v24.16b /* q[i] := ptxt[i] ^ tweak[i] */
        eor     v1.16b, v1.16b, v25.16b
        eor     v2.16b, v2.16b, v26.16b
@@ -716,10 +714,8 @@
        eor     v5.16b, v5.16b, v29.16b
        eor     v6.16b, v6.16b, v30.16b
        eor     v7.16b, v7.16b, v31.16b
-       st1     {v0.16b,v1.16b}, [x2], #0x20    /* store ciphertext blocks */
-       st1     {v2.16b,v3.16b}, [x2], #0x20
-       st1     {v4.16b,v5.16b}, [x2], #0x20
-       st1     {v6.16b,v7.16b}, [x2], #0x20
+       st1     {v0.16b-v3.16b}, [x2], #0x40    /* store ciphertext blocks */
+       st1     {v4.16b-v7.16b}, [x2], #0x40
        bl      aesarmv8_xts_mulx       /* q31 *= x; trash x0/q0/q1 */
        subs    x10, x10, #0x80         /* count down nbytes */
        b.ne    1b                      /* repeat if more block groups */



Home | Main Index | Thread Index | Old Index