From e56a679deaa9b28d9a8b7732e8fe6da408b49478 Mon Sep 17 00:00:00 2001 From: Billy Donahue Date: Mon, 9 Mar 2020 12:45:47 -0400 Subject: change asm to __asm__ to support -std=c11 or similar (#149) --- src/aarch64/Gresume.c | 4 ++-- src/arm/Gresume.c | 4 ++-- src/sh/Gresume.c | 4 ++-- tests/crasher.c | 2 +- 4 files changed, 7 insertions(+), 7 deletions(-) diff --git a/src/aarch64/Gresume.c b/src/aarch64/Gresume.c index 3d827392..2cc16136 100644 --- a/src/aarch64/Gresume.c +++ b/src/aarch64/Gresume.c @@ -71,7 +71,7 @@ aarch64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg) char x[sizeof(regs)]; }; - asm volatile ( + __asm__ __volatile__ ( "mov x4, %0\n" "mov x5, %1\n" "ldp x0, x1, [x4]\n" @@ -134,7 +134,7 @@ aarch64_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg) sc->pc = uc->uc_mcontext.pc; sc->pstate = uc->uc_mcontext.pstate; - asm volatile ( + __asm__ __volatile__ ( "mov sp, %0\n" "ret %1\n" : : "r" (c->sigcontext_sp), "r" (c->sigcontext_pc) diff --git a/src/arm/Gresume.c b/src/arm/Gresume.c index a8288628..3b9dfb33 100644 --- a/src/arm/Gresume.c +++ b/src/arm/Gresume.c @@ -56,7 +56,7 @@ arm_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg) char x[sizeof(regs)]; }; - asm __volatile__ ( + __asm__ __volatile__ ( "ldmia %0, {r4-r12, lr}\n" "mov sp, r12\n" "bx lr\n" @@ -90,7 +90,7 @@ arm_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg) /* Set the SP and the PC in order to continue execution at the modified trampoline which restores the signal mask and the registers. */ - asm __volatile__ ( + __asm__ __volatile__ ( "mov sp, %0\n" "bx %1\n" : : "r" (c->sigcontext_sp), "r" (c->sigcontext_pc) diff --git a/src/sh/Gresume.c b/src/sh/Gresume.c index a263c927..5590bafa 100644 --- a/src/sh/Gresume.c +++ b/src/sh/Gresume.c @@ -55,7 +55,7 @@ sh_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg) char x[sizeof(regs)]; }; - asm volatile ( + __asm__ __volatile__ ( "mov.l @%0+, r8\n" "mov.l @%0+, r9\n" "mov.l @%0+, r10\n" @@ -99,7 +99,7 @@ sh_local_resume (unw_addr_space_t as, unw_cursor_t *cursor, void *arg) /* Set the SP and the PC in order to continue execution at the modified trampoline which restores the signal mask and the registers. */ - asm __volatile__ ( + __asm__ __volatile__ ( "mov %0, r15\n" "lds %1, pr\n" "rts\n" diff --git a/tests/crasher.c b/tests/crasher.c index 9df57095..bb99e339 100644 --- a/tests/crasher.c +++ b/tests/crasher.c @@ -93,7 +93,7 @@ write_maps(char *fname) #pragma GCC optimize "-O1" #endif int c(int x) NOINLINE ALIAS(b); -#define compiler_barrier() asm volatile(""); +#define compiler_barrier() __asm__ __volatile__ (""); #else int c(int x); #define compiler_barrier() -- cgit v1.2.1