ARM: 9029/1: Make iwmmxt.S support Clang's integrated assembler
authorJian Cai <jiancai@google.com>
Tue, 17 Nov 2020 22:11:36 +0000 (23:11 +0100)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Wed, 17 Mar 2021 16:06:26 +0000 (17:06 +0100)
commit917220f362a09accb33030804a8a9829a4d3b026
treefc8f26deadf094c5387afef69d213431d08cffa5
parent69f8455268335274dc11e52bbe8f30608fb103c2
ARM: 9029/1: Make iwmmxt.S support Clang's integrated assembler

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: https://github.com/ClangBuiltLinux/linux/issues/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>
arch/arm/kernel/iwmmxt.S
arch/arm/kernel/iwmmxt.h [new file with mode: 0644]