summaryrefslogtreecommitdiffstats
path: root/libgloss/aarch64/syscalls.c
diff options
context:
space:
mode:
Diffstat (limited to 'libgloss/aarch64/syscalls.c')
-rw-r--r--libgloss/aarch64/syscalls.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/libgloss/aarch64/syscalls.c b/libgloss/aarch64/syscalls.c
index a809476f8..058cef5cb 100644
--- a/libgloss/aarch64/syscalls.c
+++ b/libgloss/aarch64/syscalls.c
@@ -109,7 +109,11 @@ static struct fdent *findslot _PARAMS ((int));
static int newslot _PARAMS ((void));
/* Register name faking - works in collusion with the linker. */
+#ifdef __ILP32__
+register char * stack_ptr asm ("wsp");
+#else
register char * stack_ptr asm ("sp");
+#endif
/* following is copied from libc/stdio/local.h to check std streams */