aboutsummaryrefslogtreecommitdiffstats
path: root/arch/x86/crypto
diff options
context:
space:
mode:
authorHerbert Xu <herbert@gondor.apana.org.au>2009-11-01 12:49:44 -0500
committerHerbert Xu <herbert@gondor.apana.org.au>2009-11-01 12:49:44 -0500
commit2d06ef7f42ed8c9969c9aa84e95df5d5c6378327 (patch)
tree20ff0f62949a957225cd1a021e20464cf85247a4 /arch/x86/crypto
parent3e02e5cb47e049727a26c9c110867a26972bd0d6 (diff)
crypto: ghash-intel - Hard-code pshufb
Old gases don't have a clue what pshufb stands for so we have to hard-code it for now. Reported-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Diffstat (limited to 'arch/x86/crypto')
-rw-r--r--arch/x86/crypto/ghash-clmulni-intel_asm.S18
1 files changed, 12 insertions, 6 deletions
diff --git a/arch/x86/crypto/ghash-clmulni-intel_asm.S b/arch/x86/crypto/ghash-clmulni-intel_asm.S
index b9e787a511da..71768d543dbb 100644
--- a/arch/x86/crypto/ghash-clmulni-intel_asm.S
+++ b/arch/x86/crypto/ghash-clmulni-intel_asm.S
@@ -100,9 +100,11 @@ ENTRY(clmul_ghash_mul)
100 movups (%rdi), DATA 100 movups (%rdi), DATA
101 movups (%rsi), SHASH 101 movups (%rsi), SHASH
102 movaps .Lbswap_mask, BSWAP 102 movaps .Lbswap_mask, BSWAP
103 pshufb BSWAP, DATA 103 # pshufb BSWAP, DATA
104 .byte 0x66, 0x0f, 0x38, 0x00, 0xc5
104 call __clmul_gf128mul_ble 105 call __clmul_gf128mul_ble
105 pshufb BSWAP, DATA 106 # pshufb BSWAP, DATA
107 .byte 0x66, 0x0f, 0x38, 0x00, 0xc5
106 movups DATA, (%rdi) 108 movups DATA, (%rdi)
107 ret 109 ret
108 110
@@ -116,18 +118,21 @@ ENTRY(clmul_ghash_update)
116 movaps .Lbswap_mask, BSWAP 118 movaps .Lbswap_mask, BSWAP
117 movups (%rdi), DATA 119 movups (%rdi), DATA
118 movups (%rcx), SHASH 120 movups (%rcx), SHASH
119 pshufb BSWAP, DATA 121 # pshufb BSWAP, DATA
122 .byte 0x66, 0x0f, 0x38, 0x00, 0xc5
120.align 4 123.align 4
121.Lupdate_loop: 124.Lupdate_loop:
122 movups (%rsi), IN1 125 movups (%rsi), IN1
123 pshufb BSWAP, IN1 126 # pshufb BSWAP, IN1
127 .byte 0x66, 0x0f, 0x38, 0x00, 0xf5
124 pxor IN1, DATA 128 pxor IN1, DATA
125 call __clmul_gf128mul_ble 129 call __clmul_gf128mul_ble
126 sub $16, %rdx 130 sub $16, %rdx
127 add $16, %rsi 131 add $16, %rsi
128 cmp $16, %rdx 132 cmp $16, %rdx
129 jge .Lupdate_loop 133 jge .Lupdate_loop
130 pshufb BSWAP, DATA 134 # pshufb BSWAP, DATA
135 .byte 0x66, 0x0f, 0x38, 0x00, 0xc5
131 movups DATA, (%rdi) 136 movups DATA, (%rdi)
132.Lupdate_just_ret: 137.Lupdate_just_ret:
133 ret 138 ret
@@ -140,7 +145,8 @@ ENTRY(clmul_ghash_update)
140ENTRY(clmul_ghash_setkey) 145ENTRY(clmul_ghash_setkey)
141 movaps .Lbswap_mask, BSWAP 146 movaps .Lbswap_mask, BSWAP
142 movups (%rsi), %xmm0 147 movups (%rsi), %xmm0
143 pshufb BSWAP, %xmm0 148 # pshufb BSWAP, %xmm0
149 .byte 0x66, 0x0f, 0x38, 0x00, 0xc5
144 movaps %xmm0, %xmm1 150 movaps %xmm0, %xmm1
145 psllq $1, %xmm0 151 psllq $1, %xmm0
146 psrlq $63, %xmm1 152 psrlq $63, %xmm1