summaryrefslogtreecommitdiff
path: root/gcc/config/m32c/cond.md
diff options
context:
space:
mode:
authorrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-01 20:26:49 +0000
committerrth <rth@138bc75d-0d04-0410-961f-82ee72b054a4>2012-08-01 20:26:49 +0000
commitef51ef7ae444c3be08bfb15bb8ef955ca84778ea (patch)
tree44315f9312f06698b289f88ba6d5d906d51f5e05 /gcc/config/m32c/cond.md
parentcffc1a1a1999ee3428d0ef9f34c60c7901a47d8a (diff)
downloadgcc-ef51ef7ae444c3be08bfb15bb8ef955ca84778ea.tar.gz
m32c: Don't use set_optab_handler
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@190049 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/config/m32c/cond.md')
-rw-r--r--gcc/config/m32c/cond.md23
1 files changed, 20 insertions, 3 deletions
diff --git a/gcc/config/m32c/cond.md b/gcc/config/m32c/cond.md
index c751070e716..5886a7da963 100644
--- a/gcc/config/m32c/cond.md
+++ b/gcc/config/m32c/cond.md
@@ -152,14 +152,31 @@
;; These are the pre-split patterns for the conditional sets.
-(define_insn_and_split "cstore<mode>4"
+(define_expand "cstore<mode>4"
+ [(set (match_operand:QI 0 "register_operand")
+ (match_operator:QI 1 "ordered_comparison_operator"
+ [(match_operand:QHPSI 2 "mra_operand")
+ (match_operand:QHPSI 3 "mrai_operand")]))]
+ ""
+{
+ if (TARGET_A24)
+ {
+ rtx o = gen_reg_rtx (HImode);
+ emit_insn (gen_cstore<mode>4_24 (o, operands[1],
+ operands[2], operands[3]));
+ emit_move_insn (operands[0], gen_lowpart (QImode, o));
+ DONE;
+ }
+})
+
+(define_insn_and_split "*cstore<mode>4_16"
[(set (match_operand:QI 0 "register_operand" "=Rqi")
(match_operator:QI 1 "ordered_comparison_operator"
[(match_operand:QHPSI 2 "mra_operand" "RraSd")
(match_operand:QHPSI 3 "mrai_operand" "RraSdi")]))]
"TARGET_A16"
"#"
- "reload_completed"
+ "&& reload_completed"
[(set (reg:CC FLG_REGNO)
(compare (match_dup 2)
(match_dup 3)))
@@ -176,7 +193,7 @@
(match_operand:QHPSI 3 "mrai_operand" "RraSdi")]))]
"TARGET_A24"
"#"
- "reload_completed"
+ "&& reload_completed"
[(set (reg:CC FLG_REGNO)
(compare (match_dup 2)
(match_dup 3)))