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.26.9000-1122-gaf1e6be


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  af1e6be4ba60067907ea9e19e0cd6897d194e9cf (commit)
      from  98d13ce07a6aee9efb2ef2405a95c6bb8e01dca3 (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=af1e6be4ba60067907ea9e19e0cd6897d194e9cf

commit af1e6be4ba60067907ea9e19e0cd6897d194e9cf
Author: Tulio Magno Quites Machado Filho <tuliom@linux.vnet.ibm.com>
Date:   Fri Jan 12 20:39:42 2018 -0200

    powerpc: Fix llround spurious inexact on 32-bit POWER4 [BZ #22697]
    
    This issue is similar to BZ #19235, where spurious exceptions are
    created from adding 0.5 then converting to an integer.
    The solution is based on Joseph's fix for BZ #19235.
    
    	[BZ #22697]
    	* sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S (__llround):
    	Do not add 0.5 to integer or out-of-range arguments.

diff --git a/ChangeLog b/ChangeLog
index e9035fe..f33212f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2018-01-12  Tulio Magno Quites Machado Filho  <tuliom@linux.vnet.ibm.com>
+
+	[BZ #22697]
+	* sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S (__llround):
+	Do not add 0.5 to integer or out-of-range arguments.
+
 2018-01-12  Dmitry V. Levin  <ldv@altlinux.org>
 
 	* po/bg.po: Update translations.
diff --git a/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S b/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S
index d0b00ac..5ad89a1 100644
--- a/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S
+++ b/sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S
@@ -71,6 +71,11 @@ ENTRY (__llround)
 	fcmpu	cr1,fp1,fp12	/* x is negative? x < 0.0  */
 	blt-	cr6,.Lretzero	/* 0.5 > x < -0.5 so just return 0.  */
 	bge-	cr7,.Lnobias	/* 2^52 > x < -2^52 just convert with no bias.  */
+	/* Test whether an integer to avoid spurious "inexact".  */
+	fadd	fp3,fp2,fp9
+	fsub	fp3,fp3,fp9
+	fcmpu	cr5,fp2,fp3
+	beq	cr5,.Lnobias
 	fadd	fp3,fp2,fp10	/* |x|+=0.5 bias to prepare to round.  */
 	bge	cr1,.Lconvert	/* x is positive so don't negate x.  */
 	fnabs	fp3,fp3		/* -(|x|+=0.5)  */

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

Summary of changes:
 ChangeLog                                        |    6 ++++++
 sysdeps/powerpc/powerpc32/power4/fpu/s_llround.S |    5 +++++
 2 files changed, 11 insertions(+), 0 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]