about summary refs log tree commit diff
path: root/sysdeps/i386/jmp_buf.h
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>1995-08-31 17:33:01 +0000
committerRoland McGrath <roland@gnu.org>1995-08-31 17:33:01 +0000
commite3726b056b3b1cfde7019e29d5d3c50ce70e08e9 (patch)
tree97695fe42ef6e492efc0d3b728218746d4ccae7e /sysdeps/i386/jmp_buf.h
parenta993273c0d4d1907028adee7a2ae012826fd316c (diff)
downloadglibc-e3726b056b3b1cfde7019e29d5d3c50ce70e08e9.tar.gz
glibc-e3726b056b3b1cfde7019e29d5d3c50ce70e08e9.tar.xz
glibc-e3726b056b3b1cfde7019e29d5d3c50ce70e08e9.zip
Rewrote i386 setjmp in assembly.
Thu Aug 31 13:23:35 1995  Roland McGrath  <roland@churchy.gnu.ai.mit.edu>

	* sysdeps/unix/i386/brk.S [PIC]: Set __curbrk through the GOT.

	Rewrote i386 setjmp code in assembly, so as to avoid fighting
	with the compiler for the register values.
	* sysdeps/i386/setjmp.S, sysdeps/i386/__longjmp.S: New files.
	* sysdeps/i386/setjmp.c, sysdeps/i386/__longjmp.c: Files removed.
	* sysdeps/i386/jmp_buf.h [! _ASM] (__jmp_buf): Define as array of ints.
	[__USE_MISC || _ASM] (JB_*): New macros, for indices therein.
	(_JMPBUF_UNWINDS): Use JB_SP.
Diffstat (limited to 'sysdeps/i386/jmp_buf.h')
-rw-r--r--sysdeps/i386/jmp_buf.h21
1 files changed, 13 insertions, 8 deletions
diff --git a/sysdeps/i386/jmp_buf.h b/sysdeps/i386/jmp_buf.h
index 7949883b60..0c03073b36 100644
--- a/sysdeps/i386/jmp_buf.h
+++ b/sysdeps/i386/jmp_buf.h
@@ -1,14 +1,19 @@
 /* Define the machine-dependent type `jmp_buf'.  Intel 386 version.  */
 
-typedef struct
-  {
-    long int __bx, __si, __di;
-    __ptr_t __bp;
-    __ptr_t __sp;
-    __ptr_t __pc;
-  } __jmp_buf[1];
+#if	defined (__USE_MISC) || defined (_ASM)
+#define	JB_BX	0
+#define	JB_SI	1
+#define	JB_DI	2
+#define	JB_BP	3
+#define	JB_SP	4
+#define	JB_PC	5
+#endif
+
+#ifndef	_ASM
+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) \
-  ((__ptr_t) (address) < (jmpbuf)[0].__sp)
+  ((int) (address) < (jmpbuf)[JB_SP])