lkml.org 
[lkml]   [2020]   [May]   [27]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: [PATCH] x86: crypto: fix building crc32c with clang ias
On Wed, May 27, 2020 at 04:17:40PM +0200, Arnd Bergmann wrote:
> 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>

We had an identical patch pending from another contributor, see the
discussion and result in the issue below.

https://github.com/ClangBuiltLinux/linux/issues/1010

Reviewed-by: Nathan Chancellor <natechancellor@gmail.com>

> ---
> arch/x86/crypto/crc32c-pcl-intel-asm_64.S | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S b/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
> index 8501ec4532f4..442599cbe796 100644
> --- a/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
> +++ b/arch/x86/crypto/crc32c-pcl-intel-asm_64.S
> @@ -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
> --
> 2.26.2
>

\
 
 \ /
  Last update: 2020-05-27 18:42    [W:0.080 / U:0.324 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site