aboutsummaryrefslogtreecommitdiff
path: root/sysdeps/mips/nptl
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2005-12-28 05:41:16 +0000
committerRoland McGrath <roland@gnu.org>2005-12-28 05:41:16 +0000
commit52abb5ce242502ec54edd095b429c88d3c0d9a3c (patch)
treef8bc62f95709b8e051fb8b3d80836a54ad909a1a /sysdeps/mips/nptl
parent7951fa108f8e3c2885604b32e1cee273ff0479ea (diff)
downloadglibc-52abb5ce242502ec54edd095b429c88d3c0d9a3c.zip
glibc-52abb5ce242502ec54edd095b429c88d3c0d9a3c.tar.gz
glibc-52abb5ce242502ec54edd095b429c88d3c0d9a3c.tar.bz2
2005-12-27 Roland McGrath <roland@redhat.com>
* sysdeps/x86_64/jmpbuf-unwind.h (_jmpbuf_sp): New inline function. (_JMPBUF_UNWINDS_ADJ): Use it, to PTR_DEMANGLE before comparison. * sysdeps/alpha/jmpbuf-unwind.h: Likewise. * sysdeps/i386/jmpbuf-unwind.h: Likewise. * sysdeps/mips/jmpbuf-unwind.h: Likewise. * sysdeps/powerpc/jmpbuf-unwind.h: Likewise. * sysdeps/s390/jmpbuf-unwind.h: Likewise. * sysdeps/sh/jmpbuf-unwind.h: Likewise. * sysdeps/sparc/sparc32/jmpbuf-unwind.h: Likewise. * sysdeps/sparc/sparc64/jmpbuf-unwind.h: Likewise. * sysdeps/unix/sysv/linux/ia64/jmpbuf-unwind.h: Likewise.
Diffstat (limited to 'sysdeps/mips/nptl')
-rw-r--r--sysdeps/mips/nptl/jmpbuf-unwind.h13
1 files changed, 12 insertions, 1 deletions
diff --git a/sysdeps/mips/nptl/jmpbuf-unwind.h b/sysdeps/mips/nptl/jmpbuf-unwind.h
index 67cc969..9ee0310 100644
--- a/sysdeps/mips/nptl/jmpbuf-unwind.h
+++ b/sysdeps/mips/nptl/jmpbuf-unwind.h
@@ -19,12 +19,23 @@
#include <setjmp.h>
#include <stdint.h>
#include <unwind.h>
+#include <sysdep.h>
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
+static inline uintptr_t __attribute__ ((unused))
+_jmpbuf_sp (__jmp_buf regs)
+{
+ uintptr_t sp = regs[0].__sp;
+#ifdef PTR_DEMANGLE
+ PTR_DEMANGLE (sp);
+#endif
+ return sp;
+}
+
#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
- ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[0].__sp - (_adj))
+ ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj))
/* We use the normal longjmp for unwinding. */
#define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val)