Fix stack alignment on x86_64
authorAndreas Schwab <schwab@redhat.com>
Tue, 9 Aug 2011 14:07:10 +0000 (10:07 -0400)
committerUlrich Drepper <drepper@gmail.com>
Tue, 9 Aug 2011 14:07:10 +0000 (10:07 -0400)
nptl/ChangeLog
nptl/sysdeps/unix/sysv/linux/x86_64/cancellation.S
nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S
nptl/sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S

index 5920800a9f014ced80203ace5822853f377b6ee4..1dc5f20815877f730d16b937a9c3419e62b17faa 100644 (file)
@@ -1,3 +1,10 @@
+2011-08-08  Andreas Schwab  <schwab@redhat.com>
+
+       * sysdeps/unix/sysv/linux/x86_64/cancellation.S: Maintain aligned
+       stack.
+       * sysdeps/unix/sysv/linux/x86_64/pthread_cond_timedwait.S: Likewise.
+       * sysdeps/unix/sysv/linux/x86_64/pthread_cond_wait.S: Likewise.
+
 2011-07-22  Ulrich Drepper  <drepper@gmail.com>
 
        * sysdeps/pthread/unwind-forcedunwind.c (_Unwind_Resume): Add read
index 680696200a606aa8b6b8586de342b727abddebbb..a06cd9b9b9dfb4d64ca633e9718a358e7124046e 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2009, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2009.
 
@@ -71,7 +71,9 @@ ENTRY(__pthread_enable_asynccancel)
 
 1:     ret
 
-3:     movq    $TCB_PTHREAD_CANCELED, %fs:RESULT
+3:     subq    $8, %rsp
+       cfi_adjust_cfa_offset(8)
+       movq    $TCB_PTHREAD_CANCELED, %fs:RESULT
        lock
        orl     $TCB_EXITING_BITMASK, %fs:CANCELHANDLING
        movq    %fs:CLEANUP_JMP_BUF, %rdi
index e6535fb9a790dee1b6f855bde47249ad1911dd71..48ea8b967ed77e787c55730515d83eeecf8b20df 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2005, 2007, 2009, 2010 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2005, 2007, 2009, 2010, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -63,9 +63,9 @@ __pthread_cond_timedwait:
        cfi_adjust_cfa_offset(8)
        cfi_rel_offset(%r15, 0)
 #ifdef __ASSUME_FUTEX_CLOCK_REALTIME
-# define FRAME_SIZE 32
+# define FRAME_SIZE (32+8)
 #else
-# define FRAME_SIZE 48
+# define FRAME_SIZE (48+8)
 #endif
        subq    $FRAME_SIZE, %rsp
        cfi_adjust_cfa_offset(FRAME_SIZE)
index f5b929ea71b1aeea15f5e9fe7fce6f666721afee..7535baa78654cd46a9b59f4008df64b9d5c74a80 100644 (file)
@@ -1,4 +1,4 @@
-/* Copyright (C) 2002-2007, 2009 Free Software Foundation, Inc.
+/* Copyright (C) 2002-2007, 2009, 2011 Free Software Foundation, Inc.
    This file is part of the GNU C Library.
    Contributed by Ulrich Drepper <drepper@redhat.com>, 2002.
 
@@ -45,7 +45,7 @@ __pthread_cond_wait:
        cfi_lsda(DW_EH_PE_udata4, .LexceptSTART)
 #endif
 
-#define FRAME_SIZE 32
+#define FRAME_SIZE (32+8)
        leaq    -FRAME_SIZE(%rsp), %rsp
        cfi_adjust_cfa_offset(FRAME_SIZE)