mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Stefan Agner <stefan@agner.ch>
To: linux@armlinux.org.uk
Cc: ndesaulniers@google.com, natechancellor@gmail.com, arnd@arndb.de,
	ard.biesheuvel@linaro.org, nicolas.pitre@linaro.org,
	peterz@infradead.org, mingo@redhat.com, will.deacon@arm.com,
	julien.thierry@arm.com, mark.rutland@arm.com,
	linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	Stefan Agner <stefan@agner.ch>
Subject: [PATCH v2 2/3] ARM: uaccess: use unified assembler language syntax
Date: Thu,  3 Jan 2019 22:48:14 +0100	[thread overview]
Message-ID: <5ef2acc655abfbe8bfa2cd30ecc5c2286b8fdfa3.1546551693.git.stefan@agner.ch> (raw)
In-Reply-To: <cover.1546551693.git.stefan@agner.ch>

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.

Signed-off-by: Stefan Agner <stefan@agner.ch>
---
Changes since v1:
- Explicitly use unified syntax for inline assembly


 arch/arm/include/asm/uaccess.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/arch/arm/include/asm/uaccess.h b/arch/arm/include/asm/uaccess.h
index 6390a40f16e7..a50f9b4e2574 100644
--- a/arch/arm/include/asm/uaccess.h
+++ b/arch/arm/include/asm/uaccess.h
@@ -86,7 +86,8 @@ static inline void set_fs(mm_segment_t fs)
 #define __range_ok(addr, size) ({ \
 	unsigned long flag, roksum; \
 	__chk_user_ptr(addr);	\
-	__asm__("adds %1, %2, %3; sbcccs %1, %1, %0; movcc %0, #0" \
+	__asm__(".syntax unified\n" \
+		"adds %1, %2, %3; sbcscc %1, %1, %0; movcc %0, #0" \
 		: "=&r" (flag), "=&r" (roksum) \
 		: "r" (addr), "Ir" (size), "0" (current_thread_info()->addr_limit) \
 		: "cc"); \
-- 
2.20.1


  parent reply	other threads:[~2019-01-03 21:48 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-01-03 21:48 [PATCH v2 0/3] ARM: trivial assembly fixes to enable LLVM as Stefan Agner
2019-01-03 21:48 ` [PATCH v2 1/3] ARM: fix argument count to match macro definition Stefan Agner
2019-01-05 16:05   ` Nicolas Pitre
2019-01-03 21:48 ` Stefan Agner [this message]
2019-01-05 16:12   ` [PATCH v2 2/3] ARM: uaccess: use unified assembler language syntax Nicolas Pitre
2019-01-07 21:50     ` Stefan Agner
2019-01-03 21:48 ` [PATCH v2 3/3] ARM: spinlock: " Stefan Agner
2019-01-05 16:13   ` Nicolas Pitre

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=5ef2acc655abfbe8bfa2cd30ecc5c2286b8fdfa3.1546551693.git.stefan@agner.ch \
    --to=stefan@agner.ch \
    --cc=ard.biesheuvel@linaro.org \
    --cc=arnd@arndb.de \
    --cc=julien.thierry@arm.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=mark.rutland@arm.com \
    --cc=mingo@redhat.com \
    --cc=natechancellor@gmail.com \
    --cc=ndesaulniers@google.com \
    --cc=nicolas.pitre@linaro.org \
    --cc=peterz@infradead.org \
    --cc=will.deacon@arm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®