about summary refs log tree commit diff
path: root/sysdeps/i386/__longjmp.S
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
committerUlrich Drepper <drepper@redhat.com>2004-12-22 20:10:10 +0000
commita334319f6530564d22e775935d9c91663623a1b4 (patch)
treeb5877475619e4c938e98757d518bb1e9cbead751 /sysdeps/i386/__longjmp.S
parent0ecb606cb6cf65de1d9fc8a919bceb4be476c602 (diff)
downloadglibc-a334319f6530564d22e775935d9c91663623a1b4.tar.gz
glibc-a334319f6530564d22e775935d9c91663623a1b4.tar.xz
glibc-a334319f6530564d22e775935d9c91663623a1b4.zip
(CFLAGS-tst-align.c): Add -mpreferred-stack-boundary=4.
Diffstat (limited to 'sysdeps/i386/__longjmp.S')
-rw-r--r--sysdeps/i386/__longjmp.S37
1 files changed, 4 insertions, 33 deletions
diff --git a/sysdeps/i386/__longjmp.S b/sysdeps/i386/__longjmp.S
index 559d56b250..6b590f7f04 100644
--- a/sysdeps/i386/__longjmp.S
+++ b/sysdeps/i386/__longjmp.S
@@ -1,5 +1,5 @@
 /* longjmp for i386.
-   Copyright (C) 1995-1998,2000,2002,2005, 2006 Free Software Foundation, Inc.
+   Copyright (C) 1995,1996,1997,1998,2000,2002 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
@@ -18,7 +18,9 @@
    02111-1307 USA.  */
 
 #include <sysdep.h>
-#include <jmpbuf-offsets.h>
+#define _ASM
+#define _SETJMP_H
+#include <bits/setjmp.h>
 #include <asm-syntax.h>
 #include <bp-sym.h>
 #include <bp-asm.h>
@@ -30,36 +32,6 @@
 ENTRY (BP_SYM (__longjmp))
 	ENTER
 
-#ifdef PTR_DEMANGLE
-	movl JBUF(%esp), %eax	/* User's jmp_buf in %eax.  */
-	CHECK_BOUNDS_BOTH_WIDE (%eax, JBUF(%esp), $JB_SIZE)
-
-	/* Save the return address now.  */
-	movl (JB_PC*4)(%eax), %edx
-	/* Get the stack pointer.  */
-	movl (JB_SP*4)(%eax), %ecx
-	PTR_DEMANGLE (%edx)
-	PTR_DEMANGLE (%ecx)
-	cfi_def_cfa(%eax, 0)
-	cfi_register(%eip, %edx)
-	cfi_register(%esp, %ecx)
-	cfi_offset(%ebx, JB_BX*4)
-	cfi_offset(%esi, JB_SI*4)
-	cfi_offset(%edi, JB_DI*4)
-	cfi_offset(%ebp, JB_BP*4)
-     	/* Restore registers.  */
-	movl (JB_BX*4)(%eax), %ebx
-	movl (JB_SI*4)(%eax), %esi
-	movl (JB_DI*4)(%eax), %edi
-	movl (JB_BP*4)(%eax), %ebp
-	cfi_restore(%ebx)
-	cfi_restore(%esi)
-	cfi_restore(%edi)
-	cfi_restore(%ebp)
-
-	movl VAL(%esp), %eax	/* Second argument is return value.  */
-	movl %ecx, %esp
-#else
 	movl JBUF(%esp), %ecx	/* User's jmp_buf in %ecx.  */
 	CHECK_BOUNDS_BOTH_WIDE (%ecx, JBUF(%esp), $JB_SIZE)
 
@@ -72,7 +44,6 @@ ENTRY (BP_SYM (__longjmp))
 	movl (JB_DI*4)(%ecx), %edi
 	movl (JB_BP*4)(%ecx), %ebp
 	movl (JB_SP*4)(%ecx), %esp
-#endif
 	/* Jump to saved PC.  */
      	jmp *%edx
 END (BP_SYM (__longjmp))