diff options
author | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-09-25 23:20:42 +0000 |
---|---|---|
committer | rth <rth@138bc75d-0d04-0410-961f-82ee72b054a4> | 2002-09-25 23:20:42 +0000 |
commit | f82a103db96394284839c33dd56a4b48a5854713 (patch) | |
tree | 860a98898b834b889159fbab21565aebf14192a8 | |
parent | fd05f1734ce44cc6a8f4e5524eda5ac579e4378d (diff) | |
download | gcc-f82a103db96394284839c33dd56a4b48a5854713.tar.gz |
* emit-rtl.c (const_double_htab_eq): Distinguish integer and
fp CONST_DOUBLE; use real_identical.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57520 138bc75d-0d04-0410-961f-82ee72b054a4
-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 4d85a2f9c50..fb996297003 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 eded8158d53..a5a776041aa 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 *). */ |