about summary refs log tree commit diff
path: root/sysdeps
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1996-03-12 10:01:41 +0000
committerRoland McGrath <roland@gnu.org>1996-03-12 10:01:41 +0000
commit6c46dada59a56f8748f6d956ef5d318155195840 (patch)
treee3811ee4b324730a87c0e77552ba8261ed117557 /sysdeps
parent1177c8babf74c7335c5f3bf09c45961bebeed6c6 (diff)
downloadglibc-6c46dada59a56f8748f6d956ef5d318155195840.tar.gz
glibc-6c46dada59a56f8748f6d956ef5d318155195840.tar.xz
glibc-6c46dada59a56f8748f6d956ef5d318155195840.zip
Tue Mar 12 04:57:57 1996 Roland McGrath <roland@charlie-brown.gnu.ai.mit.edu> cvs/libc-960314 cvs/libc-960313 cvs/libc-960312
	* setjmp/Makefile (tests): Add jmpbug.
	* setjmp/jmpbug.c: New file.
Diffstat (limited to 'sysdeps')
-rw-r--r--sysdeps/sparc/__longjmp.S1
-rw-r--r--sysdeps/sparc/jmp_buf.h22
-rw-r--r--sysdeps/sparc/setjmp.S2
3 files changed, 15 insertions, 10 deletions
diff --git a/sysdeps/sparc/__longjmp.S b/sysdeps/sparc/__longjmp.S
index 38bc7bbac8..5424300fe5 100644
--- a/sysdeps/sparc/__longjmp.S
+++ b/sysdeps/sparc/__longjmp.S
@@ -18,6 +18,7 @@ Cambridge, MA 02139, USA.  */
 
 #include <sysdep.h>
 
+#define _ASM 1
 #include <jmp_buf.h>
 #define ENV(reg) [%g1 + (reg * 4)]
 
diff --git a/sysdeps/sparc/jmp_buf.h b/sysdeps/sparc/jmp_buf.h
index a5a592fd47..43bae1a496 100644
--- a/sysdeps/sparc/jmp_buf.h
+++ b/sysdeps/sparc/jmp_buf.h
@@ -1,14 +1,16 @@
 /* Define the machine-dependent type `jmp_buf'.  SPARC version.  */
 
-/* NOTE: The assembly code in __longjmp.S and setjmp.S knows the layout
-   of this structure.  You must hack the assembly code if you want to change
-   the order of the members.  */
+#if	defined (__USE_MISC) || defined (_ASM)
+#define	JB_SP	0
+#define	JB_FP	1
+#define	JB_PC	2
+#endif
 
-typedef struct
-  {
-    /* Return PC (register o7).  */
-    __ptr_t __pc;
+#ifndef	_ASM
+typedef int __jmp_buf[3];
+#endif
 
-    /* Saved FP.  */
-    __ptr_t __fp;
-  } __jmp_buf[1];
+/* Test if longjmp to JMPBUF would unwind the frame
+   containing a local variable at ADDRESS.  */
+#define _JMPBUF_UNWINDS(jmpbuf, address) \
+  ((int) (address) < (jmpbuf)[JB_SP])
diff --git a/sysdeps/sparc/setjmp.S b/sysdeps/sparc/setjmp.S
index 2cf92cddd7..db8a3c2916 100644
--- a/sysdeps/sparc/setjmp.S
+++ b/sysdeps/sparc/setjmp.S
@@ -17,6 +17,8 @@ not, write to the Free Software Foundation, Inc., 675 Mass Ave,
 Cambridge, MA 02139, USA.  */
 
 #include <sysdep.h>
+
+#define _ASM 1
 #include <jmp_buf.h>
 
 ENTRY (__sigsetjmp)