summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorBilly Donahue <BillyDonahue@users.noreply.github.com>2020-03-09 12:45:47 -0400
committerGitHub <noreply@github.com>2020-03-09 09:45:47 -0700
commite56a679deaa9b28d9a8b7732e8fe6da408b49478 (patch)
tree117876e08825aa9bad9c24e66a3c74e2c0007907
parent49d2bf0e55c1b4ff90371e8e6fd9ac88c3d26834 (diff)
downloadlibunwind-e56a679deaa9b28d9a8b7732e8fe6da408b49478.tar.gz
change asm to __asm__ to support -std=c11 or similar (#149)
-rw-r--r--src/aarch64/Gresume.c4
-rw-r--r--src/arm/Gresume.c4
-rw-r--r--src/sh/Gresume.c4
-rw-r--r--tests/crasher.c2
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()