DO-NOT-UPSTREAM arm: use unified syntax for uaccess
authorStefan Agner <stefan@agner.ch>
Thu, 20 Apr 2017 17:42:31 +0000 (10:42 -0700)
committerStefan Agner <stefan@agner.ch>
Mon, 7 Aug 2017 06:21:11 +0000 (23:21 -0700)
Currently clang only emits code in unified syntax. It also assumes that
inline assembler is in unified syntax. Also the GNU assembler is used
when compiling with clang, this combination leads to the following
warning:
  Warning: conditional infixes are deprecated in unified syntax

Signed-off-by: Stefan Agner <stefan@agner.ch>
arch/arm/include/asm/uaccess.h

index 0bf2347495f13e4db7fdc1c560b0976ec1fbd619..267f2b85323631091c05452a6132b5e5b68d82d9 100644 (file)
@@ -78,7 +78,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"); \