diff options
author | Richard Henderson <rth@redhat.com> | 2002-09-20 10:50:48 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-09-20 10:50:48 -0700 |
commit | 46b33600d57ae54591bccaa935d7d837b5318a19 (patch) | |
tree | 89d914be5aa639096dbd44d7f9d3e884503d85a0 /gcc/emit-rtl.c | |
parent | 40ad65d05ee933ba6d04684e9ddaa6e841c5e4a6 (diff) | |
download | gcc-46b33600d57ae54591bccaa935d7d837b5318a19.zip gcc-46b33600d57ae54591bccaa935d7d837b5318a19.tar.gz gcc-46b33600d57ae54591bccaa935d7d837b5318a19.tar.bz2 |
real.c (real_hash): New.
* real.c (real_hash): New.
* real.h: Declare it.
* cse.c (canon_hash): Use it.
* cselib.c (hash_rtx): Likewise.
* emit-rtl.c (const_double_htab_hash): Likewise.
* rtl.h (CONST_DOUBLE_REAL_VALUE): New.
* varasm.c (struct rtx_const): Reduce vector size; separate
integer and fp vectors.
(HASHBITS): Remove.
(const_hash_1): Rename from const_hash. Use real_hash. Do not
take modulus MAX_HASH_TABLE.
(const_hash): New. Do take modulus MAX_HASH_TABLE.
(output_constant_def): Do not take modulus MAX_HASH_TABLE.
(SYMHASH): Don't use HASHBITS.
(decode_rtx_const): Copy only active bits from REAL_VALUE_TYPE.
Fix CONST_VECTOR thinko wrt fp vectors. Fix kind comparison.
(simplify_subtraction): Fix kind comparison.
(const_hash_rtx): Return unsigned int. Don't use HASHBITS.
Use a union to pun integer array.
* config/rs6000/rs6000.c (rs6000_hash_constant): Use real_hash;
only hash two words of integral CONST_DOUBLE.
From-SVN: r57356
Diffstat (limited to 'gcc/emit-rtl.c')
-rw-r--r-- | gcc/emit-rtl.c | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index 4a8b9e3..bfcc289 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -221,12 +221,13 @@ static hashval_t const_double_htab_hash (x) const void *x; { - hashval_t h = 0; - size_t i; rtx value = (rtx) x; + hashval_t h; - for (i = 0; i < sizeof(CONST_DOUBLE_FORMAT)-1; i++) - h ^= XWINT (value, i); + if (GET_MODE (value) == VOIDmode) + h = CONST_DOUBLE_LOW (value) ^ CONST_DOUBLE_HIGH (value); + else + h = real_hash (CONST_DOUBLE_REAL_VALUE (value)); return h; } |