ICP: AES-GCM assembly: remove unused Gmul functions

In the AES-GCM assembly files we are defining Gmul functions we
don't use anywhere.

Just remove the dead code.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Attila Fülöp <attila@fueloep.org>
Closes #18226
This commit is contained in:
Attila Fülöp 2026-02-19 19:10:02 +01:00 committed by GitHub
parent 370570890f
commit c8a72a27e5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 0 additions and 101 deletions

View File

@ -159,42 +159,6 @@ ENDBR
.cfi_endproc
SET_SIZE(gcm_init_vpclmulqdq_avx2)
ENTRY_ALIGN(gcm_gmult_vpclmulqdq_avx2, 32)
.cfi_startproc
ENDBR
vmovdqu (%rdi),%xmm0
vmovdqu .Lbswap_mask(%rip),%xmm1
vmovdqu 128-16(%rsi),%xmm2
vmovdqu .Lgfpoly(%rip),%xmm3
vpshufb %xmm1,%xmm0,%xmm0
vpclmulqdq $0x00,%xmm2,%xmm0,%xmm4
vpclmulqdq $0x01,%xmm2,%xmm0,%xmm5
vpclmulqdq $0x10,%xmm2,%xmm0,%xmm6
vpxor %xmm6,%xmm5,%xmm5
vpclmulqdq $0x01,%xmm4,%xmm3,%xmm6
vpshufd $0x4e,%xmm4,%xmm4
vpxor %xmm4,%xmm5,%xmm5
vpxor %xmm6,%xmm5,%xmm5
vpclmulqdq $0x11,%xmm2,%xmm0,%xmm0
vpclmulqdq $0x01,%xmm5,%xmm3,%xmm4
vpshufd $0x4e,%xmm5,%xmm5
vpxor %xmm5,%xmm0,%xmm0
vpxor %xmm4,%xmm0,%xmm0
vpshufb %xmm1,%xmm0,%xmm0
vmovdqu %xmm0,(%rdi)
RET
.cfi_endproc
SET_SIZE(gcm_gmult_vpclmulqdq_avx2)
ENTRY_ALIGN(gcm_ghash_vpclmulqdq_avx2, 32)
.cfi_startproc

View File

@ -103,63 +103,6 @@
.text
/* Windows userland links with OpenSSL */
#if !defined (_WIN32) || defined (_KERNEL)
ENTRY_ALIGN(gcm_gmult_clmul, 16)
.cfi_startproc
ENDBR
.L_gmult_clmul:
movdqu (%rdi),%xmm0
movdqa .Lbswap_mask(%rip),%xmm5
movdqu (%rsi),%xmm2
movdqu 32(%rsi),%xmm4
.byte 102,15,56,0,197
movdqa %xmm0,%xmm1
pshufd $78,%xmm0,%xmm3
pxor %xmm0,%xmm3
.byte 102,15,58,68,194,0
.byte 102,15,58,68,202,17
.byte 102,15,58,68,220,0
pxor %xmm0,%xmm3
pxor %xmm1,%xmm3
movdqa %xmm3,%xmm4
psrldq $8,%xmm3
pslldq $8,%xmm4
pxor %xmm3,%xmm1
pxor %xmm4,%xmm0
movdqa %xmm0,%xmm4
movdqa %xmm0,%xmm3
psllq $5,%xmm0
pxor %xmm0,%xmm3
psllq $1,%xmm0
pxor %xmm3,%xmm0
psllq $57,%xmm0
movdqa %xmm0,%xmm3
pslldq $8,%xmm0
psrldq $8,%xmm3
pxor %xmm4,%xmm0
pxor %xmm3,%xmm1
movdqa %xmm0,%xmm4
psrlq $1,%xmm0
pxor %xmm4,%xmm1
pxor %xmm0,%xmm4
psrlq $5,%xmm0
pxor %xmm4,%xmm0
psrlq $1,%xmm0
pxor %xmm1,%xmm0
.byte 102,15,56,0,197
movdqu %xmm0,(%rdi)
RET
.cfi_endproc
SET_SIZE(gcm_gmult_clmul)
#endif /* !_WIN32 || _KERNEL */
ENTRY_ALIGN(gcm_init_htab_avx, 32)
.cfi_startproc
ENDBR
@ -272,13 +215,6 @@ ENTRY_ALIGN(gcm_init_htab_avx, 32)
SET_SIZE(gcm_init_htab_avx)
#if !defined (_WIN32) || defined (_KERNEL)
ENTRY_ALIGN(gcm_gmult_avx, 32)
.cfi_startproc
ENDBR
jmp .L_gmult_clmul
.cfi_endproc
SET_SIZE(gcm_gmult_avx)
ENTRY_ALIGN(gcm_ghash_avx, 32)
.cfi_startproc
ENDBR

View File

@ -33,7 +33,6 @@
/* module/icp/asm-x86_64/modes/aesni-gcm-avx2-vaes.S */
#define gcm_init_vpclmulqdq_avx2 icp_gcm_init_vpclmulqdq_avx2
#define gcm_gmult_vpclmulqdq_avx2 icp_gcm_gmult_vpclmulqdq_avx2
#define gcm_ghash_vpclmulqdq_avx2 icp_gcm_ghash_vpclmulqdq_avx2
#define aes_gcm_enc_update_vaes_avx2 icp_aes_gcm_enc_update_vaes_avx2
#define aes_gcm_dec_update_vaes_avx2 icp_aes_gcm_dec_update_vaes_avx2