diff options
author | Richard Henderson <rth@redhat.com> | 2004-06-09 14:00:35 -0700 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2004-06-09 14:00:35 -0700 |
commit | bb394606fd725089772c6b03e8c2f8847b400b61 (patch) | |
tree | 381c0300036ca69eea30d3412062cfaead54789d /gcc/expmed.c | |
parent | d8044160b7047642e312fb5f713fe0db46171dd8 (diff) | |
download | gcc-bb394606fd725089772c6b03e8c2f8847b400b61.zip gcc-bb394606fd725089772c6b03e8c2f8847b400b61.tar.gz gcc-bb394606fd725089772c6b03e8c2f8847b400b61.tar.bz2 |
* expmed.c (emit_store_flag): Cope with FLOAT_STORE_FLAG_VALUE.
From-SVN: r82854
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r-- | gcc/expmed.c | 27 |
1 files changed, 22 insertions, 5 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c index b601272..96ef1e7 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -4559,11 +4559,28 @@ emit_store_flag (rtx target, enum rtx_code code, rtx op0, rtx op1, comparison = compare_from_rtx (op0, op1, code, unsignedp, mode, NULL_RTX); - if (GET_CODE (comparison) == CONST_INT) - return (comparison == const0_rtx ? const0_rtx - : normalizep == 1 ? const1_rtx - : normalizep == -1 ? constm1_rtx - : const_true_rtx); + if (CONSTANT_P (comparison)) + { + if (GET_CODE (comparison) == CONST_INT) + { + if (comparison == const0_rtx) + return const0_rtx; + } +#ifdef FLOAT_STORE_FLAG_VALUE + else if (GET_CODE (comparison) == CONST_DOUBLE) + { + if (comparison == CONST0_RTX (GET_MODE (comparison))) + return const0_rtx; + } +#endif + else + abort (); + if (normalizep == 1) + return const1_rtx; + if (normalizep == -1) + return constm1_rtx; + return const_true_rtx; + } /* The code of COMPARISON may not match CODE if compare_from_rtx decided to swap its operands and reverse the original code. |