about summary refs log tree commit diff
diff options
context:
space:
mode:
authorJoseph Myers <joseph@codesourcery.com>2014-06-16 22:54:46 +0000
committerJoseph Myers <joseph@codesourcery.com>2014-06-16 22:54:46 +0000
commit91c03c5389ed957da852de60e0e508cc682d9b12 (patch)
tree6e147d53351a7ddbc9f8d74c8705c155686300de
parenta76e63c586f40a824f738219bd473cb890af9ea7 (diff)
downloadglibc-91c03c5389ed957da852de60e0e508cc682d9b12.tar.gz
glibc-91c03c5389ed957da852de60e0e508cc682d9b12.tar.xz
glibc-91c03c5389ed957da852de60e0e508cc682d9b12.zip
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.
-rw-r--r--ChangeLog13
-rw-r--r--NEWS10
-rw-r--r--sysdeps/i386/fpu/s_ceil.S2
-rw-r--r--sysdeps/i386/fpu/s_ceilf.S2
-rw-r--r--sysdeps/i386/fpu/s_ceill.S2
-rw-r--r--sysdeps/i386/fpu/s_floor.S2
-rw-r--r--sysdeps/i386/fpu/s_floorf.S2
-rw-r--r--sysdeps/i386/fpu/s_floorl.S2
-rw-r--r--sysdeps/i386/fpu/s_trunc.S2
-rw-r--r--sysdeps/i386/fpu/s_truncf.S2
-rw-r--r--sysdeps/i386/fpu/s_truncl.S2
11 files changed, 36 insertions, 5 deletions
diff --git a/ChangeLog b/ChangeLog
index 43d183fd20..f8723fd944 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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>
 
 	* sysdeps/m68k/m680x0/fpu/libm-test-ulps: Update.
diff --git a/NEWS b/NEWS
index 52cd9b6aa8..0ba83dcaa7 100644
--- a/NEWS
+++ b/NEWS
@@ -9,11 +9,11 @@ Version 2.20
 
 * The following bugs are resolved with this release:
 
-  6804, 9894, 12994, 13347, 13651, 14308, 14770, 15119, 15132, 15347,
-  15514, 15698, 15804, 15894, 15946, 16002, 16064, 16095, 16198, 16284,
-  16348, 16349, 16357, 16362, 16447, 16516, 16532, 16545, 16564, 16574,
-  16599, 16600, 16609, 16610, 16611, 16613, 16619, 16623, 16629, 16632,
-  16634, 16639, 16642, 16648, 16649, 16670, 16674, 16677, 16680, 16683,
+  6804, 9894, 12994, 13347, 13651, 14308, 14770, 15119, 15132, 15347, 15514,
+  15698, 15804, 15894, 15946, 16002, 16064, 16095, 16198, 16284, 16348,
+  16349, 16357, 16362, 16447, 16516, 16532, 16545, 16564, 16574, 16599,
+  16600, 16609, 16610, 16611, 16613, 16619, 16623, 16629, 16632, 16634,
+  16639, 16642, 16648, 16649, 16670, 16674, 16677, 16680, 16681, 16683,
   16689, 16695, 16701, 16706, 16707, 16712, 16713, 16714, 16724, 16731,
   16739, 16740, 16743, 16754, 16758, 16759, 16760, 16770, 16786, 16789,
   16791, 16796, 16799, 16800, 16815, 16823, 16824, 16831, 16838, 16849,
diff --git a/sysdeps/i386/fpu/s_ceil.S b/sysdeps/i386/fpu/s_ceil.S
index b0159128aa..f32fa26d34 100644
--- a/sysdeps/i386/fpu/s_ceil.S
+++ b/sysdeps/i386/fpu/s_ceil.S
@@ -10,6 +10,7 @@ RCSID("$NetBSD: s_ceil.S,v 1.4 1995/05/08 23:52:13 jtc Exp $")
 ENTRY(__ceil)
 	fldl	4(%esp)
 	subl	$8,%esp
+	cfi_adjust_cfa_offset (8)
 
 	fstcw	4(%esp)			/* store fpu control word */
 
@@ -27,6 +28,7 @@ ENTRY(__ceil)
 	fldcw	4(%esp)			/* restore original control word */
 
 	addl	$8,%esp
+	cfi_adjust_cfa_offset (-8)
 	ret
 END (__ceil)
 weak_alias (__ceil, ceil)
diff --git a/sysdeps/i386/fpu/s_ceilf.S b/sysdeps/i386/fpu/s_ceilf.S
index 352d40d7ce..4fe703b179 100644
--- a/sysdeps/i386/fpu/s_ceilf.S
+++ b/sysdeps/i386/fpu/s_ceilf.S
@@ -10,6 +10,7 @@ RCSID("$NetBSD: s_ceilf.S,v 1.3 1995/05/08 23:52:44 jtc Exp $")
 ENTRY(__ceilf)
 	flds	4(%esp)
 	subl	$8,%esp
+	cfi_adjust_cfa_offset (8)
 
 	fstcw	4(%esp)			/* store fpu control word */
 
@@ -27,6 +28,7 @@ ENTRY(__ceilf)
 	fldcw	4(%esp)			/* restore original control word */
 
 	addl	$8,%esp
+	cfi_adjust_cfa_offset (-8)
 	ret
 END (__ceilf)
 weak_alias (__ceilf, ceilf)
diff --git a/sysdeps/i386/fpu/s_ceill.S b/sysdeps/i386/fpu/s_ceill.S
index 0128966ebe..4b272c522a 100644
--- a/sysdeps/i386/fpu/s_ceill.S
+++ b/sysdeps/i386/fpu/s_ceill.S
@@ -11,6 +11,7 @@ RCSID("$NetBSD: $")
 ENTRY(__ceill)
 	fldt	4(%esp)
 	subl	$8,%esp
+	cfi_adjust_cfa_offset (8)
 
 	fstcw	4(%esp)			/* store fpu control word */
 
@@ -28,6 +29,7 @@ ENTRY(__ceill)
 	fldcw	4(%esp)			/* restore original control word */
 
 	addl	$8,%esp
+	cfi_adjust_cfa_offset (-8)
 	ret
 END (__ceill)
 weak_alias (__ceill, ceill)
diff --git a/sysdeps/i386/fpu/s_floor.S b/sysdeps/i386/fpu/s_floor.S
index 20a8660424..2d6287dc79 100644
--- a/sysdeps/i386/fpu/s_floor.S
+++ b/sysdeps/i386/fpu/s_floor.S
@@ -10,6 +10,7 @@ RCSID("$NetBSD: s_floor.S,v 1.4 1995/05/09 00:01:59 jtc Exp $")
 ENTRY(__floor)
 	fldl	4(%esp)
 	subl	$8,%esp
+	cfi_adjust_cfa_offset (8)
 
 	fstcw	4(%esp)			/* store fpu control word */
 
@@ -27,6 +28,7 @@ ENTRY(__floor)
 	fldcw	4(%esp)			/* restore original control word */
 
 	addl	$8,%esp
+	cfi_adjust_cfa_offset (-8)
 	ret
 END (__floor)
 weak_alias (__floor, floor)
diff --git a/sysdeps/i386/fpu/s_floorf.S b/sysdeps/i386/fpu/s_floorf.S
index eca93a2aa3..e969fbe587 100644
--- a/sysdeps/i386/fpu/s_floorf.S
+++ b/sysdeps/i386/fpu/s_floorf.S
@@ -10,6 +10,7 @@ RCSID("$NetBSD: s_floorf.S,v 1.3 1995/05/09 00:04:32 jtc Exp $")
 ENTRY(__floorf)
 	flds	4(%esp)
 	subl	$8,%esp
+	cfi_adjust_cfa_offset (8)
 
 	fstcw	4(%esp)			/* store fpu control word */
 
@@ -27,6 +28,7 @@ ENTRY(__floorf)
 	fldcw	4(%esp)			/* restore original control word */
 
 	addl	$8,%esp
+	cfi_adjust_cfa_offset (-8)
 	ret
 END (__floorf)
 weak_alias (__floorf, floorf)
diff --git a/sysdeps/i386/fpu/s_floorl.S b/sysdeps/i386/fpu/s_floorl.S
index c2bf091d73..1206554c4a 100644
--- a/sysdeps/i386/fpu/s_floorl.S
+++ b/sysdeps/i386/fpu/s_floorl.S
@@ -11,6 +11,7 @@ RCSID("$NetBSD: $")
 ENTRY(__floorl)
 	fldt	4(%esp)
 	subl	$8,%esp
+	cfi_adjust_cfa_offset (8)
 
 	fstcw	4(%esp)			/* store fpu control word */
 
@@ -28,6 +29,7 @@ ENTRY(__floorl)
 	fldcw	4(%esp)			/* restore original control word */
 
 	addl	$8,%esp
+	cfi_adjust_cfa_offset (-8)
 	ret
 END (__floorl)
 weak_alias (__floorl, floorl)
diff --git a/sysdeps/i386/fpu/s_trunc.S b/sysdeps/i386/fpu/s_trunc.S
index 5a148643e3..a5f8fc73bc 100644
--- a/sysdeps/i386/fpu/s_trunc.S
+++ b/sysdeps/i386/fpu/s_trunc.S
@@ -22,6 +22,7 @@
 ENTRY(__trunc)
 	fldl	4(%esp)
 	subl	$8, %esp
+	cfi_adjust_cfa_offset (8)
 	fstcw	4(%esp)
 	movl	$0xc00, %edx
 	orl	4(%esp), %edx
@@ -30,6 +31,7 @@ ENTRY(__trunc)
 	frndint
 	fldcw	4(%esp)
 	addl	$8, %esp
+	cfi_adjust_cfa_offset (-8)
 	ret
 END(__trunc)
 weak_alias (__trunc, trunc)
diff --git a/sysdeps/i386/fpu/s_truncf.S b/sysdeps/i386/fpu/s_truncf.S
index d3b9385bfb..746d52f079 100644
--- a/sysdeps/i386/fpu/s_truncf.S
+++ b/sysdeps/i386/fpu/s_truncf.S
@@ -22,6 +22,7 @@
 ENTRY(__truncf)
 	flds	4(%esp)
 	subl	$8, %esp
+	cfi_adjust_cfa_offset (8)
 	fstcw	4(%esp)
 	movl	$0xc00, %edx
 	orl	4(%esp), %edx
@@ -30,6 +31,7 @@ ENTRY(__truncf)
 	frndint
 	fldcw	4(%esp)
 	addl	$8, %esp
+	cfi_adjust_cfa_offset (-8)
 	ret
 END(__truncf)
 weak_alias (__truncf, truncf)
diff --git a/sysdeps/i386/fpu/s_truncl.S b/sysdeps/i386/fpu/s_truncl.S
index 4bef0f478a..d573855dc3 100644
--- a/sysdeps/i386/fpu/s_truncl.S
+++ b/sysdeps/i386/fpu/s_truncl.S
@@ -22,6 +22,7 @@
 ENTRY(__truncl)
 	fldt	4(%esp)
 	subl	$8, %esp
+	cfi_adjust_cfa_offset (8)
 	fstcw	4(%esp)
 	movl	$0xc00, %edx
 	orl	4(%esp), %edx
@@ -30,6 +31,7 @@ ENTRY(__truncl)
 	frndint
 	fldcw	4(%esp)
 	addl	$8, %esp
+	cfi_adjust_cfa_offset (-8)
 	ret
 END(__truncl)
 weak_alias (__truncl, truncl)