Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 173110
b: refs/heads/master
c: 3b0d659
h: refs/heads/master
v: v3
  • Loading branch information
Herbert Xu committed Nov 3, 2009
1 parent 8cbd89a commit fa59fbb
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 6 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: 2d06ef7f42ed8c9969c9aa84e95df5d5c6378327
refs/heads/master: 3b0d65969b549b796abc6f0230f6142fed365d49
11 changes: 6 additions & 5 deletions trunk/arch/x86/crypto/ghash-clmulni-intel_asm.S
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@
*/

#include <linux/linkage.h>
#include <asm/i387.h>

.align 16
.Lbswap_mask:
Expand Down Expand Up @@ -101,7 +102,7 @@ ENTRY(clmul_ghash_mul)
movups (%rsi), SHASH
movaps .Lbswap_mask, BSWAP
# pshufb BSWAP, DATA
.byte 0x66, 0x0f, 0x38, 0x00, 0xc5
PSHUFB_XMM5_XMM0
call __clmul_gf128mul_ble
# pshufb BSWAP, DATA
.byte 0x66, 0x0f, 0x38, 0x00, 0xc5
Expand All @@ -119,20 +120,20 @@ ENTRY(clmul_ghash_update)
movups (%rdi), DATA
movups (%rcx), SHASH
# pshufb BSWAP, DATA
.byte 0x66, 0x0f, 0x38, 0x00, 0xc5
PSHUFB_XMM5_XMM0
.align 4
.Lupdate_loop:
movups (%rsi), IN1
# pshufb BSWAP, IN1
.byte 0x66, 0x0f, 0x38, 0x00, 0xf5
PSHUFB_XMM5_XMM6
pxor IN1, DATA
call __clmul_gf128mul_ble
sub $16, %rdx
add $16, %rsi
cmp $16, %rdx
jge .Lupdate_loop
# pshufb BSWAP, DATA
.byte 0x66, 0x0f, 0x38, 0x00, 0xc5
PSHUFB_XMM5_XMM0
movups DATA, (%rdi)
.Lupdate_just_ret:
ret
Expand All @@ -146,7 +147,7 @@ ENTRY(clmul_ghash_setkey)
movaps .Lbswap_mask, BSWAP
movups (%rsi), %xmm0
# pshufb BSWAP, %xmm0
.byte 0x66, 0x0f, 0x38, 0x00, 0xc5
PSHUFB_XMM5_XMM0
movaps %xmm0, %xmm1
psllq $1, %xmm0
psrlq $63, %xmm1
Expand Down
7 changes: 7 additions & 0 deletions trunk/arch/x86/include/asm/i387.h
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@
#ifndef _ASM_X86_I387_H
#define _ASM_X86_I387_H

#ifndef __ASSEMBLY__

#include <linux/sched.h>
#include <linux/kernel_stat.h>
#include <linux/regset.h>
Expand Down Expand Up @@ -411,4 +413,9 @@ static inline unsigned short get_fpu_mxcsr(struct task_struct *tsk)
}
}

#endif /* __ASSEMBLY__ */

#define PSHUFB_XMM5_XMM0 .byte 0x66, 0x0f, 0x38, 0x00, 0xc5
#define PSHUFB_XMM5_XMM6 .byte 0x66, 0x0f, 0x38, 0x00, 0xf5

#endif /* _ASM_X86_I387_H */

0 comments on commit fa59fbb

Please sign in to comment.