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
This commit is contained in:
Richard Henderson 2002-09-25 16:20:42 -07:00 committed by Richard Henderson
parent 8dc24041f7
commit 8580f7a029
2 changed files with 11 additions and 5 deletions

View 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.

View 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 *). */