summaryrefslogtreecommitdiff
path: root/cipher
diff options
context:
space:
mode:
authorJussi Kivilinna <jussi.kivilinna@iki.fi>2023-01-17 20:44:23 +0200
committerJussi Kivilinna <jussi.kivilinna@iki.fi>2023-01-19 18:57:40 +0200
commit65f52773d4bb59a4ea4b7e373fe79b3559ddf312 (patch)
treed962a80f2e2e2be85ef5ad8743fb24d01327033c /cipher
parentd0a109148b799e6ba24bb0e030009e5ac3eaf5dc (diff)
downloadlibgcrypt-65f52773d4bb59a4ea4b7e373fe79b3559ddf312.tar.gz
s390x-asm: move constant data to read-only section
* cipher/chacha20-s390x.S: Move constant data to read-only section; Align functions to 16 bytes. * cipher/poly1305-s390x.S: Likewise. -- Signed-off-by: Jussi Kivilinna <jussi.kivilinna@iki.fi>
Diffstat (limited to 'cipher')
-rw-r--r--cipher/chacha20-s390x.S15
-rw-r--r--cipher/poly1305-s390x.S2
2 files changed, 11 insertions, 6 deletions
diff --git a/cipher/chacha20-s390x.S b/cipher/chacha20-s390x.S
index 9b1d59c6..5a931998 100644
--- a/cipher/chacha20-s390x.S
+++ b/cipher/chacha20-s390x.S
@@ -26,9 +26,12 @@
#include "asm-poly1305-s390x.h"
.machine "z13+vx"
-.text
+.section .rodata
+
+ELF(.type _gcry_chacha20_s390x_vx_constants,@function;)
.balign 16
+_gcry_chacha20_s390x_vx_constants:
.Lconsts:
.Lwordswap:
.byte 12, 13, 14, 15, 8, 9, 10, 11, 4, 5, 6, 7, 0, 1, 2, 3
@@ -302,7 +305,9 @@
4-way && 2-way && 1-way chacha20 ("horizontal")
**********************************************************************/
-.balign 8
+.text
+
+.balign 16
.globl _gcry_chacha20_s390x_vx_blocks4_2_1
ELF(.type _gcry_chacha20_s390x_vx_blocks4_2_1,@function;)
@@ -578,7 +583,7 @@ ELF(.size _gcry_chacha20_s390x_vx_blocks4_2_1,
4-way && 2-way && 1-way stitched chacha20-poly1305 ("horizontal")
**********************************************************************/
-.balign 8
+.balign 16
.globl _gcry_chacha20_poly1305_s390x_vx_blocks4_2_1
ELF(.type _gcry_chacha20_poly1305_s390x_vx_blocks4_2_1,@function;)
@@ -1058,7 +1063,7 @@ ELF(.size _gcry_chacha20_poly1305_s390x_vx_blocks4_2_1,
vpdi vc, tmpc, vd, 0; \
vpdi vd, tmpc, vd, 5;
-.balign 8
+.balign 16
.globl _gcry_chacha20_s390x_vx_blocks8
ELF(.type _gcry_chacha20_s390x_vx_blocks8,@function;)
@@ -1276,7 +1281,7 @@ ELF(.size _gcry_chacha20_s390x_vx_blocks8,
8-way stitched chacha20-poly1305 ("vertical")
**********************************************************************/
-.balign 8
+.balign 16
.globl _gcry_chacha20_poly1305_s390x_vx_blocks8
ELF(.type _gcry_chacha20_poly1305_s390x_vx_blocks8,@function;)
diff --git a/cipher/poly1305-s390x.S b/cipher/poly1305-s390x.S
index 28bed560..5ba424e4 100644
--- a/cipher/poly1305-s390x.S
+++ b/cipher/poly1305-s390x.S
@@ -26,7 +26,7 @@
.text
-.balign 8
+.balign 16
.globl _gcry_poly1305_s390x_blocks1
ELF(.type _gcry_poly1305_s390x_blocks1,@function;)