On Mon, Nov 25, 2013 at 11:19 PM, Joseph S. Myers
<jos...@codesourcery.com> wrote:

> soft-fp patches go to libc-alpha, with glibc code then being imported
> unmodified into GCC.

Now imported from glibc as:

2013-11-27  Uros Bizjak  <ubiz...@gmail.com>

    * soft-fp/op-4.h: Update from glibc.

Tested on x86_64-pc-linux-gnu multilib build and committed to mainline SVN.

Uros.
Index: soft-fp/op-4.h
===================================================================
--- soft-fp/op-4.h      (revision 205448)
+++ soft-fp/op-4.h      (working copy)
@@ -709,7 +709,7 @@
       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                                                             \
@@ -717,11 +717,11 @@
          /* 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];                                                \
        }                                                               \
     }                                                                  \

Reply via email to