Blame SOURCES/gcc32-java-nan.patch
|
|
727081 |
2004-08-13 Andrew Haley <aph@redhat.com>
|
|
|
727081 |
|
|
|
727081 |
* jcf-write.c (find_constant_index): Canonicalize NaN.
|
|
|
727081 |
|
|
|
727081 |
--- gcc/java/jcf-write.c.jj 2002-10-16 22:36:11.000000000 +0100
|
|
|
727081 |
+++ gcc/java/jcf-write.c 2004-08-13 17:10:37.000000000 +0100
|
|
|
727081 |
@@ -828,12 +828,20 @@
|
|
|
727081 |
long words[2];
|
|
|
727081 |
if (TYPE_PRECISION (TREE_TYPE (value)) == 32)
|
|
|
727081 |
{
|
|
|
727081 |
+ if (REAL_VALUE_ISNAN (TREE_REAL_CST (value))
|
|
|
727081 |
+ && flag_emit_class_files)
|
|
|
727081 |
+ return find_constant1 (&state->cpool, CONSTANT_Float,
|
|
|
727081 |
+ 0x7fc00000);
|
|
|
727081 |
words[0] = etarsingle (TREE_REAL_CST (value)) & 0xFFFFFFFF;
|
|
|
727081 |
return find_constant1 (&state->cpool, CONSTANT_Float,
|
|
|
727081 |
(jword)words[0]);
|
|
|
727081 |
}
|
|
|
727081 |
else
|
|
|
727081 |
{
|
|
|
727081 |
+ if (REAL_VALUE_ISNAN (TREE_REAL_CST (value))
|
|
|
727081 |
+ && flag_emit_class_files)
|
|
|
727081 |
+ return find_constant2 (&state->cpool, CONSTANT_Double,
|
|
|
727081 |
+ 0x7ff80000, 0x00000000);
|
|
|
727081 |
etardouble (TREE_REAL_CST (value), words);
|
|
|
727081 |
return find_constant2 (&state->cpool, CONSTANT_Double,
|
|
|
727081 |
(jword)(words[1-FLOAT_WORDS_BIG_ENDIAN] &
|