]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
tools/nolibc: arm: use clang-compatible asm syntax
authorThomas Weißschuh <linux@weissschuh.net>
Wed, 7 Aug 2024 21:51:37 +0000 (23:51 +0200)
committerThomas Weißschuh <linux@weissschuh.net>
Sat, 10 Aug 2024 15:08:04 +0000 (17:08 +0200)
The clang assembler rejects the current syntax.
Switch to a syntax accepted by both GCC and clang.

Acked-by: Willy Tarreau <w@1wt.eu>
Link: https://lore.kernel.org/r/20240807-nolibc-llvm-v2-1-c20f2f5fc7c2@weissschuh.net
Signed-off-by: Thomas Weißschuh <linux@weissschuh.net>
tools/include/nolibc/arch-arm.h

index cae4afa7c1c77ea29478484b80ff92aac5bcc4ca..d1c19d973e55c130d27209183245709be8d32773 100644 (file)
 void __attribute__((weak, noreturn, optimize("Os", "omit-frame-pointer"))) __no_stack_protector _start(void)
 {
        __asm__ volatile (
-               "mov %r0, sp\n"         /* save stack pointer to %r0, as arg1 of _start_c */
-               "and ip, %r0, #-8\n"    /* sp must be 8-byte aligned in the callee        */
+               "mov r0, sp\n"          /* save stack pointer to %r0, as arg1 of _start_c */
+               "and ip, r0, #-8\n"     /* sp must be 8-byte aligned in the callee        */
                "mov sp, ip\n"
                "bl  _start_c\n"        /* transfer to c runtime                          */
        );