From 6c46dada59a56f8748f6d956ef5d318155195840 Mon Sep 17 00:00:00 2001 From: Roland McGrath Date: Tue, 12 Mar 1996 10:01:41 +0000 Subject: Tue Mar 12 04:57:57 1996 Roland McGrath * setjmp/Makefile (tests): Add jmpbug. * setjmp/jmpbug.c: New file. --- sysdeps/sparc/jmp_buf.h | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) (limited to 'sysdeps/sparc/jmp_buf.h') 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]) -- cgit 1.4.1