diff options
| author | Roland McGrath <roland@gnu.org> | 2005-12-28 05:41:16 +0000 |
|---|---|---|
| committer | Roland McGrath <roland@gnu.org> | 2005-12-28 05:41:16 +0000 |
| commit | 52abb5ce242502ec54edd095b429c88d3c0d9a3c (patch) | |
| tree | f8bc62f95709b8e051fb8b3d80836a54ad909a1a | |
| parent | 7951fa108f8e3c2885604b32e1cee273ff0479ea (diff) | |
| download | glibc-52abb5ce242502ec54edd095b429c88d3c0d9a3c.tar.xz glibc-52abb5ce242502ec54edd095b429c88d3c0d9a3c.zip | |
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.
| -rw-r--r-- | sysdeps/alpha/nptl/jmpbuf-unwind.h | 15 | ||||
| -rw-r--r-- | sysdeps/mips/nptl/jmpbuf-unwind.h | 13 |
2 files changed, 25 insertions, 3 deletions
diff --git a/sysdeps/alpha/nptl/jmpbuf-unwind.h b/sysdeps/alpha/nptl/jmpbuf-unwind.h index 5cef8b1cf5..83b7a01a0e 100644 --- a/sysdeps/alpha/nptl/jmpbuf-unwind.h +++ b/sysdeps/alpha/nptl/jmpbuf-unwind.h @@ -1,4 +1,4 @@ -/* Copyright (C) 2003, 2004 Free Software Foundation, Inc. +/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc. This file is part of the GNU C Library. Contributed by Jakub Jelinek <jakub@redhat.com>, 2003. @@ -20,12 +20,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[JB_SP]; +#ifdef PTR_DEMANGLE + PTR_DEMANGLE (sp); +#endif + return sp; +} + #define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \ - ((uintptr_t) (_address) - (_adj) < (uintptr_t) (_jmpbuf)[JB_SP] - (_adj)) + ((uintptr_t) (_address) - (_adj) < _jmpbuf_sp (_jmpbuf) - (_adj)) /* We use the normal lobngjmp for unwinding. */ #define __libc_unwind_longjmp(buf, val) __libc_longjmp (buf, val) diff --git a/sysdeps/mips/nptl/jmpbuf-unwind.h b/sysdeps/mips/nptl/jmpbuf-unwind.h index 67cc969663..9ee03100e6 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) |
