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.24-68-gc208097


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  c20809709ab330f927c87fefe439554d3b1f643a (commit)
      from  8b7d13322a7034c1cecbd441185b4d0db96a2a47 (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=c20809709ab330f927c87fefe439554d3b1f643a

commit c20809709ab330f927c87fefe439554d3b1f643a
Author: Joseph Myers <joseph@codesourcery.com>
Date:   Tue Aug 16 17:11:46 2016 +0000

    Fix soft-fp extended.h unpacking (GCC bug 77265).
    
    soft-fp unpacking for x86 "extended" fails to clear the implicit
    mantissa high bit that is explicit in that format, resulting in
    problems for operations that expect this bit to be clear in raw
    unpacked values.  Specifically, the code for this format is used only
    for conversions to and from TFmode (__float128) in libgcc, where this
    issue results in GCC bug 77265, extension of long double infinity to
    __float128 wrongly produces a NaN.
    
    This patch fixes this by always masking out the implicit bit on
    unpacking, so that the results of unpacking meet the expectations of
    the rest of the soft-fp code for a normal IEEE format.
    
    Tested for x86_64 in libgcc in conjunction with a GCC testcase for
    this issue (this code isn't used in glibc, only in libgcc).
    
    	* soft-fp/extended.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_E):
    	Mask implicit bit out of unpacked value.
    	[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_EP): Likewise.
    	[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_E): Likewise.
    	[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_EP): Likewise.

diff --git a/ChangeLog b/ChangeLog
index 86dc105..ae29267 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,11 @@
 2016-08-16  Joseph Myers  <joseph@codesourcery.com>
 
+	* soft-fp/extended.h [_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_E):
+	Mask implicit bit out of unpacked value.
+	[_FP_W_TYPE_SIZE < 64] (FP_UNPACK_RAW_EP): Likewise.
+	[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_E): Likewise.
+	[_FP_W_TYPE_SIZE >= 64] (FP_UNPACK_RAW_EP): Likewise.
+
 	* sysdeps/sparc/fpu/fesetexcept.c: New file.
 
 	* sysdeps/sh/sh4/fpu/fesetexcept.c: New file.
diff --git a/soft-fp/extended.h b/soft-fp/extended.h
index de53448..7b19e83 100644
--- a/soft-fp/extended.h
+++ b/soft-fp/extended.h
@@ -104,6 +104,7 @@ union _FP_UNION_E
       X##_f[3] = 0;					\
       X##_f[0] = FP_UNPACK_RAW_E_flo.bits.frac0;	\
       X##_f[1] = FP_UNPACK_RAW_E_flo.bits.frac1;	\
+      X##_f[1] &= ~_FP_IMPLBIT_E;			\
       X##_e  = FP_UNPACK_RAW_E_flo.bits.exp;		\
       X##_s  = FP_UNPACK_RAW_E_flo.bits.sign;		\
     }							\
@@ -119,6 +120,7 @@ union _FP_UNION_E
       X##_f[3] = 0;					\
       X##_f[0] = FP_UNPACK_RAW_EP_flo->bits.frac0;	\
       X##_f[1] = FP_UNPACK_RAW_EP_flo->bits.frac1;	\
+      X##_f[1] &= ~_FP_IMPLBIT_E;			\
       X##_e  = FP_UNPACK_RAW_EP_flo->bits.exp;		\
       X##_s  = FP_UNPACK_RAW_EP_flo->bits.sign;		\
     }							\
@@ -332,6 +334,7 @@ union _FP_UNION_E
       FP_UNPACK_RAW_E_flo.flt = (val);		\
 						\
       X##_f0 = FP_UNPACK_RAW_E_flo.bits.frac;	\
+      X##_f0 &= ~_FP_IMPLBIT_E;			\
       X##_f1 = 0;				\
       X##_e = FP_UNPACK_RAW_E_flo.bits.exp;	\
       X##_s = FP_UNPACK_RAW_E_flo.bits.sign;	\
@@ -345,6 +348,7 @@ union _FP_UNION_E
 	= (union _FP_UNION_E *) (val);		\
 						\
       X##_f0 = FP_UNPACK_RAW_EP_flo->bits.frac;	\
+      X##_f0 &= ~_FP_IMPLBIT_E;			\
       X##_f1 = 0;				\
       X##_e = FP_UNPACK_RAW_EP_flo->bits.exp;	\
       X##_s = FP_UNPACK_RAW_EP_flo->bits.sign;	\

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

Summary of changes:
 ChangeLog          |    6 ++++++
 soft-fp/extended.h |    4 ++++
 2 files changed, 10 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]