Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1633006
| From | Sabrina Dubroca <sd@queasysnail.net> |
|---|---|
| Newsgroups | linux.kernel |
| Subject | [PATCH 6/7] crypto: aesni: make AVX2 AES-GCM work with all valid auth_tag_len |
| Date | 2017-04-28 18:20 +0200 |
| Message-ID | <tBgMG-1o8-27@gated-at.bofh.it> (permalink) |
| References | <tBgMF-1o8-1@gated-at.bofh.it> |
| Organization | linux.* mail to news gateway |
Signed-off-by: Sabrina Dubroca <sd@queasysnail.net>
---
arch/x86/crypto/aesni-intel_avx-x86_64.S | 31 ++++++++++++++++++++++++-------
1 file changed, 24 insertions(+), 7 deletions(-)
diff --git a/arch/x86/crypto/aesni-intel_avx-x86_64.S b/arch/x86/crypto/aesni-intel_avx-x86_64.S
index 7230808a7cef..faecb1518bf8 100644
--- a/arch/x86/crypto/aesni-intel_avx-x86_64.S
+++ b/arch/x86/crypto/aesni-intel_avx-x86_64.S
@@ -2804,19 +2804,36 @@ ENDPROC(aesni_gcm_dec_avx_gen2)
cmp $16, %r11
je _T_16\@
- cmp $12, %r11
- je _T_12\@
+ cmp $8, %r11
+ jl _T_4\@
_T_8\@:
vmovq %xmm9, %rax
mov %rax, (%r10)
- jmp _return_T_done\@
-_T_12\@:
- vmovq %xmm9, %rax
- mov %rax, (%r10)
+ add $8, %r10
+ sub $8, %r11
vpsrldq $8, %xmm9, %xmm9
+ cmp $0, %r11
+ je _return_T_done\@
+_T_4\@:
vmovd %xmm9, %eax
- mov %eax, 8(%r10)
+ mov %eax, (%r10)
+ add $4, %r10
+ sub $4, %r11
+ vpsrldq $4, %xmm9, %xmm9
+ cmp $0, %r11
+ je _return_T_done\@
+_T_123\@:
+ vmovd %xmm9, %eax
+ cmp $2, %r11
+ jl _T_1\@
+ mov %ax, (%r10)
+ cmp $2, %r11
+ je _return_T_done\@
+ add $2, %r10
+ sar $16, %eax
+_T_1\@:
+ mov %al, (%r10)
jmp _return_T_done\@
_T_16\@:
--
2.12.2
Back to linux.kernel | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
[PATCH 0/7] crypto: aesni: provide generic gcm(aes) Sabrina Dubroca <sd@queasysnail.net> - 2017-04-28 18:20 +0200 [PATCH 5/7] crypto: aesni: make AVX2 AES-GCM work with any aadlen Sabrina Dubroca <sd@queasysnail.net> - 2017-04-28 18:20 +0200 [PATCH 4/7] crypto: aesni: make AVX AES-GCM work with all valid auth_tag_len Sabrina Dubroca <sd@queasysnail.net> - 2017-04-28 18:20 +0200 [PATCH 3/7] crypto: aesni: make AVX AES-GCM work with any aadlen Sabrina Dubroca <sd@queasysnail.net> - 2017-04-28 18:20 +0200 [PATCH 2/7] crypto: aesni: make non-AVX AES-GCM work with all valid auth_tag_len Sabrina Dubroca <sd@queasysnail.net> - 2017-04-28 18:20 +0200 [PATCH 6/7] crypto: aesni: make AVX2 AES-GCM work with all valid auth_tag_len Sabrina Dubroca <sd@queasysnail.net> - 2017-04-28 18:20 +0200 [PATCH 1/7] crypto: aesni: make non-AVX AES-GCM work with any aadlen Sabrina Dubroca <sd@queasysnail.net> - 2017-04-28 18:20 +0200 [PATCH 7/7] crypto: aesni: add generic gcm(aes) Sabrina Dubroca <sd@queasysnail.net> - 2017-04-28 18:20 +0200
csiph-web