aboutsummaryrefslogtreecommitdiff
path: root/sysdeps
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2006-01-10 08:54:22 +0000
committerRoland McGrath <roland@gnu.org>2006-01-10 08:54:22 +0000
commit0ca13e14122d9bfd4662e621d16e82325277886d (patch)
tree389e3e733a0623287e12ac46e3af2572f88b0b53 /sysdeps
parentde59a2917979a97c5c80fd2d78acc48152e87d6d (diff)
downloadglibc-0ca13e14122d9bfd4662e621d16e82325277886d.tar
glibc-0ca13e14122d9bfd4662e621d16e82325277886d.tar.gz
glibc-0ca13e14122d9bfd4662e621d16e82325277886d.tar.bz2
glibc-0ca13e14122d9bfd4662e621d16e82325277886d.zip
* sysdeps/powerpc/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ...
* sysdeps/powerpc/jmpbuf-unwind.h: ... here. * sysdeps/alpha/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/alpha/jmpbuf-unwind.h: ... here. * sysdeps/sparc/sparc32/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/sparc/sparc32/jmpbuf-unwind.h: ... here. * sysdeps/i386/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/i386/jmpbuf-unwind.h: ... here. * sysdeps/x86_64/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/x86_64/jmpbuf-unwind.h: ... here. * sysdeps/sh/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/sh/jmpbuf-unwind.h: ... here. * sysdeps/hppa/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/hppa/jmpbuf-unwind.h: ... here, new file. * sysdeps/mips/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/mips/jmpbuf-unwind.h: ... here. * sysdeps/m68k/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/m68k/jmpbuf-unwind.h: ... here, new file. * sysdeps/s390/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/s390/jmpbuf-unwind.h: ... here. * sysdeps/unix/sysv/linux/ia64/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/ia64/jmpbuf-unwind.h: ... here. * sysdeps/unix/sysv/linux/sparc/bits/setjmp.h (_JMPBUF_UNWINDS): Move macro ... * sysdeps/sparc/sparc64/jmpbuf-unwind.h: ... here. * sysdeps/ia64/jmpbuf-unwind.h: New file, moved from nptl/.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/alpha/bits/setjmp.h7
-rw-r--r--sysdeps/alpha/jmpbuf-unwind.h5
-rw-r--r--sysdeps/hppa/bits/setjmp.h8
-rw-r--r--sysdeps/hppa/jmpbuf-unwind.h26
-rw-r--r--sysdeps/i386/bits/setjmp.h8
-rw-r--r--sysdeps/i386/jmpbuf-unwind.h5
-rw-r--r--sysdeps/ia64/jmpbuf-unwind.h44
-rw-r--r--sysdeps/m68k/bits/setjmp.h7
-rw-r--r--sysdeps/m68k/jmpbuf-unwind.h25
-rw-r--r--sysdeps/mips/bits/setjmp.h8
-rw-r--r--sysdeps/mips/jmpbuf-unwind.h5
-rw-r--r--sysdeps/powerpc/bits/setjmp.h8
-rw-r--r--sysdeps/powerpc/jmpbuf-unwind.h5
-rw-r--r--sysdeps/s390/bits/setjmp.h7
-rw-r--r--sysdeps/s390/jmpbuf-unwind.h7
-rw-r--r--sysdeps/sh/bits/setjmp.h7
-rw-r--r--sysdeps/sh/jmpbuf-unwind.h5
-rw-r--r--sysdeps/sparc/sparc32/bits/setjmp.h7
-rw-r--r--sysdeps/sparc/sparc32/jmpbuf-unwind.h7
-rw-r--r--sysdeps/sparc/sparc64/jmpbuf-unwind.h5
-rw-r--r--sysdeps/unix/sysv/linux/ia64/bits/setjmp.h7
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/setjmp.h10
-rw-r--r--sysdeps/x86_64/bits/setjmp.h13
-rw-r--r--sysdeps/x86_64/jmpbuf-unwind.h5
24 files changed, 156 insertions, 85 deletions
diff --git a/sysdeps/alpha/bits/setjmp.h b/sysdeps/alpha/bits/setjmp.h
index 71b7738c37..7db0dbf565 100644
--- a/sysdeps/alpha/bits/setjmp.h
+++ b/sysdeps/alpha/bits/setjmp.h
@@ -1,5 +1,5 @@
/* Define the machine-dependent type `jmp_buf'. Alpha version.
- Copyright (C) 1992, 1997, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1992,1997,2003,2005,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -77,11 +77,6 @@
#ifndef __ASSEMBLY__
typedef long int __jmp_buf[17];
-
-/* Test if longjmp to JMPBUF would unwind the frame containing a local
- variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
- ((void *)(_address) < (void *) _demangle ((_jmpbuf)[JB_SP]))
#endif
#endif /* bits/setjmp.h */
diff --git a/sysdeps/alpha/jmpbuf-unwind.h b/sysdeps/alpha/jmpbuf-unwind.h
index ca445f8d24..1faa16fba4 100644
--- a/sysdeps/alpha/jmpbuf-unwind.h
+++ b/sysdeps/alpha/jmpbuf-unwind.h
@@ -22,6 +22,11 @@
#include <unwind.h>
#include <sysdep.h>
+/* Test if longjmp to JMPBUF would unwind the frame containing a local
+ variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
+ ((void *)(_address) < (void *) _demangle ((_jmpbuf)[JB_SP]))
+
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
diff --git a/sysdeps/hppa/bits/setjmp.h b/sysdeps/hppa/bits/setjmp.h
index 07ea01eb97..4c8ed07b98 100644
--- a/sysdeps/hppa/bits/setjmp.h
+++ b/sysdeps/hppa/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2000, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -37,10 +37,4 @@
typedef double __jmp_buf[21];
#endif
-/* Test if longjmp to JMPBUF would unwind the frame containing a local
- variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
- ((void *) (_address) > \
- (void *) _demangle ((((unsigned long *) _jmpbuf)[JB_SP])))
-
#endif /* bits/setjmp.h */
diff --git a/sysdeps/hppa/jmpbuf-unwind.h b/sysdeps/hppa/jmpbuf-unwind.h
new file mode 100644
index 0000000000..15cae66163
--- /dev/null
+++ b/sysdeps/hppa/jmpbuf-unwind.h
@@ -0,0 +1,26 @@
+/* Examine __jmp_buf for unwinding frames. HPPA version.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <setjmp.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame containing a local
+ variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
+ ((void *) (_address) > \
+ (void *) _demangle ((((unsigned long *) _jmpbuf)[JB_SP])))
diff --git a/sysdeps/i386/bits/setjmp.h b/sysdeps/i386/bits/setjmp.h
index d99a726ba3..7029673090 100644
--- a/sysdeps/i386/bits/setjmp.h
+++ b/sysdeps/i386/bits/setjmp.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 1998, 2000, 2001, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2000,2001,2003,2005,2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -38,9 +39,4 @@
typedef int __jmp_buf[6];
#endif
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((jmpbuf)[JB_SP]))
-
#endif /* bits/setjmp.h */
diff --git a/sysdeps/i386/jmpbuf-unwind.h b/sysdeps/i386/jmpbuf-unwind.h
index ca445f8d24..039159d1ed 100644
--- a/sysdeps/i386/jmpbuf-unwind.h
+++ b/sysdeps/i386/jmpbuf-unwind.h
@@ -22,6 +22,11 @@
#include <unwind.h>
#include <sysdep.h>
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)[JB_SP]))
+
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
diff --git a/sysdeps/ia64/jmpbuf-unwind.h b/sysdeps/ia64/jmpbuf-unwind.h
new file mode 100644
index 0000000000..c53447223b
--- /dev/null
+++ b/sysdeps/ia64/jmpbuf-unwind.h
@@ -0,0 +1,44 @@
+/* Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+ Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <setjmp.h>
+#include <stdint.h>
+#include <unwind.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame containing a local
+ variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
+ ((void *) (_address) < (void *) (((long int *) _jmpbuf)[0]))
+
+#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
+ ({ uintptr_t _cfa = (uintptr_t) _Unwind_GetCFA (_context) - (_adj); \
+ (_cfa < (uintptr_t)(((long *)(_jmpbuf))[0]) - (_adj) \
+ || (_cfa == (uintptr_t)(((long *)(_jmpbuf))[0]) - (_adj) \
+ && (uintptr_t) _Unwind_GetBSP (_context) - (_adj) \
+ >= (uintptr_t)(((long *)(_jmpbuf))[17]) - (_adj))); \
+ })
+
+#define _JMPBUF_UNWINDS_ADJ(_jmpbuf, _address, _adj) \
+ ((uintptr_t)(_address) - (_adj) < (uintptr_t)(((long *)_jmpbuf)[0]) - (_adj))
+
+/* We use a longjmp() which can cross from the alternate signal-stack
+ to the normal stack. */
+extern void __libc_unwind_longjmp (sigjmp_buf env, int val)
+ __attribute__ ((noreturn));
+hidden_proto (__libc_unwind_longjmp)
diff --git a/sysdeps/m68k/bits/setjmp.h b/sysdeps/m68k/bits/setjmp.h
index 612582af26..2d5a08227d 100644
--- a/sysdeps/m68k/bits/setjmp.h
+++ b/sysdeps/m68k/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2005,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -42,9 +42,4 @@ typedef struct
} __jmp_buf[1];
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((jmpbuf)->__sp))
-
#endif /* bits/setjmp.h */
diff --git a/sysdeps/m68k/jmpbuf-unwind.h b/sysdeps/m68k/jmpbuf-unwind.h
new file mode 100644
index 0000000000..3490c79bdc
--- /dev/null
+++ b/sysdeps/m68k/jmpbuf-unwind.h
@@ -0,0 +1,25 @@
+/* Examine __jmp_buf for unwinding frames. m68k version.
+ Copyright (C) 2006 Free Software Foundation, Inc.
+ This file is part of the GNU C Library.
+
+ The GNU C Library is free software; you can redistribute it and/or
+ modify it under the terms of the GNU Lesser General Public
+ License as published by the Free Software Foundation; either
+ version 2.1 of the License, or (at your option) any later version.
+
+ The GNU C Library is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
+ Lesser General Public License for more details.
+
+ You should have received a copy of the GNU Lesser General Public
+ License along with the GNU C Library; if not, write to the Free
+ Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
+ 02111-1307 USA. */
+
+#include <setjmp.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)->__sp))
diff --git a/sysdeps/mips/bits/setjmp.h b/sysdeps/mips/bits/setjmp.h
index 5f7c82b864..7b94623378 100644
--- a/sysdeps/mips/bits/setjmp.h
+++ b/sysdeps/mips/bits/setjmp.h
@@ -1,5 +1,5 @@
/* Define the machine-dependent type `jmp_buf'. MIPS version.
- Copyright (C) 1992, 1993, 1995, 1997, 2000, 2002, 2003, 2004, 2005
+ Copyright (C) 1992,1993,1995,1997,2000,2002,2003,2004,2005,2006
Free Software Foundation, Inc.
This file is part of the GNU C Library.
@@ -77,10 +77,4 @@ typedef struct
# define JB_PC 0
#endif
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((jmpbuf)[0].__sp))
-
#endif /* _MIPS_BITS_SETJMP_H */
diff --git a/sysdeps/mips/jmpbuf-unwind.h b/sysdeps/mips/jmpbuf-unwind.h
index 1ff8fc8957..bfa1a64537 100644
--- a/sysdeps/mips/jmpbuf-unwind.h
+++ b/sysdeps/mips/jmpbuf-unwind.h
@@ -21,6 +21,11 @@
#include <unwind.h>
#include <sysdep.h>
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)[0].__sp))
+
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
diff --git a/sysdeps/powerpc/bits/setjmp.h b/sysdeps/powerpc/bits/setjmp.h
index 6b35fb440b..4221300540 100644
--- a/sysdeps/powerpc/bits/setjmp.h
+++ b/sysdeps/powerpc/bits/setjmp.h
@@ -1,4 +1,5 @@
-/* Copyright (C) 1997, 1998, 2000, 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997,1998,2000,2003,2004,2005,2006
+ Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -72,9 +73,4 @@ typedef long int __jmp_buf[64 + (12 * 4)] __attribute__ ((__aligned__ (16)));
# endif
#endif
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((jmpbuf)[JB_GPR1]))
-
#endif /* bits/setjmp.h */
diff --git a/sysdeps/powerpc/jmpbuf-unwind.h b/sysdeps/powerpc/jmpbuf-unwind.h
index a6cfea074e..34d5e6924c 100644
--- a/sysdeps/powerpc/jmpbuf-unwind.h
+++ b/sysdeps/powerpc/jmpbuf-unwind.h
@@ -22,6 +22,11 @@
#include <unwind.h>
#include <sysdep.h>
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)[JB_GPR1]))
+
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
diff --git a/sysdeps/s390/bits/setjmp.h b/sysdeps/s390/bits/setjmp.h
index 37f600d0ad..dcac2d2377 100644
--- a/sysdeps/s390/bits/setjmp.h
+++ b/sysdeps/s390/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2000, 2001, 2002, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2000,2001,2002,2005,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -55,9 +55,4 @@ typedef struct __s390_jmp_buf {
#endif
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((jmpbuf)->__gregs[__JB_GPR15]))
-
#endif /* __S390_SETJMP_H__ */
diff --git a/sysdeps/s390/jmpbuf-unwind.h b/sysdeps/s390/jmpbuf-unwind.h
index ae7491ab77..23f1e991d5 100644
--- a/sysdeps/s390/jmpbuf-unwind.h
+++ b/sysdeps/s390/jmpbuf-unwind.h
@@ -23,6 +23,13 @@
#include <bits/wordsize.h>
#include <sysdep.h>
+
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)->__gregs[__JB_GPR15]))
+
+
/* On s390{,x}, CFA is always 96 (resp. 160) bytes above actual
%r15. */
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
diff --git a/sysdeps/sh/bits/setjmp.h b/sysdeps/sh/bits/setjmp.h
index 8ebb5c598e..cdc27dceb0 100644
--- a/sysdeps/sh/bits/setjmp.h
+++ b/sysdeps/sh/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1999, 2000, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1999,2000,2003,2005,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -48,9 +48,4 @@ typedef struct
# define JB_SIZE (4 * 15)
#endif
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((jmpbuf)[0].__regs[7]))
-
#endif /* bits/setjmp.h */
diff --git a/sysdeps/sh/jmpbuf-unwind.h b/sysdeps/sh/jmpbuf-unwind.h
index 4c84c42962..a69a465efc 100644
--- a/sysdeps/sh/jmpbuf-unwind.h
+++ b/sysdeps/sh/jmpbuf-unwind.h
@@ -22,6 +22,11 @@
#include <unwind.h>
#include <sysdep.h>
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)[0].__regs[7]))
+
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
diff --git a/sysdeps/sparc/sparc32/bits/setjmp.h b/sysdeps/sparc/sparc32/bits/setjmp.h
index 12250d6980..62edd62635 100644
--- a/sysdeps/sparc/sparc32/bits/setjmp.h
+++ b/sysdeps/sparc/sparc32/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 1997, 1998, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 1997, 1998, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -31,8 +31,3 @@
#ifndef _ASM
typedef int __jmp_buf[3];
#endif
-
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((int) (address) < demangle ((jmpbuf)[JB_SP]))
diff --git a/sysdeps/sparc/sparc32/jmpbuf-unwind.h b/sysdeps/sparc/sparc32/jmpbuf-unwind.h
index 83b7a01a0e..c77673f27f 100644
--- a/sysdeps/sparc/sparc32/jmpbuf-unwind.h
+++ b/sysdeps/sparc/sparc32/jmpbuf-unwind.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2003, 2004, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2003, 2004, 2005, 2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by Jakub Jelinek <jakub@redhat.com>, 2003.
@@ -22,6 +22,11 @@
#include <unwind.h>
#include <sysdep.h>
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((int) (address) < demangle ((jmpbuf)[JB_SP]))
+
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
diff --git a/sysdeps/sparc/sparc64/jmpbuf-unwind.h b/sysdeps/sparc/sparc64/jmpbuf-unwind.h
index efb6918c14..f7eed15ea1 100644
--- a/sysdeps/sparc/sparc64/jmpbuf-unwind.h
+++ b/sysdeps/sparc/sparc64/jmpbuf-unwind.h
@@ -21,6 +21,11 @@
#include <stdint.h>
#include <unwind.h>
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((unsigned long int) (address) < (jmpbuf)->uc_mcontext.mc_fp + 2047)
+
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)
diff --git a/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h b/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h
index 80543976bb..8bd675e4ec 100644
--- a/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h
+++ b/sysdeps/unix/sysv/linux/ia64/bits/setjmp.h
@@ -1,5 +1,5 @@
/* Define the machine-dependent type `jmp_buf'. Linux/IA-64 version.
- Copyright (C) 1999, 2000, 2003, 2005 Free Software Foundation, Inc.
+ Copyright (C) 1999,2000,2003,2005,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
Contributed by David Mosberger-Tang <davidm@hpl.hp.com>.
@@ -32,9 +32,4 @@
/* the __jmp_buf element type should be __float80 per ABI... */
typedef long __jmp_buf[_JBLEN] __attribute__ ((aligned (16))); /* guarantees 128-bit alignment! */
-/* Test if longjmp to JMPBUF would unwind the frame containing a local
- variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(_jmpbuf, _address, _demangle) \
- ((void *) (_address) < (void *) (((long int *) _jmpbuf)[0]))
-
#endif /* bits/setjmp.h */
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/setjmp.h b/sysdeps/unix/sysv/linux/sparc/bits/setjmp.h
index 4fb7c90fd5..360310f5f1 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/setjmp.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/setjmp.h
@@ -58,11 +58,6 @@ typedef struct __sparc64_jmp_buf
} __jmp_buf[1];
#endif
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((unsigned long int) (address) < (jmpbuf)->uc_mcontext.mc_fp + 2047)
-
#else
#if defined __USE_MISC || defined _ASM
@@ -75,11 +70,6 @@ typedef struct __sparc64_jmp_buf
typedef int __jmp_buf[3];
#endif
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((int) (address) < demangle ((jmpbuf)[JB_SP]))
-
#endif
#endif /* bits/setjmp.h */
diff --git a/sysdeps/x86_64/bits/setjmp.h b/sysdeps/x86_64/bits/setjmp.h
index 1031d5027b..656fbf7001 100644
--- a/sysdeps/x86_64/bits/setjmp.h
+++ b/sysdeps/x86_64/bits/setjmp.h
@@ -1,4 +1,4 @@
-/* Copyright (C) 2001, 2002, 2003, 2005 Free Software Foundation, Inc.
+/* Copyright (C) 2001,2002,2003,2005,2006 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
@@ -64,15 +64,4 @@ typedef long int __jmp_buf[8];
typedef int __jmp_buf[6];
# endif
-/* Test if longjmp to JMPBUF would unwind the frame
- containing a local variable at ADDRESS. */
-# if __WORDSIZE == 64
-# define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((jmpbuf)[JB_RSP]))
-# else
-# define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
- ((void *) (address) < (void *) demangle ((jmpbuf)[JB_SP]))
-# endif
-#endif
-
#endif /* bits/setjmp.h */
diff --git a/sysdeps/x86_64/jmpbuf-unwind.h b/sysdeps/x86_64/jmpbuf-unwind.h
index 2d1187df70..c7c0d8ac03 100644
--- a/sysdeps/x86_64/jmpbuf-unwind.h
+++ b/sysdeps/x86_64/jmpbuf-unwind.h
@@ -22,6 +22,11 @@
#include <unwind.h>
#include <sysdep.h>
+/* Test if longjmp to JMPBUF would unwind the frame
+ containing a local variable at ADDRESS. */
+#define _JMPBUF_UNWINDS(jmpbuf, address, demangle) \
+ ((void *) (address) < (void *) demangle ((jmpbuf)[JB_RSP]))
+
#define _JMPBUF_CFA_UNWINDS_ADJ(_jmpbuf, _context, _adj) \
_JMPBUF_UNWINDS_ADJ (_jmpbuf, (void *) _Unwind_GetCFA (_context), _adj)