summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gcc/ChangeLog4
-rw-r--r--gcc/hard-reg-set.h6
2 files changed, 7 insertions, 3 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog
index c71815c9779..24e5c1eaab0 100644
--- a/gcc/ChangeLog
+++ b/gcc/ChangeLog
@@ -1,3 +1,7 @@
+2002-07-16 Marek Michalkiewicz <marekm@amelek.gda.pl>
+
+ * hard-reg-set.h (TEST_HARD_REG_BIT): Return 1 if the bit is set.
+
2002-07-15 Zack Weinberg <zack@codesourcery.com>
* ginclude/varargs.h: Replace with stub which issues #error.
diff --git a/gcc/hard-reg-set.h b/gcc/hard-reg-set.h
index db96aa9c03c..e80f39e4575 100644
--- a/gcc/hard-reg-set.h
+++ b/gcc/hard-reg-set.h
@@ -92,7 +92,7 @@ typedef HARD_REG_ELT_TYPE HARD_REG_SET[HARD_REG_SET_LONGS];
#define CLEAR_HARD_REG_BIT(SET, BIT) \
((SET) &= ~(HARD_CONST (1) << (BIT)))
#define TEST_HARD_REG_BIT(SET, BIT) \
- ((SET) & (HARD_CONST (1) << (BIT)))
+ (!!((SET) & (HARD_CONST (1) << (BIT))))
#define CLEAR_HARD_REG_SET(TO) ((TO) = HARD_CONST (0))
#define SET_HARD_REG_SET(TO) ((TO) = ~ HARD_CONST (0))
@@ -122,8 +122,8 @@ typedef HARD_REG_ELT_TYPE HARD_REG_SET[HARD_REG_SET_LONGS];
&= ~(HARD_CONST (1) << ((BIT) % UHOST_BITS_PER_WIDE_INT)))
#define TEST_HARD_REG_BIT(SET, BIT) \
- ((SET)[(BIT) / UHOST_BITS_PER_WIDE_INT] \
- & (HARD_CONST (1) << ((BIT) % UHOST_BITS_PER_WIDE_INT)))
+ (!!((SET)[(BIT) / UHOST_BITS_PER_WIDE_INT] \
+ & (HARD_CONST (1) << ((BIT) % UHOST_BITS_PER_WIDE_INT))))
#if FIRST_PSEUDO_REGISTER <= 2*HOST_BITS_PER_WIDE_INT
#define CLEAR_HARD_REG_SET(TO) \