diff options
author | Richard Henderson <rth@redhat.com> | 2011-02-10 08:03:48 -0800 |
---|---|---|
committer | Richard Henderson <rth@gcc.gnu.org> | 2011-02-10 08:03:48 -0800 |
commit | 72602cd16b4e34843845c7b39aa5028e211cdbbf (patch) | |
tree | ae0c12be4ddef98fca95763b928c8115814d8a99 | |
parent | ea57f5739f724a9512743d18c3093f276b92c5f5 (diff) | |
download | gcc-72602cd16b4e34843845c7b39aa5028e211cdbbf.zip gcc-72602cd16b4e34843845c7b39aa5028e211cdbbf.tar.gz gcc-72602cd16b4e34843845c7b39aa5028e211cdbbf.tar.bz2 |
predicates.md (rx_zs_comparison_operator): Revert change from 2011-02-03.
* config/rx/predicates.md (rx_zs_comparison_operator): Revert
change from 2011-02-03.
* config/rx/rx.c (flags_from_code): Likewise.
(rx_print_operand) ['B']: For LT/GE, use lt/ge if overflow flag
is valid, n/pz otherwise.
(rx_select_cc_mode): Return CCmode if Y is not zero.
From-SVN: r170004
-rw-r--r-- | gcc/ChangeLog | 9 | ||||
-rw-r--r-- | gcc/config/rx/predicates.md | 2 | ||||
-rw-r--r-- | gcc/config/rx/rx.c | 15 |
3 files changed, 19 insertions, 7 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6094cde..b46b1bf 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,12 @@ +2011-02-10 Richard Henderson <rth@redhat.com> + + * config/rx/predicates.md (rx_zs_comparison_operator): Revert + change from 2011-02-03. + * config/rx/rx.c (flags_from_code): Likewise. + (rx_print_operand) ['B']: For LT/GE, use lt/ge if overflow flag + is valid, n/pz otherwise. + (rx_select_cc_mode): Return CCmode if Y is not zero. + 2011-02-10 Richard Guenther <rguenther@suse.de> * tree-ssa-structalias.c (bitpos_of_field): Use BITS_PER_UNIT, diff --git a/gcc/config/rx/predicates.md b/gcc/config/rx/predicates.md index 82cac42..77b3353 100644 --- a/gcc/config/rx/predicates.md +++ b/gcc/config/rx/predicates.md @@ -284,7 +284,7 @@ ) (define_predicate "rx_zs_comparison_operator" - (match_code "eq,ne") + (match_code "eq,ne,lt,ge") ) ;; GT and LE omitted due to operand swap required. diff --git a/gcc/config/rx/rx.c b/gcc/config/rx/rx.c index 839523f..e01f453 100644 --- a/gcc/config/rx/rx.c +++ b/gcc/config/rx/rx.c @@ -447,13 +447,14 @@ rx_print_operand (FILE * file, rtx op, int letter) } else { + unsigned int flags = flags_from_mode (mode); switch (code) { case LT: - ret = "lt"; + ret = (flags & CC_FLAG_O ? "lt" : "n"); break; case GE: - ret = "ge"; + ret = (flags & CC_FLAG_O ? "ge" : "pz"); break; case GT: ret = "gt"; @@ -482,8 +483,7 @@ rx_print_operand (FILE * file, rtx op, int letter) default: gcc_unreachable (); } - gcc_checking_assert ((flags_from_code (code) - & ~flags_from_mode (mode)) == 0); + gcc_checking_assert ((flags_from_code (code) & ~flags) == 0); } fputs (ret, file); break; @@ -2625,7 +2625,7 @@ flags_from_code (enum rtx_code code) { case LT: case GE: - return CC_FLAG_S | CC_FLAG_O; + return CC_FLAG_S; case GT: case LE: return CC_FLAG_S | CC_FLAG_O | CC_FLAG_Z; @@ -2666,11 +2666,14 @@ rx_cc_modes_compatible (enum machine_mode m1, enum machine_mode m2) /* Return the minimal CC mode needed to implement (CMP_CODE X Y). */ enum machine_mode -rx_select_cc_mode (enum rtx_code cmp_code, rtx x, rtx y ATTRIBUTE_UNUSED) +rx_select_cc_mode (enum rtx_code cmp_code, rtx x, rtx y) { if (GET_MODE_CLASS (GET_MODE (x)) == MODE_FLOAT) return CC_Fmode; + if (y != const0_rtx) + return CCmode; + return mode_from_flags (flags_from_code (cmp_code)); } |