diff options
| author | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-17 21:20:03 +0000 |
|---|---|---|
| committer | law <law@138bc75d-0d04-0410-961f-82ee72b054a4> | 2001-12-17 21:20:03 +0000 |
| commit | 66ac11b2b8ac1f9e429997c0a2271dbf182ae9da (patch) | |
| tree | 21dbd2506dad7faa36fe6f8c9cd2635d13b7b777 /gcc | |
| parent | 533360190e2e0500f37128fc38cda0f48b0f456a (diff) | |
| download | ppe42-gcc-66ac11b2b8ac1f9e429997c0a2271dbf182ae9da.tar.gz ppe42-gcc-66ac11b2b8ac1f9e429997c0a2271dbf182ae9da.zip | |
* expmed.c (emit_store_flag): Extract updated comparison code
from the return value of compare_from_rtx.
* expr.c (do_store_flag): Similarly.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@48128 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc')
| -rw-r--r-- | gcc/ChangeLog | 6 | ||||
| -rw-r--r-- | gcc/expmed.c | 11 | ||||
| -rw-r--r-- | gcc/expr.c | 8 |
3 files changed, 20 insertions, 5 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 315c934b216..4ae0ce0dbc2 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +Mon Dec 17 14:21:21 2001 Jeffrey A Law (law@redhat.com) + + * expmed.c (emit_store_flag): Extract updated comparison code + from the return value of compare_from_rtx. + * expr.c (do_store_flag): Similarly. + 2001-12-17 Nick Clifton <nickc@cambridge.redhat.com> * caller-save.c (init_caller_save): Use MODE_BASE_REG_CLASS in diff --git a/gcc/expmed.c b/gcc/expmed.c index 8eecca34efa..f2c4aa22450 100644 --- a/gcc/expmed.c +++ b/gcc/expmed.c @@ -4350,12 +4350,13 @@ emit_store_flag (target, code, op0, op1, mode, unsignedp, normalizep) : normalizep == -1 ? constm1_rtx : const_true_rtx); - /* If the code of COMPARISON doesn't match CODE, something is - wrong; we can no longer be sure that we have the operation. - We could handle this case, but it should not happen. */ + /* The code of COMPARISON may not match CODE if compare_from_rtx + decided to swap its operands and reverse the original code. - if (GET_CODE (comparison) != code) - abort (); + We know that compare_from_rtx returns either a CONST_INT or + a new comparison code, so it is safe to just extract the + code from COMPARISON. */ + code = GET_CODE (comparison); /* Get a reference to the target in the proper mode for this insn. */ compare_mode = insn_data[(int) icode].operand[0].mode; diff --git a/gcc/expr.c b/gcc/expr.c index a36ce7b2e02..74c8b44895f 100644 --- a/gcc/expr.c +++ b/gcc/expr.c @@ -10235,6 +10235,14 @@ do_store_flag (exp, target, mode, only_cheap) || (result != const0_rtx && invert)) ? const0_rtx : const1_rtx); + /* The code of RESULT may not match CODE if compare_from_rtx + decided to swap its operands and reverse the original code. + + We know that compare_from_rtx returns either a CONST_INT or + a new comparison code, so it is safe to just extract the + code from RESULT. */ + code = GET_CODE (result); + label = gen_label_rtx (); if (bcc_gen_fctn[(int) code] == 0) abort (); |

