summaryrefslogtreecommitdiffstats
path: root/gcc/expmed.c
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-09 21:00:35 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2004-06-09 21:00:35 +0000
commit1808d14714cdec4af1cd85a0e8b087cc9a4c81a4 (patch)
tree381c0300036ca69eea30d3412062cfaead54789d /gcc/expmed.c
parentc39ed964c8cd9aec2fe6060830804416b0856b60 (diff)
downloadppe42-gcc-1808d14714cdec4af1cd85a0e8b087cc9a4c81a4.tar.gz
ppe42-gcc-1808d14714cdec4af1cd85a0e8b087cc9a4c81a4.zip
* expmed.c (emit_store_flag): Cope with FLOAT_STORE_FLAG_VALUE.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@82854 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/expmed.c')
-rw-r--r--gcc/expmed.c27
1 files changed, 22 insertions, 5 deletions
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.
OpenPOWER on IntegriCloud