]> www.infradead.org Git - users/dwmw2/linux.git/commitdiff
crypto: x86/crc32c - fix building with clang ias
authorArnd Bergmann <arnd@arndb.de>
Wed, 27 May 2020 14:17:40 +0000 (16:17 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 23 Jan 2021 14:49:55 +0000 (15:49 +0100)
commit 44623b2818f4a442726639572f44fd9b6d0ef68c upstream.

The clang integrated assembler complains about movzxw:

arch/x86/crypto/crc32c-pcl-intel-asm_64.S:173:2: error: invalid instruction mnemonic 'movzxw'

It seems that movzwq is the mnemonic that it expects instead,
and this is what objdump prints when disassembling the file.

Fixes: 6a8ce1ef3940 ("crypto: crc32c - Optimize CRC32C calculation with PCLMULQDQ instruction")
Signed-off-by: Arnd Bergmann <arnd@arndb.de>
Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
[jc: Fixed conflicts due to lack of 34fdce6981b9 ("x86: Change {JMP,CALL}_NOSPEC argument")]
Signed-off-by: Jian Cai <jiancai@google.com>
Cc: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
arch/x86/crypto/crc32c-pcl-intel-asm_64.S

index d9b734d0c8cc78ecdc3293ca117546eb538a12fc..3c6e01520a973c25fed6c62699c3157963b2871f 100644 (file)
@@ -170,7 +170,7 @@ continue_block:
 
        ## branch into array
        lea     jump_table(%rip), bufp
-       movzxw  (bufp, %rax, 2), len
+       movzwq  (bufp, %rax, 2), len
        lea     crc_array(%rip), bufp
        lea     (bufp, len, 1), bufp
        JMP_NOSPEC bufp