diff options
author | Richard Henderson <rth@redhat.com> | 2002-09-25 16:20:42 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2002-09-25 16:20:42 -0700 |
commit | 8580f7a02916708990a29a18027ee870caa2c236 (patch) | |
tree | 860a98898b834b889159fbab21565aebf14192a8 /gcc | |
parent | 8dc24041f7606fe84ce5e5f2b82b79182d1dd383 (diff) | |
download | gcc-8580f7a02916708990a29a18027ee870caa2c236.zip gcc-8580f7a02916708990a29a18027ee870caa2c236.tar.gz gcc-8580f7a02916708990a29a18027ee870caa2c236.tar.bz2 |
emit-rtl.c (const_double_htab_eq): Distinguish integer and fp CONST_DOUBLE; use real_identical.
* emit-rtl.c (const_double_htab_eq): Distinguish integer and
fp CONST_DOUBLE; use real_identical.
From-SVN: r57520
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/emit-rtl.c | 11 |
2 files changed, 11 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4d85a2f..fb99629 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-09-25 Richard Henderson <rth@redhat.com> + + * emit-rtl.c (const_double_htab_eq): Distinguish integer and + fp CONST_DOUBLE; use real_identical. + 2002-09-25 Mark Mitchell <mark@codesourcery.com> * doc/invoke.texi: Add more -Wabi examples. diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index eded815..a5a7760 100644 --- a/gcc/emit-rtl.c +++ b/gcc/emit-rtl.c @@ -243,11 +243,12 @@ const_double_htab_eq (x, y) if (GET_MODE (a) != GET_MODE (b)) return 0; - for (i = 0; i < sizeof(CONST_DOUBLE_FORMAT)-1; i++) - if (XWINT (a, i) != XWINT (b, i)) - return 0; - - return 1; + if (GET_MODE (a) == VOIDmode) + return (CONST_DOUBLE_LOW (a) == CONST_DOUBLE_LOW (b) + && CONST_DOUBLE_HIGH (a) == CONST_DOUBLE_HIGH (b)); + else + return real_identical (CONST_DOUBLE_REAL_VALUE (a), + CONST_DOUBLE_REAL_VALUE (b)); } /* Returns a hash code for X (which is a really a mem_attrs *). */ |