aboutsummaryrefslogtreecommitdiff
path: root/gcc
diff options
context:
space:
mode:
authorRichard Stallman <rms@gnu.org>1993-01-24 00:03:35 +0000
committerRichard Stallman <rms@gnu.org>1993-01-24 00:03:35 +0000
commit8deb7047a6f2f1c3d8a1d3dadd7c4a48363844d4 (patch)
treea02f5c1112ad474ed4f92cea61e2f43ff6d90ddf /gcc
parentde5f1a5a770f44ff67211d5a9c0c02a22d5c22dc (diff)
downloadgcc-8deb7047a6f2f1c3d8a1d3dadd7c4a48363844d4.zip
gcc-8deb7047a6f2f1c3d8a1d3dadd7c4a48363844d4.tar.gz
gcc-8deb7047a6f2f1c3d8a1d3dadd7c4a48363844d4.tar.bz2
(emit_store_flag): Reset ICODE using returned COMPARISON.
From-SVN: r3315
Diffstat (limited to 'gcc')
-rw-r--r--gcc/expmed.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/gcc/expmed.c b/gcc/expmed.c
index 0d18c5d..c652d07 100644
--- a/gcc/expmed.c
+++ b/gcc/expmed.c
@@ -2800,7 +2800,7 @@ emit_store_flag (target, code, op0, op1, mode, unsignedp, normalizep)
&& (STORE_FLAG_VALUE
== (HOST_WIDE_INT) 1 << (GET_MODE_BITSIZE (mode) - 1)))))
{
- rtx subtarget = target;
+ subtarget = target;
/* If the result is to be wider than OP0, it is best to convert it
first. If it is to be narrower, it is *incorrect* to convert it
@@ -2851,6 +2851,12 @@ emit_store_flag (target, code, op0, op1, mode, unsignedp, normalizep)
: normalizep == -1 ? constm1_rtx
: const_true_rtx);
+ /* Comparison operands could have been swapped;
+ so get the new comprison code.
+ Note that GET_CODE gives us either the original code
+ or the result of swap_condition. */
+ icode = setcc_gen_code[(int) GET_CODE (comparison)];
+
/* Get a reference to the target in the proper mode for this insn. */
compare_mode = insn_operand_mode[(int) icode][0];
subtarget = target;