]> git.ipfire.org Git - thirdparty/gcc.git/commitdiff
* emit-rtl.c (const_double_htab_eq): Distinguish integer and
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Sep 2002 23:20:42 +0000 (23:20 +0000)
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>
Wed, 25 Sep 2002 23:20:42 +0000 (23:20 +0000)
        fp CONST_DOUBLE; use real_identical.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@57520 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/emit-rtl.c

index 4d85a2f9c50cb6e5dce6405ab7a208b6fdd11665..fb9962970034f2782a439446696a4f33e1ae4d97 100644 (file)
@@ -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.
index eded8158d53a0e2ddab884a1f04353fcea31a607..a5a776041aa4b0a72828ed37c110b6331362a0ef 100644 (file)
@@ -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 *).  */