Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173109
b: refs/heads/master
c: 2d06ef7
h: refs/heads/master
i:
  173107: 4cd2a72
v: v3
  • Loading branch information
Herbert Xu committed Nov 1, 2009
1 parent 0ec17bf commit 8cbd89a
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 7 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 3e02e5cb47e049727a26c9c110867a26972bd0d6
refs/heads/master: 2d06ef7f42ed8c9969c9aa84e95df5d5c6378327
18 changes: 12 additions & 6 deletions trunk/arch/x86/crypto/ghash-clmulni-intel_asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -100,9 +100,11 @@ ENTRY(clmul_ghash_mul)
movups (%rdi), DATA
movups (%rsi), SHASH
movaps .Lbswap_mask, BSWAP
pshufb BSWAP, DATA
# pshufb BSWAP, DATA
.byte 0x66, 0x0f, 0x38, 0x00, 0xc5
call __clmul_gf128mul_ble
pshufb BSWAP, DATA
# pshufb BSWAP, DATA
.byte 0x66, 0x0f, 0x38, 0x00, 0xc5
movups DATA, (%rdi)
ret

Expand All @@ -116,18 +118,21 @@ ENTRY(clmul_ghash_update)
movaps .Lbswap_mask, BSWAP
movups (%rdi), DATA
movups (%rcx), SHASH
pshufb BSWAP, DATA
# pshufb BSWAP, DATA
.byte 0x66, 0x0f, 0x38, 0x00, 0xc5
.align 4
.Lupdate_loop:
movups (%rsi), IN1
pshufb BSWAP, IN1
# pshufb BSWAP, IN1
.byte 0x66, 0x0f, 0x38, 0x00, 0xf5
pxor IN1, DATA
call __clmul_gf128mul_ble
sub $16, %rdx
add $16, %rsi
cmp $16, %rdx
jge .Lupdate_loop
pshufb BSWAP, DATA
# pshufb BSWAP, DATA
.byte 0x66, 0x0f, 0x38, 0x00, 0xc5
movups DATA, (%rdi)
.Lupdate_just_ret:
ret
Expand All @@ -140,7 +145,8 @@ ENTRY(clmul_ghash_update)
ENTRY(clmul_ghash_setkey)
movaps .Lbswap_mask, BSWAP
movups (%rsi), %xmm0
pshufb BSWAP, %xmm0
# pshufb BSWAP, %xmm0
.byte 0x66, 0x0f, 0x38, 0x00, 0xc5
movaps %xmm0, %xmm1
psllq $1, %xmm0
psrlq $63, %xmm1
Expand Down

0 comments on commit 8cbd89a

Please sign in to comment.