New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[Linux kernel] clang fails to compile aes_ni in linux kernel with integrated-as used #24868
Comments
This also fails when not using the integrated as. This was called a clang preprocessor bug here: https://lists.linuxfoundation.org/pipermail/llvmlinux/2014-December/001128.html If you change aes_ctrby8_avx-x86_64.S from |
The original error still happens with clang 4.0 (post-rc1 release_40 branch, rev. 293332), but getting rid of the space in the XMM macro as described in comment 1 "fixes" it now. |
It looks now like the error for this file with Clang's integrated assembler is different. With this patch https://lore.kernel.org/patchwork/patch/1261086/ (not accepted yet), I can assemble arch/x86/crypto/aes_ctrby8_avx-x86_64.o with Clang's integrated assembler. With that and https://lore.kernel.org/lkml/20200624051538.5355-1-sedat.dilek@gmail.com/ (not accepted yet), I can assemble that whole config CONFIG_CRYPTO_AES_NI_INTEL=y with Clang's IA. |
Patch accepted in cryptodev-2.6.git: |
Second patch accepted in cryptodev-2.6.git |
Both patches now in Linus Git. crypto: aesni - add compatibility with IAS (see [1]) Please close, thanks. [1] https://git.kernel.org/linus/44069737ac9625a0f02f0f7f5ab96aae4cd819bc |
mentioned in issue #4440 |
Extended Description
Clang HEAD, Linux HEAD used.
we fail to compile arch/x86/crypto/aes_ctrby8_avx-x86_64.S (crypto AES_NI implementation).
arch/x86/crypto/aes_ctrby8_avx-x86_64.S attached.
AS [M] arch/x86/crypto/aes_ctrby8_avx-x86_64.o
arch/x86/crypto/aes_ctrby8_avx-x86_64.S: Assembler messages:
arch/x86/crypto/aes_ctrby8_avx-x86_64.S:552: Error: bad expression
arch/x86/crypto/aes_ctrby8_avx-x86_64.S:552: Error: junk at end of line, first unrecognized character is
x' arch/x86/crypto/aes_ctrby8_avx-x86_64.S:552: Error: too many memory references for
vaesenc'arch/x86/crypto/aes_ctrby8_avx-x86_64.S:552: Error: bad expression
arch/x86/crypto/aes_ctrby8_avx-x86_64.S:552: Error: junk at end of line, first unrecognized character is
x' arch/x86/crypto/aes_ctrby8_avx-x86_64.S:552: Error: too many memory references for
vaesenc'arch/x86/crypto/aes_ctrby8_avx-x86_64.S:552: Error: bad expression
arch/x86/crypto/aes_ctrby8_avx-x86_64.S:552: Error: junk at end of line, first unrecognized character is
x' arch/x86/crypto/aes_ctrby8_avx-x86_64.S:552: Error: too many memory references for
vaesenc'arch/x86/crypto/aes_ctrby8_avx-x86_64.S:552: Error: bad expression
arch/x86/crypto/aes_ctrby8_avx-x86_64.S:552: Error: junk at end of line, first unrecognized character is
x' arch/x86/crypto/aes_ctrby8_avx-x86_64.S:552: Error: too many memory references for
vaesenc'arch/x86/crypto/aes_ctrby8_avx-x86_64.S:552: Error: bad expression
arch/x86/crypto/aes_ctrby8_avx-x86_64.S:552: Error: junk at end of line, first unrecognized character is
x' arch/x86/crypto/aes_ctrby8_avx-x86_64.S:552: Error: too many memory references for
vaesenc'arch/x86/crypto/aes_ctrby8_avx-x86_64.S:552: Error: bad expression
The text was updated successfully, but these errors were encountered: