From 8580f7a02916708990a29a18027ee870caa2c236 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 25 Sep 2002 16:20:42 -0700 Subject: [PATCH] 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 --- gcc/ChangeLog | 5 +++++ 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 + + * 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 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 *). */ -- 2.30.2