From d43b45938334456d21dbe82265f89e97af4a55f2 Mon Sep 17 00:00:00 2001 From: kazu Date: Sat, 2 Feb 2002 20:57:06 +0000 Subject: [PATCH] * config/h8300/h8300.md (one_cmpl patterns): Tighten the predicates of operands[1]. Split the patterns for each processor variant. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@49446 138bc75d-0d04-0410-961f-82ee72b054a4 --- gcc/ChangeLog | 6 +++++ gcc/config/h8300/h8300.md | 66 ++++++++++++++++++++++++++--------------------- 2 files changed, 43 insertions(+), 29 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 96e4904..b6bff10 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,5 +1,11 @@ 2002-02-02 Kazu Hirata + * config/h8300/h8300.md (one_cmpl patterns): Tighten the + predicates of operands[1]. Split the patterns for each + processor variant. + +2002-02-02 Kazu Hirata + * config/h8300/h8300.md (xor patterns): Tighten the predicates of operands[1] to register_operand. diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index ba9b2d5..da0f6f1 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -1348,47 +1348,55 @@ (define_insn "one_cmplqi2" [(set (match_operand:QI 0 "register_operand" "=r") - (not:QI (match_operand:QI 1 "general_operand" "0")))] + (not:QI (match_operand:QI 1 "register_operand" "0")))] "" "not %X0" [(set_attr "length" "2") (set_attr "cc" "set_znv")]) -(define_insn "one_cmplhi2" +(define_expand "one_cmplhi2" [(set (match_operand:HI 0 "register_operand" "=r") - (not:HI (match_operand:HI 1 "general_operand" "0")))] + (not:HI (match_operand:HI 1 "register_operand" "0")))] "" - "* -{ - if (TARGET_H8300) - return \"not %s0\;not %t0\"; - else - return \"not %T0\"; -}" + "") + +(define_insn "" + [(set (match_operand:HI 0 "register_operand" "=r") + (not:HI (match_operand:HI 1 "register_operand" "0")))] + "TARGET_H8300" + "not %s0\;not %t0" [(set_attr "cc" "clobber") - (set (attr "length") - (if_then_else (eq (symbol_ref "TARGET_H8300H || TARGET_H8300S") - (const_int 0)) - (const_int 4) - (const_int 2)))]) + (set_attr "length" "4")]) + +(define_insn "" + [(set (match_operand:HI 0 "register_operand" "=r") + (not:HI (match_operand:HI 1 "register_operand" "0")))] + "TARGET_H8300H || TARGET_H8300S" + "not %T0" + [(set_attr "cc" "set_znv") + (set_attr "length" "2")]) -(define_insn "one_cmplsi2" +(define_expand "one_cmplsi2" [(set (match_operand:SI 0 "register_operand" "=r") - (not:SI (match_operand:SI 1 "general_operand" "0")))] + (not:SI (match_operand:SI 1 "register_operand" "0")))] "" - "* -{ - if (TARGET_H8300) - return \"not %w0\;not %x0\;not %y0\;not %z0\"; - else - return \"not %S0\"; -}" + "") + +(define_insn "" + [(set (match_operand:SI 0 "register_operand" "=r") + (not:SI (match_operand:SI 1 "register_operand" "0")))] + "TARGET_H8300" + "not %w0\;not %x0\;not %y0\;not %z0" [(set_attr "cc" "clobber") - (set (attr "length") - (if_then_else (eq (symbol_ref "TARGET_H8300H || TARGET_H8300S") - (const_int 0)) - (const_int 8) - (const_int 2)))]) + (set_attr "length" "8")]) + +(define_insn "" + [(set (match_operand:SI 0 "register_operand" "=r") + (not:SI (match_operand:SI 1 "register_operand" "0")))] + "TARGET_H8300H || TARGET_H8300S" + "not %S0" + [(set_attr "cc" "set_znv") + (set_attr "length" "2")]) ;; ---------------------------------------------------------------------- ;; JUMP INSTRUCTIONS -- 2.7.4