From bb394606fd725089772c6b03e8c2f8847b400b61 Mon Sep 17 00:00:00 2001 From: Richard Henderson Date: Wed, 9 Jun 2004 14:00:35 -0700 Subject: [PATCH] * expmed.c (emit_store_flag): Cope with FLOAT_STORE_FLAG_VALUE. From-SVN: r82854 --- gcc/ChangeLog | 4 ++++ gcc/expmed.c | 27 ++++++++++++++++++++++----- 2 files changed, 26 insertions(+), 5 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 7f5e57d0efd..1d85f75ebbd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,7 @@ +2004-06-09 Richard Henderson + + * expmed.c (emit_store_flag): Cope with FLOAT_STORE_FLAG_VALUE. + 2004-06-09 Geoffrey Keating * Makefile.in (CPPLIB_H): Put files in order of inclusion. diff --git a/gcc/expmed.c b/gcc/expmed.c index b6012721479..96ef1e7d2e5 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. -- 2.30.2