diff options
Diffstat (limited to 'arch/x86/crypto/crc32c-pcl-intel-asm_64.S')
-rw-r--r-- | arch/x86/crypto/crc32c-pcl-intel-asm_64.S | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S b/arch/x86/crypto/crc32c-pcl-intel-asm_64.S index cf1a7ec4cc3a..dbc4339b5417 100644 --- a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S +++ b/arch/x86/crypto/crc32c-pcl-intel-asm_64.S | |||
@@ -1,9 +1,10 @@ | |||
1 | /* | 1 | /* |
2 | * Implement fast CRC32C with PCLMULQDQ instructions. (x86_64) | 2 | * Implement fast CRC32C with PCLMULQDQ instructions. (x86_64) |
3 | * | 3 | * |
4 | * The white paper on CRC32C calculations with PCLMULQDQ instruction can be | 4 | * The white papers on CRC32C calculations with PCLMULQDQ instruction can be |
5 | * downloaded from: | 5 | * downloaded from: |
6 | * http://download.intel.com/design/intarch/papers/323405.pdf | 6 | * http://www.intel.com/content/dam/www/public/us/en/documents/white-papers/crc-iscsi-polynomial-crc32-instruction-paper.pdf |
7 | * http://www.intel.com/content/dam/www/public/us/en/documents/white-papers/fast-crc-computation-paper.pdf | ||
7 | * | 8 | * |
8 | * Copyright (C) 2012 Intel Corporation. | 9 | * Copyright (C) 2012 Intel Corporation. |
9 | * | 10 | * |
@@ -42,6 +43,7 @@ | |||
42 | * SOFTWARE. | 43 | * SOFTWARE. |
43 | */ | 44 | */ |
44 | 45 | ||
46 | #include <asm/inst.h> | ||
45 | #include <linux/linkage.h> | 47 | #include <linux/linkage.h> |
46 | 48 | ||
47 | ## ISCSI CRC 32 Implementation with crc32 and pclmulqdq Instruction | 49 | ## ISCSI CRC 32 Implementation with crc32 and pclmulqdq Instruction |
@@ -225,10 +227,10 @@ LABEL crc_ %i | |||
225 | movdqa (bufp), %xmm0 # 2 consts: K1:K2 | 227 | movdqa (bufp), %xmm0 # 2 consts: K1:K2 |
226 | 228 | ||
227 | movq crc_init, %xmm1 # CRC for block 1 | 229 | movq crc_init, %xmm1 # CRC for block 1 |
228 | pclmulqdq $0x00,%xmm0,%xmm1 # Multiply by K2 | 230 | PCLMULQDQ 0x00,%xmm0,%xmm1 # Multiply by K2 |
229 | 231 | ||
230 | movq crc1, %xmm2 # CRC for block 2 | 232 | movq crc1, %xmm2 # CRC for block 2 |
231 | pclmulqdq $0x10, %xmm0, %xmm2 # Multiply by K1 | 233 | PCLMULQDQ 0x10, %xmm0, %xmm2 # Multiply by K1 |
232 | 234 | ||
233 | pxor %xmm2,%xmm1 | 235 | pxor %xmm2,%xmm1 |
234 | movq %xmm1, %rax | 236 | movq %xmm1, %rax |