Commit 7e3e369c by Stephen L Moshier Committed by Jeff Law

emit-rtl.c (gen_lowpart_common): Disable optimization of initialized float-int…

emit-rtl.c (gen_lowpart_common): Disable optimization of initialized float-int union if the value is a NaN.

        * emit-rtl.c (gen_lowpart_common): Disable optimization of
        initialized float-int union if the value is a NaN.

From-SVN: r22371
parent 520c987d
Wed Sep 9 23:31:36 1998 (Stephen L Moshier) <moshier@world.std.com>
* emit-rtl.c (gen_lowpart_common): Disable optimization of
initialized float-int union if the value is a NaN.
Wed Sep 9 23:00:48 1998 Nathan Sidwell <nathan@acm.org> Wed Sep 9 23:00:48 1998 Nathan Sidwell <nathan@acm.org>
* c-lex.c (real_yylex): Don't warn about long long constants if * c-lex.c (real_yylex): Don't warn about long long constants if
......
...@@ -774,6 +774,9 @@ gen_lowpart_common (mode, x) ...@@ -774,6 +774,9 @@ gen_lowpart_common (mode, x)
i = INTVAL (x); i = INTVAL (x);
r = REAL_VALUE_FROM_TARGET_SINGLE (i); r = REAL_VALUE_FROM_TARGET_SINGLE (i);
/* Avoid changing the bit pattern of a NaN. */
if (REAL_VALUE_ISNAN (r))
return 0;
return CONST_DOUBLE_FROM_REAL_VALUE (r, mode); return CONST_DOUBLE_FROM_REAL_VALUE (r, mode);
} }
#else #else
...@@ -812,6 +815,8 @@ gen_lowpart_common (mode, x) ...@@ -812,6 +815,8 @@ gen_lowpart_common (mode, x)
i[0] = low, i[1] = high; i[0] = low, i[1] = high;
r = REAL_VALUE_FROM_TARGET_DOUBLE (i); r = REAL_VALUE_FROM_TARGET_DOUBLE (i);
if (REAL_VALUE_ISNAN (r))
return 0;
return CONST_DOUBLE_FROM_REAL_VALUE (r, mode); return CONST_DOUBLE_FROM_REAL_VALUE (r, mode);
} }
#else #else
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment