]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
Avoid "left shift count >= width of type" warnings in soft-fp code.
authorUros Bizjak <ubizjak@gmail.com>
Tue, 26 Nov 2013 16:05:10 +0000 (16:05 +0000)
committerJoseph Myers <joseph@codesourcery.com>
Tue, 26 Nov 2013 16:05:10 +0000 (16:05 +0000)
ChangeLog
soft-fp/op-4.h

index 585b09f0eefb34981de29c9b8a9e7ca77b143635..5927ebbb9503023cfa8772207aedd7699f4f76ad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2013-11-26  Uros Bizjak  <ubizjak@gmail.com>
+
+       * soft-fp/op-4.h (_FP_FRAC_ASSEMBLE_4): Check rsize against
+       _FP_W_TYPE_SIZE to avoid "left shift count >= width of type"
+       warning.
+
 2013-11-26  Adhemerval Zanella  <azanella@linux.vnet.ibm.com>
 
        * sysdeps/powerpc/fpu/feenablxcpt.c (feenableexcept): Use
index 3515bdc497baa56abb0a8afb6171174c27e84c4e..6c6b4611662ca36c393d3ececf60542e0fbfa0af 100644 (file)
       else if (rsize <= 2*_FP_W_TYPE_SIZE)                             \
        {                                                               \
          r = X##_f[1];                                                 \
-         r <<= _FP_W_TYPE_SIZE;                                        \
+         r = (rsize <= _FP_W_TYPE_SIZE ? 0 : r << _FP_W_TYPE_SIZE);    \
          r += X##_f[0];                                                \
        }                                                               \
       else                                                             \
          /* I'm feeling lazy so we deal with int == 3words (implausible)*/ \
          /* and int == 4words as a single case.                         */ \
          r = X##_f[3];                                                 \
-         r <<= _FP_W_TYPE_SIZE;                                        \
+         r = (rsize <= _FP_W_TYPE_SIZE ? 0 : r << _FP_W_TYPE_SIZE);    \
          r += X##_f[2];                                                \
-         r <<= _FP_W_TYPE_SIZE;                                        \
+         r = (rsize <= _FP_W_TYPE_SIZE ? 0 : r << _FP_W_TYPE_SIZE);    \
          r += X##_f[1];                                                \
-         r <<= _FP_W_TYPE_SIZE;                                        \
+         r = (rsize <= _FP_W_TYPE_SIZE ? 0 : r << _FP_W_TYPE_SIZE);    \
          r += X##_f[0];                                                \
        }                                                               \
     }                                                                  \