Commit 144cbad0 by Richard Kenner Committed by DJ Delorie

toplev.c (floor_log2_wide): Correct casts for 64-bit hosts.

* toplev.c (floor_log2_wide): Correct casts for 64-bit hosts.
Correct formatting.

From-SVN: r82798
parent 02760d2f
2004-06-08 Richard Kenner <kenner@vlsi1.ultra.nyu.edu>
* toplev.c (floor_log2_wide): Correct casts for 64-bit hosts.
Correct formatting.
2004-06-08 James E Wilson <wilson@specifixinc.com>
PR target/15790
......
......@@ -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;
}
......
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