OSDN Git Service

ARM: 8852/1: uaccess: use unified assembler language syntax
authorStefan Agner <stefan@agner.ch>
Sat, 23 Mar 2019 11:10:44 +0000 (12:10 +0100)
committerRussell King <rmk+kernel@armlinux.org.uk>
Tue, 23 Apr 2019 16:20:52 +0000 (17:20 +0100)
commitfe09d9c641f2064390afabdf436fe09b35e075ff
treef905c12b7edcc44017eeee55e2fc4a4b28848a67
parenta6c9e96bf86b8aa86d8696b7887e52c2e95bac0f
ARM: 8852/1: uaccess: use unified assembler language syntax

Convert the conditional infix to a postfix to make sure this inline
assembly is unified syntax. Since gcc assumes non-unified syntax
when emitting ARM instructions, make sure to define the syntax as
unified.

This allows to use LLVM's integrated assembler.

Additionally, for GCC ".syntax unified" for inline assembly.
When compiling non-Thumb2 GCC always emits a ".syntax divided"
at the beginning of the inline assembly which makes the
assembler fail. Since GCC 5 there is the -masm-syntax-unified
GCC option which make GCC assume unified syntax asm and hence
emits ".syntax unified" even in ARM mode. However, the option
is broken since GCC version 6 (see GCC PR88648 [1]). Work
around by adding ".syntax unified" as part of the inline
assembly.

[0] https://gcc.gnu.org/onlinedocs/gcc/ARM-Options.html#index-masm-syntax-unified
[1] https://gcc.gnu.org/bugzilla/show_bug.cgi?id=88648

Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: Russell King <rmk+kernel@armlinux.org.uk>
arch/arm/include/asm/uaccess.h