[PATCH 1/3] camellia-gfni-avx512: remove copy-paste / leftover extra instructions

Jussi Kivilinna jussi.kivilinna at iki.fi
Thu Jun 30 09:14:01 CEST 2022


* cipher/camellia-gfni-avx512-amd64.S: Remove extranous copy-pasted
instructions after `.Lbswap128_mask` constant; Remove left-over plaintext
xorring in OCB encryption input loading macro.
--

Signed-off-by: Jussi Kivilinna <jussi.kivilinna at iki.fi>
---
 cipher/camellia-gfni-avx512-amd64.S | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/cipher/camellia-gfni-avx512-amd64.S b/cipher/camellia-gfni-avx512-amd64.S
index eb9c01f2..15b2dc90 100644
--- a/cipher/camellia-gfni-avx512-amd64.S
+++ b/cipher/camellia-gfni-avx512-amd64.S
@@ -1,4 +1,4 @@
-/* camellia-gfni-avx512-amd64.h - GFNI/AVX512 implementation of Camellia
+/* camellia-gfni-avx512-amd64.S - GFNI/AVX512 implementation of Camellia
  *
  * Copyright (C) 2022 Jussi Kivilinna <jussi.kivilinna at iki.fi>
  *
@@ -622,11 +622,6 @@ ELF(.type   _gcry_camellia_gfni_avx512__constants, at object;)
 .Lbswap128_mask:
 	.byte 15, 14, 13, 12, 11, 10, 9, 8, 7, 6, 5, 4, 3, 2, 1, 0
 
-	vbroadcasti64x2 .Lcounter4444_lo rRIP, %zmm22;
-	vbroadcasti64x2 .Lcounter8888_lo rRIP, %zmm23;
-	vbroadcasti64x2 .Lcounter16161616_lo rRIP, %zmm24;
-	vbroadcasti64x2 .Lcounter1111_hi rRIP, %zmm25;
-
 .Lbyte_ones:
 	.byte 1, 1, 1, 1, 1, 1, 1, 1
 
@@ -1155,7 +1150,6 @@ _gcry_camellia_gfni_avx512_ocb_enc:
 	  vinserti64x2 $2, %xmm30, %zmm16, %zmm16; \
 	  vpxorq (l3reg), %xmm30, %xmm30; \
 	  vinserti64x2 $3, %xmm30, %zmm16, %zmm16; \
-	  vpxorq zplain, %zmm31, %zmm31; \
 	  vpxorq zplain, %zmm16, zreg; \
 	  vmovdqu64 %zmm16, (n * 64)(%rsi);
 
-- 
2.34.1




More information about the Gcrypt-devel mailing list