All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] x86: crypto: fix building crc32c with clang ias
@ 2020-05-27 14:17 Arnd Bergmann
  2020-05-27 16:42 ` Nathan Chancellor
  2020-07-23  7:56 ` Herbert Xu
  0 siblings, 2 replies; 6+ messages in thread
From: Arnd Bergmann @ 2020-05-27 14:17 UTC (permalink / raw)
  To: Herbert Xu, David S. Miller, Thomas Gleixner, Ingo Molnar,
	Borislav Petkov, x86, Tim Chen
  Cc: Arnd Bergmann, H. Peter Anvin, Boris Ostrovsky,
	Rafael J. Wysocki, Josh Poimboeuf, Jiri Slaby, Peter Zijlstra,
	linux-crypto, linux-kernel, clang-built-linux

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>
---
 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


^ permalink raw reply related	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2020-07-23  8:18 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-05-27 14:17 [PATCH] x86: crypto: fix building crc32c with clang ias Arnd Bergmann
2020-05-27 16:42 ` Nathan Chancellor
2020-05-27 18:24   ` Arnd Bergmann
2020-05-27 19:34     ` Nathan Chancellor
2020-07-23  7:56 ` Herbert Xu
2020-07-23  8:18   ` Sedat Dilek

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.