From 5babc3bf48480d02944fbed3cb967f89ef4b453e Mon Sep 17 00:00:00 2001 From: dj Date: Wed, 9 Jun 2004 00:10:51 +0000 Subject: [PATCH] * toplev.c (floor_log2_wide): Correct casts for 64-bit hosts. Correct formatting. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82798 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 5 +++++ gcc/toplev.c | 18 +++++++++--------- 2 files changed, 14 insertions(+), 9 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9bc153f3afd..a42b594d294 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2004-06-08 Richard Kenner + + * toplev.c (floor_log2_wide): Correct casts for 64-bit hosts. + Correct formatting. + 2004-06-08 James E Wilson PR target/15790 diff --git a/gcc/toplev.c b/gcc/toplev.c index e1803943d9c..cec53fb6974 100644 --- a/gcc/toplev.c +++ b/gcc/toplev.c @@ -1259,21 +1259,21 @@ floor_log2_wide (unsigned HOST_WIDE_INT x) int t=0; if (x == 0) return -1; - if (sizeof (HOST_WIDE_INT)*8 > 64) - if (x >= (unsigned HOST_WIDE_INT)(1 << (t+64))) + if (sizeof (HOST_WIDE_INT) * 8 > 64) + if (x >= (unsigned HOST_WIDE_INT) 1 << (t + 64)) t += 64; - if (sizeof (HOST_WIDE_INT)*8 > 32) - if (x >= (unsigned HOST_WIDE_INT)(1 << (t+32))) + if (sizeof (HOST_WIDE_INT) * 8 > 32) + if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 32)) t += 32; - if (x >= (unsigned HOST_WIDE_INT)(1 << (t+16))) + if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 16)) t += 16; - if (x >= (unsigned HOST_WIDE_INT)(1 << (t+8))) + if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 8)) t += 8; - if (x >= (unsigned HOST_WIDE_INT)(1 << (t+4))) + if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 4)) t += 4; - if (x >= (unsigned HOST_WIDE_INT)(1 << (t+2))) + if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 2)) t += 2; - if (x >= (unsigned HOST_WIDE_INT)(1 << (t+1))) + if (x >= ((unsigned HOST_WIDE_INT) 1) << (t + 1)) t += 1; return t; } -- 2.11.4.GIT