diff options
author | Richard Kenner <kenner@gcc.gnu.org> | 1995-06-09 19:29:17 -0400 |
---|---|---|
committer | Richard Kenner <kenner@gcc.gnu.org> | 1995-06-09 19:29:17 -0400 |
commit | 3d1877b1271889f9b1cc54d108b4363924343f29 (patch) | |
tree | 7164a5c23172e6d116a5274571dbbed7d1492208 /gcc | |
parent | 146135d6db182282472ae6bf16b051128c0db85b (diff) | |
download | gcc-3d1877b1271889f9b1cc54d108b4363924343f29.zip gcc-3d1877b1271889f9b1cc54d108b4363924343f29.tar.gz gcc-3d1877b1271889f9b1cc54d108b4363924343f29.tar.bz2 |
(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
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/fold-const.c | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/gcc/fold-const.c b/gcc/fold-const.c index d310c8e..e7d3136 100644 --- a/gcc/fold-const.c +++ b/gcc/fold-const.c @@ -337,8 +337,10 @@ lshift_double (l1, h1, count, prec, lv, hv, arith) return; } - if (count >= prec) - count = (unsigned HOST_WIDE_INT) count & prec; +#ifdef SHIFT_COUNT_TRUNCATED + if (SHIFT_COUNT_TRUNCATED) + count %= prec; +#endif if (count >= HOST_BITS_PER_WIDE_INT) { @@ -370,8 +372,10 @@ rshift_double (l1, h1, count, prec, lv, hv, arith) ? -((unsigned HOST_WIDE_INT) h1 >> (HOST_BITS_PER_WIDE_INT - 1)) : 0); - if (count >= prec) - count = (unsigned HOST_WIDE_INT) count % prec; +#ifdef SHIFT_COUNT_TRUNCATED + if (SHIFT_COUNT_TRUNCATED) + count %= prec; +#endif if (count >= HOST_BITS_PER_WIDE_INT) { |