about summary refs log tree commit diff
path: root/sysdeps/i386/bp-asm.h
diff options
context:
space:
mode:
authorGreg McGary <greg@mcgary.org>2000-06-29 22:55:31 +0000
committerGreg McGary <greg@mcgary.org>2000-06-29 22:55:31 +0000
commite5f88e0ca0d2762ca87263ee01d13e9950de403d (patch)
tree88f266651d99e6be69fd69c46935bfb81bf33676 /sysdeps/i386/bp-asm.h
parentd3d89ab3a83ad036d7ea4794d044a1e710598fcd (diff)
downloadglibc-e5f88e0ca0d2762ca87263ee01d13e9950de403d.tar.gz
glibc-e5f88e0ca0d2762ca87263ee01d13e9950de403d.tar.xz
glibc-e5f88e0ca0d2762ca87263ee01d13e9950de403d.zip
* sysdeps/i386/bp-asm.h (PCOFF): New constant.
(POP_ERRNO_LOCATION_RETURN): Fold insns. 
* sysdeps/i386/bits/setjmp.h (JB_SIZE): New constant. 
(PUSH_SIGNAL_MASK): New macro. 
* sysdeps/i386/__longjmp.S (__longjmp): Wrap symbol in BP_SYM (). 
LEAVE is unnecessary.  Check bounds of jmp_buf. 
* sysdeps/i386/elf/setjmp.S: Call PUSH_SIGNAL_MASK.  Wrap symbols 
in BP_SYM ().  Check bounds of jmp_buf.  Don't call LEAVE until 
immediately before tail-call. 
* sysdeps/i386/setjmp.S: Likewise. 
* sysdeps/i386/bsd-_setjmp.S: Likewise. 
* sysdeps/i386/bsd-setjmp.S: Likewise.
2000-06-29  Greg McGary  <greg@mcgary.org>

	* sysdeps/i386/bp-asm.h (PCOFF): New constant.
	(POP_ERRNO_LOCATION_RETURN): Fold insns.
	* sysdeps/i386/bits/setjmp.h (JB_SIZE): New constant.
	(PUSH_SIGNAL_MASK): New macro.
	* sysdeps/i386/__longjmp.S (__longjmp): Wrap symbol in BP_SYM ().
	LEAVE is unnecessary.  Check bounds of jmp_buf.
	* sysdeps/i386/elf/setjmp.S: Call PUSH_SIGNAL_MASK.  Wrap symbols
	in BP_SYM ().  Check bounds of jmp_buf.  Don't call LEAVE until
	immediately before tail-call.
	* sysdeps/i386/setjmp.S: Likewise.
	* sysdeps/i386/bsd-_setjmp.S: Likewise.
	* sysdeps/i386/bsd-setjmp.S: Likewise.
Diffstat (limited to 'sysdeps/i386/bp-asm.h')
-rw-r--r--sysdeps/i386/bp-asm.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/sysdeps/i386/bp-asm.h b/sysdeps/i386/bp-asm.h
index 197c6da88c..bde1f6a14a 100644
--- a/sysdeps/i386/bp-asm.h
+++ b/sysdeps/i386/bp-asm.h
@@ -43,6 +43,8 @@
 /* Stack space overhead of procedure-call linkage: return address and
    frame pointer.  */
 #   define LINKAGE 8
+/* Stack offset of return address after calling ENTER.  */
+#   define PCOFF 4
 
 /* Int 5 is the "bound range" exception also raised by the "bound"
    instruction.  */
@@ -106,8 +108,7 @@
    argument, but we must pop the space for the BP itself.  We also
    dereference the return value in order to dig out the pointer value.  */
 #   define POP_ERRNO_LOCATION_RETURN		\
-	movl (%esp), %eax;			\
-	addl $4, %esp;				\
+	popl %eax;				\
 	addl $8, %esp
 
 #  else /* !__BOUNDED_POINTERS__ */
@@ -123,6 +124,8 @@
 #   define LEAVE
 /* Stack space overhead of procedure-call linkage: return address only.  */
 #   define LINKAGE 4
+/* Stack offset of return address after calling ENTER.  */
+#   define PCOFF 0
 
 #   define CHECK_BOUNDS_LOW(VAL_REG, BP_MEM)
 #   define CHECK_BOUNDS_HIGH(VAL_REG, BP_MEM, Jcc)