From: rth Date: Wed, 25 Sep 2002 23:20:42 +0000 (+0000) Subject: * emit-rtl.c (const_double_htab_eq): Distinguish integer and X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f82a103db96394284839c33dd56a4b48a5854713;p=thirdparty%2Fgcc.git * 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 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 4d85a2f9c50c..fb9962970034 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2002-09-25 Richard Henderson + + * emit-rtl.c (const_double_htab_eq): Distinguish integer and + fp CONST_DOUBLE; use real_identical. + 2002-09-25 Mark Mitchell * doc/invoke.texi: Add more -Wabi examples. diff --git a/gcc/emit-rtl.c b/gcc/emit-rtl.c index eded8158d53a..a5a776041aa4 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 *). */