]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
PowerPC: fix hypot/hypotf check for -INF
authorAdhemerval Zanella <azanella@linux.vnet.ibm.com>
Fri, 17 May 2013 13:12:16 +0000 (08:12 -0500)
committerRyan S. Arnold <rsa@linux.vnet.ibm.com>
Fri, 26 Jul 2013 13:25:20 +0000 (08:25 -0500)
(cherry picked from commit 13d3b41a36c4f28d171a144f8a9baad3a8835981)
(backported missing CL/NEWS from commit 68191c1d59d40b3d9f5babef4f37f265920ff565)

ChangeLog
NEWS
sysdeps/powerpc/fpu/e_hypot.c
sysdeps/powerpc/fpu/e_hypotf.c

index 5e721365c97affbddefcedba9cca71e7287bee3d..153515d96f883d49e3ea5081363a3ae4f2ddfc2c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2013-05-17  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
+
+       [BZ # 15497]
+       * sysdeps/powerpc/fpu/e_hypot.c (GET_TWO_FLOAT_WORD): Fix test for
+       negative infinity on POWER6 or lower.
+       * sysdeps/powerpc/fpu/e_hypotf.c (GET_TWO_FLOAT_WORD): Likewise.
+
 2013-04-30  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
 
        * sysdeps/unix/sysv/linux/powerpc/Versions: Add __vdso_time symbol.
diff --git a/NEWS b/NEWS
index c6380a77bef0af4f3f06a53556b7c19c073ed322..e418a46269b196c26f4b42aaca3e6875ad6973e1 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -8,7 +8,7 @@ using `glibc' in the "product" field.
 Version 2.17.1
 
 * The following bugs are resolved with this release:
-  15003, 15006, 15055, 15122, 15759.
+  15003, 15006, 15055, 15122, 15497, 15759.
 
 \f
 Version 2.17
index cfadd5c85695f858a68a31439ee91f4413853c9d..fc17bea5369b60c1ca84ec23cb276727a4d1f263 100644 (file)
@@ -52,13 +52,13 @@ static const double pdnum   = 2.225073858507201e-308;
    ieee_double_shape_type gh_u2;                                  \
    gh_u1.value = (d1);                                            \
    gh_u2.value = (d2);                                            \
-   (i1) = gh_u1.parts.msw;                                        \
-   (i2) = gh_u2.parts.msw;                                        \
+   (i1) = gh_u1.parts.msw & 0x7fffffff;                           \
+   (i2) = gh_u2.parts.msw & 0x7fffffff;                           \
  } while (0)
 
 # define TEST_INF_NAN(x, y)                                      \
  do {                                                            \
-   int32_t hx, hy;                                               \
+   uint32_t hx, hy;                                              \
    GET_TW0_HIGH_WORD(x, y, hx, hy);                              \
    if (hy > hx) {                                                \
      uint32_t ht = hx; hx = hy; hy = ht;                         \
index 92e824dafc519ac8391db9ad2faa0ddc9b2d59af..77c1b17d8eeda07c4e0dee3e50335f360afde6d6 100644 (file)
@@ -46,13 +46,13 @@ static const float two30  = 1.0737418e09;
    ieee_float_shape_type gf_u2;                                  \
    gf_u1.value = (f1);                                           \
    gf_u2.value = (f2);                                           \
-   (i1) = gf_u1.word;                                            \
-   (i2) = gf_u2.word;                                            \
+   (i1) = gf_u1.word & 0x7fffffff;                               \
+   (i2) = gf_u2.word & 0x7fffffff;                               \
  } while (0)
 
 # define TEST_INF_NAN(x, y)                                      \
  do {                                                            \
-   int32_t hx, hy;                                               \
+   uint32_t hx, hy;                                              \
    GET_TWO_FLOAT_WORD(x, y, hx, hy);                             \
    if (hy > hx) {                                                \
      uint32_t ht = hx; hx = hy; hy = ht;                         \