;; ??? If we can remove the operand type on all the insns, do it.
;; ??? Otherwise, try to have the operand type on all the insns.
+;; Some move patterns have conditions which check that one operand
+;; is a register. Shouldn't all of them have such a condition?
+
(define_attr "type" "branch,return,call,arith,move,float,multi"
(const_string "arith"))
(set (attr "length") (if_then_else (eq_attr "cpu" "h8300") (const_int 2) (const_int 4)))
(set_attr "cc" "set")])
-;; ??? Use of the `c' constraint doesn't seem right.
(define_insn "movqi_internal"
- [(set (match_operand:QI 0 "general_operand_dst" "=r,r,r,o,<,r")
- (match_operand:QI 1 "general_operand_src" "I,r>,io,r,r,c"))]
+ [(set (match_operand:QI 0 "general_operand_dst" "=r,r,<,r,o")
+ (match_operand:QI 1 "general_operand_src" "I,r>,r,io,r"))]
"register_operand (operands[0],QImode)
|| register_operand (operands[1], QImode)"
"@
mov.b %X1,%X0
mov.b %X1,%X0
mov.b %X1,%X0
- mov.b %X1,%X0
- xor %X0,%X0\;bst #0,%X0"
+ mov.b %X1,%X0"
[(set_attr "type" "move")
(set_attr_alternative "length"
- [(const_int 2) (const_int 2)
- (if_then_else (eq_attr "cpu" "h8300") (const_int 4) (const_int 8))
+ [(const_int 2) (const_int 2) (const_int 2)
(if_then_else (eq_attr "cpu" "h8300") (const_int 4) (const_int 8))
- (if_then_else (eq_attr "cpu" "h8300") (const_int 2) (const_int 4))
- (const_int 4)])
- (set_attr "cc" "set_zn_c0,set,set,set,set,clobber")])
+ (if_then_else (eq_attr "cpu" "h8300") (const_int 4) (const_int 8))])
+ (set_attr "cc" "set_zn_c0,set,set,set,set")])
(define_expand "movqi"
[(set (match_operand:QI 0 "general_operand_dst" "")
}")
(define_insn "movstrictqi"
- [(set (strict_low_part (match_operand:QI 0 "general_operand_dst" "=r,r,r,o,<"))
- (match_operand:QI 1 "general_operand_src" "I,r,io,r,r"))]
+ [(set (strict_low_part (match_operand:QI 0 "general_operand_dst" "=r,r,r"))
+ (match_operand:QI 1 "general_operand_src" "I,r,io"))]
""
"@
sub.b %X0,%X0
mov.b %X1,%X0
- mov.b %X1,%X0
- mov.b %X1,%X0
mov.b %X1,%X0"
[(set_attr "type" "move")
(set_attr_alternative "length"
[(const_int 2) (const_int 2)
- (if_then_else (eq_attr "cpu" "h8300") (const_int 4) (const_int 8))
- (if_then_else (eq_attr "cpu" "h8300") (const_int 4) (const_int 8))
- (if_then_else (eq_attr "cpu" "h8300") (const_int 2) (const_int 4))])
- (set_attr "cc" "set_zn_c0,set,set,set,set")])
+ (if_then_else (eq_attr "cpu" "h8300") (const_int 4) (const_int 8))])
+ (set_attr "cc" "set_zn_c0,set,set")])
;; movhi
(set_attr "cc" "set")])
(define_insn "movhi_internal"
- [(set (match_operand:HI 0 "general_operand_dst" "=ra,ra,ra,o,<")
- (match_operand:HI 1 "general_operand_src" "I,ra>,ion,ra,ra"))]
+ [(set (match_operand:HI 0 "general_operand_dst" "=ra,ra,<,ra,o")
+ (match_operand:HI 1 "general_operand_src" "I,ra>,ra,ion,ra"))]
""
"@
sub.w %T0,%T0
mov.w %T1,%T0"
[(set_attr "type" "move")
(set_attr_alternative "length"
- [(const_int 2) (const_int 2)
+ [(const_int 2) (const_int 2) (const_int 2)
(if_then_else (eq_attr "cpu" "h8300") (const_int 4) (const_int 8))
- (if_then_else (eq_attr "cpu" "h8300") (const_int 4) (const_int 8))
- (if_then_else (eq_attr "cpu" "h8300") (const_int 2) (const_int 4))])
+ (if_then_else (eq_attr "cpu" "h8300") (const_int 4) (const_int 8))])
(set_attr "cc" "set_zn_c0,set,set,set,set")])
(define_expand "movhi"
}")
(define_insn "movstricthi"
- [(set (strict_low_part (match_operand:HI 0 "general_operand_dst" "=r,r,r,o,<"))
- (match_operand:HI 1 "general_operand_src" "I,r,io,r,r"))]
+ [(set (strict_low_part (match_operand:HI 0 "general_operand_dst" "=r,r,r"))
+ (match_operand:HI 1 "general_operand_src" "I,r,io"))]
""
"@
sub.w %T0,%T0
mov.w %T1,%T0
- mov.w %T1,%T0
- mov.w %T1,%T0
mov.w %T1,%T0"
[(set_attr "type" "move")
(set_attr_alternative "length"
[(const_int 2) (const_int 2)
- (if_then_else (eq_attr "cpu" "h8300") (const_int 4) (const_int 8))
- (if_then_else (eq_attr "cpu" "h8300") (const_int 4) (const_int 8))
- (if_then_else (eq_attr "cpu" "h8300") (const_int 2) (const_int 4))])
- (set_attr "cc" "set_zn_c0,set,set,set,set")])
+ (if_then_else (eq_attr "cpu" "h8300") (const_int 4) (const_int 8))])
+ (set_attr "cc" "set_zn_c0,set,set")])
;; movsi
mov.l %S1,%S0
mov.l %S1,%S0"
[(set_attr "type" "move")
- (set_attr "length" "2,2,8,8,4,4")
+ (set_attr "length" "2,2,10,10,4,4")
(set_attr "cc" "set_zn_c0,set,set,set,set,set")])
(define_insn "movsf_h8300h"
mov.l %S1,%S0
mov.l %S1,%S0"
[(set_attr "type" "move")
- (set_attr "length" "2,2,8,8,4,4")
+ (set_attr "length" "2,2,10,10,4,4")
(set_attr "cc" "set_zn_c0,set,set,set,set,set")])
\f
;; ----------------------------------------------------------------------