Commit d3bc8938 by Richard Henderson Committed by Richard Henderson

* combine.c (get_pos_from_mask): Test exact_log2 result as signed.

From-SVN: r34280
parent efc70584
2000-05-30 Richard Henderson <rth@cygnus.com> 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. * bb-reorder.c (emit_jump_to_block_after): Protect use of HAVE_return.
2000-05-30 Bruce Korb <bkorb@gnu.org> 2000-05-30 Bruce Korb <bkorb@gnu.org>
......
...@@ -6588,17 +6588,19 @@ get_pos_from_mask (m, plen) ...@@ -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. */ /* Get the bit number of the first 1 bit from the right, -1 if none. */
int pos = exact_log2 (m & - m); int pos = exact_log2 (m & - m);
int len;
if (pos < 0) if (pos < 0)
return -1; return -1;
/* Now shift off the low-order zero bits and see if we have a power of /* Now shift off the low-order zero bits and see if we have a power of
two minus 1. */ two minus 1. */
*plen = exact_log2 ((m >> pos) + 1); len = exact_log2 ((m >> pos) + 1);
if (*plen <= 0) if (len <= 0)
return -1; return -1;
*plen = len;
return pos; return pos;
} }
......
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