summaryrefslogtreecommitdiff
path: root/ports/sysdeps/aarch64/jmpbuf-offsets.h
diff options
context:
space:
mode:
Diffstat (limited to 'ports/sysdeps/aarch64/jmpbuf-offsets.h')
-rw-r--r--ports/sysdeps/aarch64/jmpbuf-offsets.h20
1 files changed, 18 insertions, 2 deletions
diff --git a/ports/sysdeps/aarch64/jmpbuf-offsets.h b/ports/sysdeps/aarch64/jmpbuf-offsets.h
index ed5f42a7e9..bcf2afa555 100644
--- a/ports/sysdeps/aarch64/jmpbuf-offsets.h
+++ b/ports/sysdeps/aarch64/jmpbuf-offsets.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2006-2013 Free Software Foundation, Inc.
+/* Copyright (C) 2006-2014 Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -39,6 +39,22 @@
#define JB_D14 20
#define JB_D15 21
+#ifndef __ASSEMBLER__
+#include <setjmp.h>
+#include <stdint.h>
+#include <sysdep.h>
+
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf jmpbuf)
+{
+ uintptr_t sp = jmpbuf[JB_SP];
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (sp);
+#endif
+ return sp;
+}
+#endif
+
/* Helper for generic ____longjmp_chk(). */
#define JB_FRAME_ADDRESS(buf) \
- ((void *) (buf[JB_SP]))
+ ((void *) _jmpbuf_sp (buf))