Skip to content

Commit

Permalink
Align stack to 16 bytes when calling __errno_location
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
H.J. Lu committed Aug 5, 2015
1 parent b4425b9 commit 72354ab
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 1 deletion.
8 changes: 8 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
@@ -1,3 +1,11 @@
2015-08-05 H.J. Lu <hongjiu.lu@intel.com>

[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.

2015-08-05 H.J. Lu <hongjiu.lu@intel.com>

[BZ #18661]
Expand Down
2 changes: 1 addition & 1 deletion NEWS
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ using `glibc' in the "product" field.
Version 2.23

* The following bugs are resolved with this release:
18265, 18525, 18647.
18265, 18525, 18647, 18661.

Version 2.22

Expand Down
6 changes: 6 additions & 0 deletions sysdeps/x86_64/fpu/s_cosf.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions sysdeps/x86_64/fpu/s_sincosf.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
6 changes: 6 additions & 0 deletions sysdeps/x86_64/fpu/s_sinf.S
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 72354ab

Please sign in to comment.