* [PATCH 2/2] crypto: s(h)aving 16 byte constant off arch/x86/crypto/sha1_ni_asm.S
@ 2024-04-08 9:38 Stefan Kanthak
0 siblings, 0 replies; only message in thread
From: Stefan Kanthak @ 2024-04-08 9:38 UTC (permalink / raw)
To: linux-kernel; +Cc: tim.c.chen, sean.m.gulley
Get rid of 16 byte constant, use shift instead of mask
--- -/arch/x86/crypto/sha1_ni_asm.S
+++ +/arch/x86/crypto/sha1_ni_asm.S
@@ -104,9 +104,9 @@
add DATA_PTR, NUM_BLKS /* pointer to end of data */
/* load initial hash values */
- pinsrd $3, 1*16(DIGEST_PTR), E0
+ pinsrd $0, 1*16(DIGEST_PTR), E0
movdqu 0*16(DIGEST_PTR), ABCD
- pand UPPER_WORD_MASK(%rip), E0
+ pslldq $12, E0
pshufd $0x1B, ABCD, ABCD
movdqa PSHUFFLE_BYTE_FLIP_MASK(%rip), SHUF_MASK
@@ -297,8 +297,3 @@
.align 16
PSHUFFLE_BYTE_FLIP_MASK:
.octa 0x000102030405060708090a0b0c0d0e0f
-
-.section .rodata.cst16.UPPER_WORD_MASK, "aM", @progbits, 16
-.align 16
-UPPER_WORD_MASK:
- .octa 0xFFFFFFFF000000000000000000000000
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2024-04-08 9:55 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-04-08 9:38 [PATCH 2/2] crypto: s(h)aving 16 byte constant off arch/x86/crypto/sha1_ni_asm.S Stefan Kanthak
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox