Skip to content
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

Failed to assemble arch/arm/kernel/iwmmxt.S with clang's integrated assembler #975

Closed
jcai19 opened this issue Apr 6, 2020 · 18 comments
Closed
Assignees
Labels
[ARCH] arm32 This bug impacts ARCH=arm [FIXED][LINUX] 5.11 This bug was fixed in Linux 5.11 [TOOL] integrated-as The issue is relevant to LLVM integrated assembler [WORKAROUND] Applied This bug has an applied workaround

Comments

@jcai19
Copy link
Member

jcai19 commented Apr 6, 2020

Building arch/arm/kernel/iwmmxt.S with clang's integrated assembler caused many instances of the following errors.

/usr/local/google/home/jiancai/storage/llvm-project/build/release/bin/clang -Wp,-MD,arch/arm/kernel/.iwmmxt.o.d -nostdinc -isystem /media/storage/jiancai/llvm-project/build/release/lib/clang/11.0.0/include -I./arch/arm/include -I./arch/arm/include/generated -I./include -I./arch/arm/include/uapi -I./arch/arm/include/generated/uapi -I./include/uapi -I./include/generated/uapi -include ./include/linux/kconfig.h -D__KERNEL__ -mlittle-endian -Qunused-arguments -D__ASSEMBLY__ -fno-PIE --target=arm-linux-gnueabihf --prefix=/usr/bin/ --gcc-toolchain=/usr -Werror=unknown-warning-option -mabi=aapcs-linux -mfpu=vfp -funwind-tables -meabi gnu -marm -Wa,-W -D__LINUX_ARM_ARCH__=7 -march=armv7-a -include asm/unified.h -msoft-float -Wa,-mcpu=iwmmxt -c -o arch/arm/kernel/iwmmxt.o arch/arm/kernel/iwmmxt.S
arch/arm/kernel/iwmmxt.S:108:2: error: invalid instruction, did you mean: mrc, mrc2, mrrc?
tmrc r2, wCon
^
arch/arm/kernel/iwmmxt.S:116:2: error: invalid instruction, did you mean: str?
wstrw wCSSF, [r1, #(0x80)]
^

arch/arm/kernel/iwmmxt.S:127:2: error: invalid instruction, did you mean: str, strd?
wstrd wR0, [r1, #(0x00)]
^

arch/arm/kernel/iwmmxt.S:150:2: error: invalid instruction, did you mean: ldr, ldrd?
wldrd wR0, [r0, #(0x00)]
^

arch/arm/kernel/iwmmxt.S:168:2: error: invalid instruction, did you mean: ldr?
wldrw wCSSF, [r0, #(0x80)]
^

@jcai19 jcai19 added the [ARCH] arm32 This bug impacts ARCH=arm label Apr 6, 2020
@jcai19 jcai19 self-assigned this Apr 6, 2020
@nickdesaulniers
Copy link
Member

do these depend on setting the machine via directive first? cc @agners

@agners
Copy link

agners commented Apr 7, 2020

Looks like, yes:
http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0489c/BABFFFIA.html

Not very familiar with XScale stuff, but adding a assembler directive like .cpu iwmmxt might help.

@agners agners added the [TOOL] integrated-as The issue is relevant to LLVM integrated assembler label Apr 7, 2020
@jcai19
Copy link
Member Author

jcai19 commented Apr 7, 2020

Thanks for the suggestion! Unfortunately the integrated assembler still failed to assemble with the directive. I think LLVM does not support xscale instructions at all. I searched for tmrc or the special registers for Marvell Wireless MMX Technology in LLVM code base but found nothing. I think the arm backend does not have such support at all, and we will have to add support of all such xscale-specific instructions to LLVM.

$ cat bad.s
.cpu iwmmxt
tmrc r2, wCon

$ clang --target=thumbv5-linux-gnueabi -mcpu=xscale -c bad.s -o bad.o
bad.s:2:1: error: invalid instruction, did you mean: mrc, mrc2, mrrc?
tmrc r2, wCon

@jcai19
Copy link
Member Author

jcai19 commented Apr 7, 2020

cc @smithp35 @m-gupta

@agners
Copy link

agners commented Apr 8, 2020

This is support for rather old systems, and probably not much in use these days. We probably should just make sure that those type of systems cannot be selected when using Clang via Kconfig.

@smithp35
Copy link

smithp35 commented Apr 8, 2020

From what I can tell the most recent processor that supported WMMX2 was the Marvell PJ4 (Arm V7-A) but I don't think that there is any support for it. The closest I could find was D24521 which was never merged.

I can't find any support for any of the WMMX instructions. I think @agners is right to say don't enable clang when building for this or any of the older Marvell/Intel XScale.

@jcai19
Copy link
Member Author

jcai19 commented Apr 8, 2020

I think @agners is right to say don't enable clang when building for this or any of the older Marvell/Intel XScale.

Thanks @agners and @smithp35 for the update. An obvious way that I can think of to achieve this is to pass --no-integrated-assembler when building this file with clang, but I am not sure if that is the best practice. @nickdesaulniers mentioned we could achieve this via configs. I am new to Linux kernel so not completely sure on how to do that yet. Are there any example files I can refer to?

@ihalip
Copy link

ihalip commented Apr 9, 2020

If you want to remove that file from the build, look at arch/arm/Kconfig:

config IWMMXT
	bool "Enable iWMMXt support"
	depends on CPU_XSCALE || CPU_XSC3 || CPU_MOHAWK || CPU_PJ4 || CPU_PJ4B
	default y if PXA27x || PXA3xx || ARCH_MMP || CPU_PJ4 || CPU_PJ4B

The wording is pretty self-explanatory: "config IWMMXT is enabled by default if any of ... is enabled". You could make it depend on e.g. !CC_IS_CLANG. The file is added to the build in arch/arm/kernel/Makefile.

Alternatively, you can set specific flags for that file alone. In the same Makefile, you could add something like this (probably wrong syntax but you get the idea):

ifeq ($(CONFIG_CC_IS_CLANG),y)
AFLAGS_iwmmxt.o	+= -no-integrated-as
endif

@nickdesaulniers
Copy link
Member

nickdesaulniers commented Apr 9, 2020

In the same Makefile

This should be done via Kconfig. Just as we have CC_IS_CLANG, we should have LD_IS_LLD (@samitolvanen I think has a patch for this) and AS_IS_CLANG. Then you can depends on !AS_IS_CLANG or depends on !LD_IS_LLD for a given config we're choosing not to support.

ARM ABI has a lot of baggage over the years, and as discussed with @kbeyls , some old things just need to die. Implementing support for them in LLVM is a non-priority.

specifically for ARM:
OABI vs EABI (we disable OABI when CC_IS_CLANG, no plans to support)
BE vs LE (LLD doesn't support BE #380, we should make LD_IS_LLD, then disable this)
XSCALE (LLVM_IAS doesn't support (this bug), we should make AS_IS_CLANG, then disable this)

Otherwise CI bots will continue to dig up these wacky configs via randconfig build. Kconfig is the place to mark something broken, such that it cannot even be selected.

cc @masahir0y

Edit:
I think the comment "some old things just need to die. Implementing support for them in LLVM is a non-priority." was hastily written and overly paraphrased the actual discussion. I would like to eventually support all of the above, it's just a question of priority and resources as always.

@samitolvanen
Copy link
Member

This should be done via Kconfig. Just as we have CC_IS_CLANG, we should have LD_IS_LLD (@samitolvanen I think has a patch for this)

Yes, we need the patch for LTO, and it's trivial: samitolvanen@fe9786c

@jcai19
Copy link
Member Author

jcai19 commented Apr 9, 2020

Thanks all for the feedback. Will work on a patch.

@jcai19
Copy link
Member Author

jcai19 commented Apr 9, 2020

@nickdesaulniers nickdesaulniers added the [PATCH] Submitted A patch has been submitted for review label Apr 10, 2020
@nickdesaulniers nickdesaulniers added [PATCH] Rejected The submitted patch was rejected and removed [PATCH] Submitted A patch has been submitted for review labels Sep 2, 2020
@nickdesaulniers
Copy link
Member

We should probably look to implement support for these instructions.

@jcai19
Copy link
Member Author

jcai19 commented Sep 2, 2020

We should probably look to implement support for these instructions.

Will start to work on that.

@nickdesaulniers
Copy link
Member

@nickdesaulniers
Copy link
Member

@nickdesaulniers nickdesaulniers added [PATCH] Submitted A patch has been submitted for review [PATCH] Accepted A submitted patch has been accepted upstream and removed [PATCH] Rejected The submitted patch was rejected [PATCH] Submitted A patch has been submitted for review labels Dec 2, 2020
ruscur pushed a commit to ruscur/linux that referenced this issue Dec 9, 2020
This patch replaces 6 IWMMXT instructions Clang's integrated assembler
does not support in iwmmxt.S using macros, while making sure GNU
assembler still emit the same instructions. This should be easier than
providing full IWMMXT support in Clang.  This is one of the last bits of
kernel code that could be compiled but not assembled with clang. Once
all of it works with IAS, we no longer need to special-case 32-bit Arm
in Kbuild, or turn off CONFIG_IWMMXT when build-testing.

"Intel Wireless MMX Technology - Developer Guide - August, 2002" should
be referenced for the encoding schemes of these extensions.

Link: ClangBuiltLinux#975

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Jian Cai <jiancai@google.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
@nickdesaulniers nickdesaulniers removed the [PATCH] Accepted A submitted patch has been accepted upstream label Jan 11, 2021
@nickdesaulniers nickdesaulniers added [FIXED][LINUX] 5.11 This bug was fixed in Linux 5.11 [WORKAROUND] Applied This bug has an applied workaround labels Jan 11, 2021
mrchapp pushed a commit to mrchapp/linux that referenced this issue Mar 15, 2021
commit 3c9f570 upstream.

This patch replaces 6 IWMMXT instructions Clang's integrated assembler
does not support in iwmmxt.S using macros, while making sure GNU
assembler still emit the same instructions. This should be easier than
providing full IWMMXT support in Clang.  This is one of the last bits of
kernel code that could be compiled but not assembled with clang. Once
all of it works with IAS, we no longer need to special-case 32-bit Arm
in Kbuild, or turn off CONFIG_IWMMXT when build-testing.

"Intel Wireless MMX Technology - Developer Guide - August, 2002" should
be referenced for the encoding schemes of these extensions.

Link: ClangBuiltLinux#975

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Jian Cai <jiancai@google.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
woodsts pushed a commit to woodsts/linux-stable that referenced this issue Mar 17, 2021
commit 3c9f570 upstream.

This patch replaces 6 IWMMXT instructions Clang's integrated assembler
does not support in iwmmxt.S using macros, while making sure GNU
assembler still emit the same instructions. This should be easier than
providing full IWMMXT support in Clang.  This is one of the last bits of
kernel code that could be compiled but not assembled with clang. Once
all of it works with IAS, we no longer need to special-case 32-bit Arm
in Kbuild, or turn off CONFIG_IWMMXT when build-testing.

"Intel Wireless MMX Technology - Developer Guide - August, 2002" should
be referenced for the encoding schemes of these extensions.

Link: ClangBuiltLinux/linux#975

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Jian Cai <jiancai@google.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
it-is-a-robot pushed a commit to openeuler-mirror/kernel that referenced this issue Apr 10, 2021
stable inclusion
from stable-5.10.24
commit 917220f362a09accb33030804a8a9829a4d3b026
bugzilla: 51348

--------------------------------

commit 3c9f570 upstream.

This patch replaces 6 IWMMXT instructions Clang's integrated assembler
does not support in iwmmxt.S using macros, while making sure GNU
assembler still emit the same instructions. This should be easier than
providing full IWMMXT support in Clang.  This is one of the last bits of
kernel code that could be compiled but not assembled with clang. Once
all of it works with IAS, we no longer need to special-case 32-bit Arm
in Kbuild, or turn off CONFIG_IWMMXT when build-testing.

"Intel Wireless MMX Technology - Developer Guide - August, 2002" should
be referenced for the encoding schemes of these extensions.

Link: ClangBuiltLinux/linux#975

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Jian Cai <jiancai@google.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Sasha Levin <sashal@kernel.org>
Signed-off-by: Chen Jun <chenjun102@huawei.com>
Acked-by:  Weilong Chen <chenweilong@huawei.com>
Signed-off-by: Zheng Zengkai <zhengzengkai@huawei.com>
hmtheboy154 pushed a commit to hmtheboy154/Darkmatter-kernel that referenced this issue Apr 15, 2021
…bler

commit 3c9f570 upstream.

This patch replaces 6 IWMMXT instructions Clang's integrated assembler
does not support in iwmmxt.S using macros, while making sure GNU
assembler still emit the same instructions. This should be easier than
providing full IWMMXT support in Clang.  This is one of the last bits of
kernel code that could be compiled but not assembled with clang. Once
all of it works with IAS, we no longer need to special-case 32-bit Arm
in Kbuild, or turn off CONFIG_IWMMXT when build-testing.

"Intel Wireless MMX Technology - Developer Guide - August, 2002" should
be referenced for the encoding schemes of these extensions.

Link: ClangBuiltLinux/linux#975

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Jian Cai <jiancai@google.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Bug: 141693040
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Change-Id: Iff763cbe46155a05d10d943057a34057809b8cc7
KonstaT pushed a commit to lineage-rpi/android_kernel_brcm_rpi that referenced this issue Nov 4, 2021
…bler

commit 3c9f570 upstream.

This patch replaces 6 IWMMXT instructions Clang's integrated assembler
does not support in iwmmxt.S using macros, while making sure GNU
assembler still emit the same instructions. This should be easier than
providing full IWMMXT support in Clang.  This is one of the last bits of
kernel code that could be compiled but not assembled with clang. Once
all of it works with IAS, we no longer need to special-case 32-bit Arm
in Kbuild, or turn off CONFIG_IWMMXT when build-testing.

"Intel Wireless MMX Technology - Developer Guide - August, 2002" should
be referenced for the encoding schemes of these extensions.

Link: ClangBuiltLinux/linux#975

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Jian Cai <jiancai@google.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Bug: 141693040
Change-Id: I366079ae4c1bfa23d61684cf00284b534be266f3
ammarfaizi2 pushed a commit to ammarfaizi2/linux-fork that referenced this issue Jun 30, 2022
commit 3c9f570 upstream

This patch replaces 6 IWMMXT instructions Clang's integrated assembler
does not support in iwmmxt.S using macros, while making sure GNU
assembler still emit the same instructions. This should be easier than
providing full IWMMXT support in Clang.  This is one of the last bits of
kernel code that could be compiled but not assembled with clang. Once
all of it works with IAS, we no longer need to special-case 32-bit Arm
in Kbuild, or turn off CONFIG_IWMMXT when build-testing.

"Intel Wireless MMX Technology - Developer Guide - August, 2002" should
be referenced for the encoding schemes of these extensions.

Link: ClangBuiltLinux#975

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Jian Cai <jiancai@google.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-fork that referenced this issue Jun 30, 2022
commit 3c9f570 upstream

This patch replaces 6 IWMMXT instructions Clang's integrated assembler
does not support in iwmmxt.S using macros, while making sure GNU
assembler still emit the same instructions. This should be easier than
providing full IWMMXT support in Clang.  This is one of the last bits of
kernel code that could be compiled but not assembled with clang. Once
all of it works with IAS, we no longer need to special-case 32-bit Arm
in Kbuild, or turn off CONFIG_IWMMXT when build-testing.

"Intel Wireless MMX Technology - Developer Guide - August, 2002" should
be referenced for the encoding schemes of these extensions.

Link: ClangBuiltLinux#975

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Jian Cai <jiancai@google.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Jun 30, 2022
commit 3c9f570 upstream

This patch replaces 6 IWMMXT instructions Clang's integrated assembler
does not support in iwmmxt.S using macros, while making sure GNU
assembler still emit the same instructions. This should be easier than
providing full IWMMXT support in Clang.  This is one of the last bits of
kernel code that could be compiled but not assembled with clang. Once
all of it works with IAS, we no longer need to special-case 32-bit Arm
in Kbuild, or turn off CONFIG_IWMMXT when build-testing.

"Intel Wireless MMX Technology - Developer Guide - August, 2002" should
be referenced for the encoding schemes of these extensions.

Link: ClangBuiltLinux/linux#975

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Jian Cai <jiancai@google.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Jul 2, 2022
commit 3c9f570 upstream

This patch replaces 6 IWMMXT instructions Clang's integrated assembler
does not support in iwmmxt.S using macros, while making sure GNU
assembler still emit the same instructions. This should be easier than
providing full IWMMXT support in Clang.  This is one of the last bits of
kernel code that could be compiled but not assembled with clang. Once
all of it works with IAS, we no longer need to special-case 32-bit Arm
in Kbuild, or turn off CONFIG_IWMMXT when build-testing.

"Intel Wireless MMX Technology - Developer Guide - August, 2002" should
be referenced for the encoding schemes of these extensions.

Link: ClangBuiltLinux/linux#975

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Jian Cai <jiancai@google.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Jul 2, 2022
commit 3c9f570 upstream

This patch replaces 6 IWMMXT instructions Clang's integrated assembler
does not support in iwmmxt.S using macros, while making sure GNU
assembler still emit the same instructions. This should be easier than
providing full IWMMXT support in Clang.  This is one of the last bits of
kernel code that could be compiled but not assembled with clang. Once
all of it works with IAS, we no longer need to special-case 32-bit Arm
in Kbuild, or turn off CONFIG_IWMMXT when build-testing.

"Intel Wireless MMX Technology - Developer Guide - August, 2002" should
be referenced for the encoding schemes of these extensions.

Link: ClangBuiltLinux/linux#975

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Jian Cai <jiancai@google.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
woodsts pushed a commit to woodsts/linux-stable that referenced this issue Jul 2, 2022
commit 3c9f570 upstream

This patch replaces 6 IWMMXT instructions Clang's integrated assembler
does not support in iwmmxt.S using macros, while making sure GNU
assembler still emit the same instructions. This should be easier than
providing full IWMMXT support in Clang.  This is one of the last bits of
kernel code that could be compiled but not assembled with clang. Once
all of it works with IAS, we no longer need to special-case 32-bit Arm
in Kbuild, or turn off CONFIG_IWMMXT when build-testing.

"Intel Wireless MMX Technology - Developer Guide - August, 2002" should
be referenced for the encoding schemes of these extensions.

Link: ClangBuiltLinux/linux#975

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Jian Cai <jiancai@google.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
ammarfaizi2 pushed a commit to ammarfaizi2/linux-block that referenced this issue Jul 2, 2022
commit 3c9f570 upstream

This patch replaces 6 IWMMXT instructions Clang's integrated assembler
does not support in iwmmxt.S using macros, while making sure GNU
assembler still emit the same instructions. This should be easier than
providing full IWMMXT support in Clang.  This is one of the last bits of
kernel code that could be compiled but not assembled with clang. Once
all of it works with IAS, we no longer need to special-case 32-bit Arm
in Kbuild, or turn off CONFIG_IWMMXT when build-testing.

"Intel Wireless MMX Technology - Developer Guide - August, 2002" should
be referenced for the encoding schemes of these extensions.

Link: ClangBuiltLinux/linux#975

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Jian Cai <jiancai@google.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
jpuhlman pushed a commit to MontaVista-OpenSourceTechnology/linux-mvista that referenced this issue Aug 5, 2022
Source: Kernel.org
MR: 120397
Type: Integration
Disposition: Backport from git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable linux-5.4.y
ChangeID: 1b43c30cd5d555caa615d07a53bd8bb9c945fd73
Description:

commit 3c9f570 upstream

This patch replaces 6 IWMMXT instructions Clang's integrated assembler
does not support in iwmmxt.S using macros, while making sure GNU
assembler still emit the same instructions. This should be easier than
providing full IWMMXT support in Clang.  This is one of the last bits of
kernel code that could be compiled but not assembled with clang. Once
all of it works with IAS, we no longer need to special-case 32-bit Arm
in Kbuild, or turn off CONFIG_IWMMXT when build-testing.

"Intel Wireless MMX Technology - Developer Guide - August, 2002" should
be referenced for the encoding schemes of these extensions.

Link: ClangBuiltLinux/linux#975

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Jian Cai <jiancai@google.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Signed-off-by: Armin Kuster <akuster@mvista.com>
oraclelinuxkernel pushed a commit to oracle/linux-uek that referenced this issue Aug 26, 2022
commit 3c9f570 upstream

This patch replaces 6 IWMMXT instructions Clang's integrated assembler
does not support in iwmmxt.S using macros, while making sure GNU
assembler still emit the same instructions. This should be easier than
providing full IWMMXT support in Clang.  This is one of the last bits of
kernel code that could be compiled but not assembled with clang. Once
all of it works with IAS, we no longer need to special-case 32-bit Arm
in Kbuild, or turn off CONFIG_IWMMXT when build-testing.

"Intel Wireless MMX Technology - Developer Guide - August, 2002" should
be referenced for the encoding schemes of these extensions.

Link: ClangBuiltLinux/linux#975

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Jian Cai <jiancai@google.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
(cherry picked from commit 1b43c30cd5d555caa615d07a53bd8bb9c945fd73)
Signed-off-by: Sherry Yang <sherry.yang@oracle.com>
yuurha12 pushed a commit to yuurha12/moonstone_personal that referenced this issue Jul 30, 2023
commit 3c9f5708b7aed6a963e2aefccbd1854802de163e upstream

This patch replaces 6 IWMMXT instructions Clang's integrated assembler
does not support in iwmmxt.S using macros, while making sure GNU
assembler still emit the same instructions. This should be easier than
providing full IWMMXT support in Clang.  This is one of the last bits of
kernel code that could be compiled but not assembled with clang. Once
all of it works with IAS, we no longer need to special-case 32-bit Arm
in Kbuild, or turn off CONFIG_IWMMXT when build-testing.

"Intel Wireless MMX Technology - Developer Guide - August, 2002" should
be referenced for the encoding schemes of these extensions.

Link: ClangBuiltLinux/linux#975

Suggested-by: Nick Desaulniers <ndesaulniers@google.com>
Suggested-by: Ard Biesheuvel <ardb@kernel.org>
Acked-by: Ard Biesheuvel <ardb@kernel.org>
Reviewed-by: Nick Desaulniers <ndesaulniers@google.com>
Tested-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Jian Cai <jiancai@google.com>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[ARCH] arm32 This bug impacts ARCH=arm [FIXED][LINUX] 5.11 This bug was fixed in Linux 5.11 [TOOL] integrated-as The issue is relevant to LLVM integrated assembler [WORKAROUND] Applied This bug has an applied workaround
Projects
None yet
Development

No branches or pull requests

6 participants