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)
committerRussell King <rmk+kernel@armlinux.org.uk>
Tue, 8 Dec 2020 10:14:59 +0000 (10:14 +0000)
commit3c9f5708b7aed6a963e2aefccbd1854802de163e
tree4d5ffc3b6b1623bdd7fbc3530209e6c31c6426ba
parent4d576cab16f57e1f87978f6997a725179398341e
ARM: 9029/1: Make iwmmxt.S support Clang's integrated assembler

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