Commit 3d1877b1 by Richard Kenner

(lshift_double): Replace `&' with `%' to fix typo.

(lshift_double, rshift_double): Truncate shift count only if
SHIFT_COUNT_TRUNCATED.  Remove unnecessary `count >= prec' test.

From-SVN: r9917
parent 146135d6
...@@ -337,8 +337,10 @@ lshift_double (l1, h1, count, prec, lv, hv, arith) ...@@ -337,8 +337,10 @@ lshift_double (l1, h1, count, prec, lv, hv, arith)
return; return;
} }
if (count >= prec) #ifdef SHIFT_COUNT_TRUNCATED
count = (unsigned HOST_WIDE_INT) count & prec; if (SHIFT_COUNT_TRUNCATED)
count %= prec;
#endif
if (count >= HOST_BITS_PER_WIDE_INT) if (count >= HOST_BITS_PER_WIDE_INT)
{ {
...@@ -370,8 +372,10 @@ rshift_double (l1, h1, count, prec, lv, hv, arith) ...@@ -370,8 +372,10 @@ rshift_double (l1, h1, count, prec, lv, hv, arith)
? -((unsigned HOST_WIDE_INT) h1 >> (HOST_BITS_PER_WIDE_INT - 1)) ? -((unsigned HOST_WIDE_INT) h1 >> (HOST_BITS_PER_WIDE_INT - 1))
: 0); : 0);
if (count >= prec) #ifdef SHIFT_COUNT_TRUNCATED
count = (unsigned HOST_WIDE_INT) count % prec; if (SHIFT_COUNT_TRUNCATED)
count %= prec;
#endif
if (count >= HOST_BITS_PER_WIDE_INT) if (count >= HOST_BITS_PER_WIDE_INT)
{ {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment