diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-07-12 14:40:25 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-08-05 08:36:18 -0700 |
commit | b4425b95ad64e5945ea9674f888561d725747128 (patch) | |
tree | d1c048c18f885aaa810eb29c475cec72a23cd47d | |
parent | 8e1f346462d8c1b238a7c6bb501c45b381a45e4d (diff) | |
download | glibc-b4425b95ad64e5945ea9674f888561d725747128.tar.gz glibc-b4425b95ad64e5945ea9674f888561d725747128.tar.xz glibc-b4425b95ad64e5945ea9674f888561d725747128.zip |
Align stack to 16 bytes when calling __gettimeofday
Subtract stack by 24 bytes instead of 16 bytes so that stack is aligned to 16 bytes when calling __gettimeofday. [BZ #18661] * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S (__lll_timedwait_tid): Align stack to 16 bytes when calling __gettimeofday.
-rw-r--r-- | ChangeLog | 7 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/x86_64/lowlevellock.S | 9 |
2 files changed, 12 insertions, 4 deletions
diff --git a/ChangeLog b/ChangeLog index 8a47768e03..763771e848 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,6 +1,13 @@ 2015-08-05 H.J. Lu <hongjiu.lu@intel.com> [BZ #18661] + * sysdeps/unix/sysv/linux/x86_64/lowlevellock.S + (__lll_timedwait_tid): Align stack to 16 bytes when calling + __gettimeofday. + +2015-08-05 H.J. Lu <hongjiu.lu@intel.com> + + [BZ #18661] * sysdeps/unix/sysv/linux/x86_64/__start_context.S (__start_context): Don't use pop to restore %rdi so that stack is aligned to 16 bytes when calling __setcontext. diff --git a/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S b/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S index 0935db5ba4..8e1a39dafb 100644 --- a/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S +++ b/sysdeps/unix/sysv/linux/x86_64/lowlevellock.S @@ -394,8 +394,9 @@ __lll_timedwait_tid: movq %rdi, %r12 movq %rsi, %r13 - subq $16, %rsp - cfi_adjust_cfa_offset(16) + /* Align stack to 16 bytes when calling __gettimeofday. */ + subq $24, %rsp + cfi_adjust_cfa_offset(24) /* Get current time. */ 2: movq %rsp, %rdi @@ -441,8 +442,8 @@ __lll_timedwait_tid: jne 1f 4: xorl %eax, %eax -8: addq $16, %rsp - cfi_adjust_cfa_offset(-16) +8: addq $24, %rsp + cfi_adjust_cfa_offset(-24) popq %r13 cfi_adjust_cfa_offset(-8) cfi_restore(%r13) |