Commit ef378bbe by Kazu Hirata Committed by Kazu Hirata

h8300.c (single_one_operand): Use GET_MODE_MASK.

	* config/h8300/h8300.c (single_one_operand): Use GET_MODE_MASK.
	(single_zero_operand): Likewise.

From-SVN: r65291
parent 73205f20
2003-04-05 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.c (single_one_operand): Use GET_MODE_MASK.
(single_zero_operand): Likewise.
2003-04-05 Daniel Berlin <dberlin@dberlin.org> 2003-04-05 Daniel Berlin <dberlin@dberlin.org>
* Makefile.in (df.o): Depend on alloc-pool.h, not obstack.h. * Makefile.in (df.o): Depend on alloc-pool.h, not obstack.h.
......
...@@ -757,13 +757,7 @@ single_one_operand (operand, mode) ...@@ -757,13 +757,7 @@ single_one_operand (operand, mode)
{ {
/* We really need to do this masking because 0x80 in QImode is /* We really need to do this masking because 0x80 in QImode is
represented as -128 for example. */ represented as -128 for example. */
unsigned HOST_WIDE_INT mask = if (exact_log2 (INTVAL (operand) & GET_MODE_MASK (mode)) >= 0)
(GET_MODE_BITSIZE (mode) < HOST_BITS_PER_WIDE_INT)
? ((unsigned HOST_WIDE_INT) 1 << GET_MODE_BITSIZE (mode)) - 1
: ~(unsigned HOST_WIDE_INT) 0;
unsigned HOST_WIDE_INT value = INTVAL (operand);
if (exact_log2 (value & mask) >= 0)
return 1; return 1;
} }
...@@ -782,13 +776,7 @@ single_zero_operand (operand, mode) ...@@ -782,13 +776,7 @@ single_zero_operand (operand, mode)
{ {
/* We really need to do this masking because 0x80 in QImode is /* We really need to do this masking because 0x80 in QImode is
represented as -128 for example. */ represented as -128 for example. */
unsigned HOST_WIDE_INT mask = if (exact_log2 (~INTVAL (operand) & GET_MODE_MASK (mode)) >= 0)
(GET_MODE_BITSIZE (mode) < HOST_BITS_PER_WIDE_INT)
? ((unsigned HOST_WIDE_INT) 1 << GET_MODE_BITSIZE (mode)) - 1
: ~(unsigned HOST_WIDE_INT) 0;
unsigned HOST_WIDE_INT value = INTVAL (operand);
if (exact_log2 (~value & mask) >= 0)
return 1; return 1;
} }
......
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