This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[patch] h8300.md: Tighten more predicates.
- From: Kazu Hirata <kazu at hxi dot com>
- To: gcc-patches at gcc dot gnu dot org
- Subject: [patch] h8300.md: Tighten more predicates.
Hi,
Attached is a patch to tighten the predicates used in one_compl
patterns.
Tested on h8300 port. Committed.
Kazu Hirata
2002-02-02 Kazu Hirata <kazu@hxi.com>
* config/h8300/h8300.md (one_cmpl patterns): Tighten the
predicates of operands[1]. Split the patterns for each
processor variant.
Index: h8300.md
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/h8300/h8300.md,v
retrieving revision 1.67
diff -c -r1.67 h8300.md
*** h8300.md 2002/02/02 20:48:38 1.67
--- h8300.md 2002/02/02 20:50:44
***************
*** 1348,1394 ****
(define_insn "one_cmplqi2"
[(set (match_operand:QI 0 "register_operand" "=r")
! (not:QI (match_operand:QI 1 "general_operand" "0")))]
""
"not %X0"
[(set_attr "length" "2")
(set_attr "cc" "set_znv")])
! (define_insn "one_cmplhi2"
[(set (match_operand:HI 0 "register_operand" "=r")
! (not:HI (match_operand:HI 1 "general_operand" "0")))]
""
! "*
! {
! if (TARGET_H8300)
! return \"not %s0\;not %t0\";
! else
! return \"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)))])
! (define_insn "one_cmplsi2"
[(set (match_operand:SI 0 "register_operand" "=r")
! (not:SI (match_operand:SI 1 "general_operand" "0")))]
""
! "*
! {
! if (TARGET_H8300)
! return \"not %w0\;not %x0\;not %y0\;not %z0\";
! else
! return \"not %S0\";
! }"
[(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)))])
;; ----------------------------------------------------------------------
;; JUMP INSTRUCTIONS
--- 1348,1402 ----
(define_insn "one_cmplqi2"
[(set (match_operand:QI 0 "register_operand" "=r")
! (not:QI (match_operand:QI 1 "register_operand" "0")))]
""
"not %X0"
[(set_attr "length" "2")
(set_attr "cc" "set_znv")])
! (define_expand "one_cmplhi2"
[(set (match_operand:HI 0 "register_operand" "=r")
! (not:HI (match_operand:HI 1 "register_operand" "0")))]
""
! "")
!
! (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" "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_expand "one_cmplsi2"
[(set (match_operand:SI 0 "register_operand" "=r")
! (not:SI (match_operand:SI 1 "register_operand" "0")))]
""
! "")
!
! (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" "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