This is the mail archive of the glibc-cvs@sourceware.org mailing list for the glibc project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

GNU C Library master sources branch master updated. glibc-2.23-503-g4e9bf32


This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU C Library master sources".

The branch, master has been updated
       via  4e9bf327ad02ed83bded4011af68613e6b03ab33 (commit)
      from  11f4944d7f3d179408c7b8814eafdc383a1b3416 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
http://sourceware.org/git/gitweb.cgi?p=glibc.git;a=commitdiff;h=4e9bf327ad02ed83bded4011af68613e6b03ab33

commit 4e9bf327ad02ed83bded4011af68613e6b03ab33
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Wed Jun 22 15:40:30 2016 +0000

    Simplify x86 nearbyint functions.
    
    The i386 implementations of nearbyint functions, and x86_64
    nearbyintl, contain code to mask the "inexact" exception.  However,
    the fnstenv instruction has the effect of masking all exceptions, so
    this masking code has been redundant since fnstenv was added to those
    implementations (by commit 846d9a4a3acdb4939ca7bf6aed48f9f6f26911be;
    commit 71d1b0166b4ace0d804af2993b3815758b852efc added the test
    math/test-nearbyint-except-2.c that verifies these functions do work
    when called with "inexact" traps enabled); this patch removes the
    redundant code.
    
    Tested for x86_64 and x86.
    
    	* sysdeps/i386/fpu/s_nearbyint.S (__nearbyint): Do not mask
    	"inexact" exceptions after fnstenv.
    	* sysdeps/i386/fpu/s_nearbyintf.S (__nearbyintf): Likewise.
    	* sysdeps/i386/fpu/s_nearbyintl.S (__nearbyintl): Likewise.
    	* sysdeps/x86_64/fpu/s_nearbyintl.S (__nearbyintl): Likewise.

diff --git a/ChangeLog b/ChangeLog
index 75722e1..0328dda 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2016-06-22  Joseph Myers  <joseph@codesourcery.com>
+
+	* sysdeps/i386/fpu/s_nearbyint.S (__nearbyint): Do not mask
+	"inexact" exceptions after fnstenv.
+	* sysdeps/i386/fpu/s_nearbyintf.S (__nearbyintf): Likewise.
+	* sysdeps/i386/fpu/s_nearbyintl.S (__nearbyintl): Likewise.
+	* sysdeps/x86_64/fpu/s_nearbyintl.S (__nearbyintl): Likewise.
+
 2015-06-22  Zack Weinberg  <zackw@panix.com>
 
 	* sysdeps/generic/bits/hwcap.h: Moved to ...
diff --git a/sysdeps/i386/fpu/s_nearbyint.S b/sysdeps/i386/fpu/s_nearbyint.S
index 8da8ae9..f7b79b6 100644
--- a/sysdeps/i386/fpu/s_nearbyint.S
+++ b/sysdeps/i386/fpu/s_nearbyint.S
@@ -11,10 +11,6 @@ ENTRY(__nearbyint)
 	subl	$32, %esp
 	cfi_adjust_cfa_offset (32)
 	fnstenv	4(%esp)
-	movl	4(%esp), %eax
-	orl	$0x20, %eax
-	movl	%eax, (%esp)
-	fldcw	(%esp)
 	frndint
 	fldenv	4(%esp)
 	addl	$32, %esp
diff --git a/sysdeps/i386/fpu/s_nearbyintf.S b/sysdeps/i386/fpu/s_nearbyintf.S
index 0c51f72..92df2f8 100644
--- a/sysdeps/i386/fpu/s_nearbyintf.S
+++ b/sysdeps/i386/fpu/s_nearbyintf.S
@@ -11,10 +11,6 @@ ENTRY(__nearbyintf)
 	subl	$32, %esp
 	cfi_adjust_cfa_offset (32)
 	fnstenv	4(%esp)
-	movl	4(%esp), %eax
-	orl	$0x20, %eax
-	movl	%eax, (%esp)
-	fldcw	(%esp)
 	frndint
 	fldenv	4(%esp)
 	addl	$32, %esp
diff --git a/sysdeps/i386/fpu/s_nearbyintl.S b/sysdeps/i386/fpu/s_nearbyintl.S
index b260ab5..3b7d1e2 100644
--- a/sysdeps/i386/fpu/s_nearbyintl.S
+++ b/sysdeps/i386/fpu/s_nearbyintl.S
@@ -11,10 +11,6 @@ ENTRY(__nearbyintl)
 	subl	$32, %esp
 	cfi_adjust_cfa_offset (32)
 	fnstenv	4(%esp)
-	movl	4(%esp), %eax
-	orl	$0x20, %eax
-	movl	%eax, (%esp)
-	fldcw	(%esp)
 	frndint
 	fnstsw
 	andl	$0x1, %eax
diff --git a/sysdeps/x86_64/fpu/s_nearbyintl.S b/sysdeps/x86_64/fpu/s_nearbyintl.S
index 76d41bd..31b21a5 100644
--- a/sysdeps/x86_64/fpu/s_nearbyintl.S
+++ b/sysdeps/x86_64/fpu/s_nearbyintl.S
@@ -9,10 +9,6 @@
 ENTRY(__nearbyintl)
 	fldt	8(%rsp)
 	fnstenv	-28(%rsp)
-	movl	-28(%rsp), %eax
-	orl	$0x20, %eax
-	movl	%eax, -32(%rsp)
-	fldcw	-32(%rsp)
 	frndint
 	fnstsw
 	andl	$0x1, %eax

-----------------------------------------------------------------------

Summary of changes:
 ChangeLog                         |    8 ++++++++
 sysdeps/i386/fpu/s_nearbyint.S    |    4 ----
 sysdeps/i386/fpu/s_nearbyintf.S   |    4 ----
 sysdeps/i386/fpu/s_nearbyintl.S   |    4 ----
 sysdeps/x86_64/fpu/s_nearbyintl.S |    4 ----
 5 files changed, 8 insertions(+), 16 deletions(-)


hooks/post-receive
-- 
GNU C Library master sources


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]