Add CFI to x86 ceil / floor / trunc (bug 16681).

This patch adds CFI to the sysdeps/i386/fpu/ implementations of ceil,
floor and trunc functions, for consistency with other x86 .S files in
glibc which have CFI for stack adjustments.

Tested x86.

	[BZ #16681]
	* sysdeps/i386/fpu/s_ceil.S (__ceil): Add CFI.
	* sysdeps/i386/fpu/s_ceilf.S (__ceilf): Likewise.
	* sysdeps/i386/fpu/s_ceill.S (__ceill): Likewise.
	* sysdeps/i386/fpu/s_floor.S (__floor): Likewise.
	* sysdeps/i386/fpu/s_floorf.S (__floorf): Likewise.
	* sysdeps/i386/fpu/s_floorl.S (__floorl): Likewise.
	* sysdeps/i386/fpu/s_trunc.S (__trunc): Likewise.
	* sysdeps/i386/fpu/s_truncf.S (__truncf): Likewise.
	* sysdeps/i386/fpu/s_truncl.S (__truncl): Likewise.
This commit is contained in:
Joseph Myers 2014-06-16 22:54:46 +00:00
parent a76e63c586
commit 91c03c5389
11 changed files with 36 additions and 5 deletions

View File

@ -1,3 +1,16 @@
2014-06-16 Joseph Myers <joseph@codesourcery.com>
[BZ #16681]
* sysdeps/i386/fpu/s_ceil.S (__ceil): Add CFI.
* sysdeps/i386/fpu/s_ceilf.S (__ceilf): Likewise.
* sysdeps/i386/fpu/s_ceill.S (__ceill): Likewise.
* sysdeps/i386/fpu/s_floor.S (__floor): Likewise.
* sysdeps/i386/fpu/s_floorf.S (__floorf): Likewise.
* sysdeps/i386/fpu/s_floorl.S (__floorl): Likewise.
* sysdeps/i386/fpu/s_trunc.S (__trunc): Likewise.
* sysdeps/i386/fpu/s_truncf.S (__truncf): Likewise.
* sysdeps/i386/fpu/s_truncl.S (__truncl): Likewise.
2014-06-17 Andreas Schwab <schwab@linux-m68k.org> 2014-06-17 Andreas Schwab <schwab@linux-m68k.org>
* sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update. * sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update.

10
NEWS
View File

@ -9,11 +9,11 @@ Version 2.20
* The following bugs are resolved with this release: * The following bugs are resolved with this release:
6804, 9894, 12994, 13347, 13651, 14308, 14770, 15119, 15132, 15347, 6804, 9894, 12994, 13347, 13651, 14308, 14770, 15119, 15132, 15347, 15514,
15514, 15698, 15804, 15894, 15946, 16002, 16064, 16095, 16198, 16284, 15698, 15804, 15894, 15946, 16002, 16064, 16095, 16198, 16284, 16348,
16348, 16349, 16357, 16362, 16447, 16516, 16532, 16545, 16564, 16574, 16349, 16357, 16362, 16447, 16516, 16532, 16545, 16564, 16574, 16599,
16599, 16600, 16609, 16610, 16611, 16613, 16619, 16623, 16629, 16632, 16600, 16609, 16610, 16611, 16613, 16619, 16623, 16629, 16632, 16634,
16634, 16639, 16642, 16648, 16649, 16670, 16674, 16677, 16680, 16683, 16639, 16642, 16648, 16649, 16670, 16674, 16677, 16680, 16681, 16683,
16689, 16695, 16701, 16706, 16707, 16712, 16713, 16714, 16724, 16731, 16689, 16695, 16701, 16706, 16707, 16712, 16713, 16714, 16724, 16731,
16739, 16740, 16743, 16754, 16758, 16759, 16760, 16770, 16786, 16789, 16739, 16740, 16743, 16754, 16758, 16759, 16760, 16770, 16786, 16789,
16791, 16796, 16799, 16800, 16815, 16823, 16824, 16831, 16838, 16849, 16791, 16796, 16799, 16800, 16815, 16823, 16824, 16831, 16838, 16849,

View File

@ -10,6 +10,7 @@ RCSID("$NetBSD: s_ceil.S,v 1.4 1995/05/08 23:52:13 jtc Exp $")
ENTRY(__ceil) ENTRY(__ceil)
fldl 4(%esp) fldl 4(%esp)
subl $8,%esp subl $8,%esp
cfi_adjust_cfa_offset (8)
fstcw 4(%esp) /* store fpu control word */ fstcw 4(%esp) /* store fpu control word */
@ -27,6 +28,7 @@ ENTRY(__ceil)
fldcw 4(%esp) /* restore original control word */ fldcw 4(%esp) /* restore original control word */
addl $8,%esp addl $8,%esp
cfi_adjust_cfa_offset (-8)
ret ret
END (__ceil) END (__ceil)
weak_alias (__ceil, ceil) weak_alias (__ceil, ceil)

View File

@ -10,6 +10,7 @@ RCSID("$NetBSD: s_ceilf.S,v 1.3 1995/05/08 23:52:44 jtc Exp $")
ENTRY(__ceilf) ENTRY(__ceilf)
flds 4(%esp) flds 4(%esp)
subl $8,%esp subl $8,%esp
cfi_adjust_cfa_offset (8)
fstcw 4(%esp) /* store fpu control word */ fstcw 4(%esp) /* store fpu control word */
@ -27,6 +28,7 @@ ENTRY(__ceilf)
fldcw 4(%esp) /* restore original control word */ fldcw 4(%esp) /* restore original control word */
addl $8,%esp addl $8,%esp
cfi_adjust_cfa_offset (-8)
ret ret
END (__ceilf) END (__ceilf)
weak_alias (__ceilf, ceilf) weak_alias (__ceilf, ceilf)

View File

@ -11,6 +11,7 @@ RCSID("$NetBSD: $")
ENTRY(__ceill) ENTRY(__ceill)
fldt 4(%esp) fldt 4(%esp)
subl $8,%esp subl $8,%esp
cfi_adjust_cfa_offset (8)
fstcw 4(%esp) /* store fpu control word */ fstcw 4(%esp) /* store fpu control word */
@ -28,6 +29,7 @@ ENTRY(__ceill)
fldcw 4(%esp) /* restore original control word */ fldcw 4(%esp) /* restore original control word */
addl $8,%esp addl $8,%esp
cfi_adjust_cfa_offset (-8)
ret ret
END (__ceill) END (__ceill)
weak_alias (__ceill, ceill) weak_alias (__ceill, ceill)

View File

@ -10,6 +10,7 @@ RCSID("$NetBSD: s_floor.S,v 1.4 1995/05/09 00:01:59 jtc Exp $")
ENTRY(__floor) ENTRY(__floor)
fldl 4(%esp) fldl 4(%esp)
subl $8,%esp subl $8,%esp
cfi_adjust_cfa_offset (8)
fstcw 4(%esp) /* store fpu control word */ fstcw 4(%esp) /* store fpu control word */
@ -27,6 +28,7 @@ ENTRY(__floor)
fldcw 4(%esp) /* restore original control word */ fldcw 4(%esp) /* restore original control word */
addl $8,%esp addl $8,%esp
cfi_adjust_cfa_offset (-8)
ret ret
END (__floor) END (__floor)
weak_alias (__floor, floor) weak_alias (__floor, floor)

View File

@ -10,6 +10,7 @@ RCSID("$NetBSD: s_floorf.S,v 1.3 1995/05/09 00:04:32 jtc Exp $")
ENTRY(__floorf) ENTRY(__floorf)
flds 4(%esp) flds 4(%esp)
subl $8,%esp subl $8,%esp
cfi_adjust_cfa_offset (8)
fstcw 4(%esp) /* store fpu control word */ fstcw 4(%esp) /* store fpu control word */
@ -27,6 +28,7 @@ ENTRY(__floorf)
fldcw 4(%esp) /* restore original control word */ fldcw 4(%esp) /* restore original control word */
addl $8,%esp addl $8,%esp
cfi_adjust_cfa_offset (-8)
ret ret
END (__floorf) END (__floorf)
weak_alias (__floorf, floorf) weak_alias (__floorf, floorf)

View File

@ -11,6 +11,7 @@ RCSID("$NetBSD: $")
ENTRY(__floorl) ENTRY(__floorl)
fldt 4(%esp) fldt 4(%esp)
subl $8,%esp subl $8,%esp
cfi_adjust_cfa_offset (8)
fstcw 4(%esp) /* store fpu control word */ fstcw 4(%esp) /* store fpu control word */
@ -28,6 +29,7 @@ ENTRY(__floorl)
fldcw 4(%esp) /* restore original control word */ fldcw 4(%esp) /* restore original control word */
addl $8,%esp addl $8,%esp
cfi_adjust_cfa_offset (-8)
ret ret
END (__floorl) END (__floorl)
weak_alias (__floorl, floorl) weak_alias (__floorl, floorl)

View File

@ -22,6 +22,7 @@
ENTRY(__trunc) ENTRY(__trunc)
fldl 4(%esp) fldl 4(%esp)
subl $8, %esp subl $8, %esp
cfi_adjust_cfa_offset (8)
fstcw 4(%esp) fstcw 4(%esp)
movl $0xc00, %edx movl $0xc00, %edx
orl 4(%esp), %edx orl 4(%esp), %edx
@ -30,6 +31,7 @@ ENTRY(__trunc)
frndint frndint
fldcw 4(%esp) fldcw 4(%esp)
addl $8, %esp addl $8, %esp
cfi_adjust_cfa_offset (-8)
ret ret
END(__trunc) END(__trunc)
weak_alias (__trunc, trunc) weak_alias (__trunc, trunc)

View File

@ -22,6 +22,7 @@
ENTRY(__truncf) ENTRY(__truncf)
flds 4(%esp) flds 4(%esp)
subl $8, %esp subl $8, %esp
cfi_adjust_cfa_offset (8)
fstcw 4(%esp) fstcw 4(%esp)
movl $0xc00, %edx movl $0xc00, %edx
orl 4(%esp), %edx orl 4(%esp), %edx
@ -30,6 +31,7 @@ ENTRY(__truncf)
frndint frndint
fldcw 4(%esp) fldcw 4(%esp)
addl $8, %esp addl $8, %esp
cfi_adjust_cfa_offset (-8)
ret ret
END(__truncf) END(__truncf)
weak_alias (__truncf, truncf) weak_alias (__truncf, truncf)

View File

@ -22,6 +22,7 @@
ENTRY(__truncl) ENTRY(__truncl)
fldt 4(%esp) fldt 4(%esp)
subl $8, %esp subl $8, %esp
cfi_adjust_cfa_offset (8)
fstcw 4(%esp) fstcw 4(%esp)
movl $0xc00, %edx movl $0xc00, %edx
orl 4(%esp), %edx orl 4(%esp), %edx
@ -30,6 +31,7 @@ ENTRY(__truncl)
frndint frndint
fldcw 4(%esp) fldcw 4(%esp)
addl $8, %esp addl $8, %esp
cfi_adjust_cfa_offset (-8)
ret ret
END(__truncl) END(__truncl)
weak_alias (__truncl, truncl) weak_alias (__truncl, truncl)