diff options
author | H.J. Lu <hjl.tools@gmail.com> | 2015-07-12 14:41:20 -0700 |
---|---|---|
committer | H.J. Lu <hjl.tools@gmail.com> | 2015-08-03 14:32:47 -0700 |
commit | b4bf7d64c8f7597cc03abd608b50064f7cca4f40 (patch) | |
tree | 6a0531634fbc474e1c9e548e142b8489fcd82995 /sysdeps | |
parent | 1c8f0fb6a4ebef1080e254753e6a4e6c07a66a4f (diff) | |
download | glibc-b4bf7d64c8f7597cc03abd608b50064f7cca4f40.tar.gz glibc-b4bf7d64c8f7597cc03abd608b50064f7cca4f40.tar.xz glibc-b4bf7d64c8f7597cc03abd608b50064f7cca4f40.zip |
Align stack when calling __errno_location
We should align stack to 16 bytes when calling __errno_location. [BZ #18661] * sysdeps/x86_64/fpu/s_cosf.S (__cosf): Align stack to 16 bytes when calling __errno_location. * sysdeps/x86_64/fpu/s_sincosf.S (__sincosf): Likewise. * sysdeps/x86_64/fpu/s_sinf.S (__sinf): Likewise.
Diffstat (limited to 'sysdeps')
-rw-r--r-- | sysdeps/x86_64/fpu/s_cosf.S | 6 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/s_sincosf.S | 6 | ||||
-rw-r--r-- | sysdeps/x86_64/fpu/s_sinf.S | 6 |
3 files changed, 18 insertions, 0 deletions
diff --git a/sysdeps/x86_64/fpu/s_cosf.S b/sysdeps/x86_64/fpu/s_cosf.S index b7868ceb20..bea10ef089 100644 --- a/sysdeps/x86_64/fpu/s_cosf.S +++ b/sysdeps/x86_64/fpu/s_cosf.S @@ -310,8 +310,14 @@ L(arg_inf_or_nan): /* Here if |x| is Inf or NAN */ jne L(skip_errno_setting) /* in case of x is NaN */ + /* Align stack to 16 bytes. */ + subq $8, %rsp + cfi_adjust_cfa_offset (8) /* Here if x is Inf. Set errno to EDOM. */ call JUMPTARGET(__errno_location) + addq $8, %rsp + cfi_adjust_cfa_offset (-8) + movl $EDOM, (%rax) .p2align 4 diff --git a/sysdeps/x86_64/fpu/s_sincosf.S b/sysdeps/x86_64/fpu/s_sincosf.S index 21db70a88b..a2f313338f 100644 --- a/sysdeps/x86_64/fpu/s_sincosf.S +++ b/sysdeps/x86_64/fpu/s_sincosf.S @@ -354,8 +354,14 @@ L(arg_inf_or_nan): /* Here if |x| is Inf or NAN */ jne L(skip_errno_setting) /* in case of x is NaN */ + /* Align stack to 16 bytes. */ + subq $8, %rsp + cfi_adjust_cfa_offset (8) /* Here if x is Inf. Set errno to EDOM. */ call JUMPTARGET(__errno_location) + addq $8, %rsp + cfi_adjust_cfa_offset (-8) + movl $EDOM, (%rax) .p2align 4 diff --git a/sysdeps/x86_64/fpu/s_sinf.S b/sysdeps/x86_64/fpu/s_sinf.S index dc921641de..90afbe8e5f 100644 --- a/sysdeps/x86_64/fpu/s_sinf.S +++ b/sysdeps/x86_64/fpu/s_sinf.S @@ -336,8 +336,14 @@ L(arg_inf_or_nan): /* Here if |x| is Inf or NAN */ jne L(skip_errno_setting) /* in case of x is NaN */ + /* Align stack to 16 bytes. */ + subq $8, %rsp + cfi_adjust_cfa_offset (8) /* Here if x is Inf. Set errno to EDOM. */ call JUMPTARGET(__errno_location) + addq $8, %rsp + cfi_adjust_cfa_offset (-8) + movl $EDOM, (%rax) .p2align 4 |