* combine.c (get_pos_from_mask): Test exact_log2 result as signed.
From-SVN: r34280
This commit is contained in:
parent
efc7058478
commit
d3bc89386d
@ -1,3 +1,7 @@
|
||||
2000-05-30 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* combine.c (get_pos_from_mask): Test exact_log2 result as signed.
|
||||
|
||||
2000-05-30 Richard Henderson <rth@cygnus.com>
|
||||
|
||||
* bb-reorder.c (emit_jump_to_block_after): Protect use of HAVE_return.
|
||||
|
@ -6588,17 +6588,19 @@ get_pos_from_mask (m, plen)
|
||||
{
|
||||
/* Get the bit number of the first 1 bit from the right, -1 if none. */
|
||||
int pos = exact_log2 (m & - m);
|
||||
int len;
|
||||
|
||||
if (pos < 0)
|
||||
return -1;
|
||||
|
||||
/* Now shift off the low-order zero bits and see if we have a power of
|
||||
two minus 1. */
|
||||
*plen = exact_log2 ((m >> pos) + 1);
|
||||
len = exact_log2 ((m >> pos) + 1);
|
||||
|
||||
if (*plen <= 0)
|
||||
if (len <= 0)
|
||||
return -1;
|
||||
|
||||
*plen = len;
|
||||
return pos;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user