Commit c5979bc6 by Kazu Hirata Committed by Kazu Hirata

h8300.md (*tstsi_upper_bit): New.

	* config/h8300/h8300.md (*tstsi_upper_bit): New.
	(*iorsi3_e2f): Likewise.

From-SVN: r64026
parent 6f62fbd8
2003-03-09 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.md (*tstsi_upper_bit): New.
(*iorsi3_e2f): Likewise.
2003-03-08 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.c (h8300_and_costs): Return the number of
......
......@@ -629,6 +629,27 @@
[(set_attr "length" "2")
(set_attr "cc" "set_zn")])
(define_insn_and_split "*tstsi_upper_bit"
[(set (cc0)
(zero_extract:SI (match_operand:SI 0 "register_operand" "r")
(const_int 1)
(match_operand 1 "const_int_operand" "n")))
(clobber (match_scratch:SI 2 "=&r"))]
"(TARGET_H8300H || TARGET_H8300S)
&& INTVAL (operands[1]) >= 16"
"#"
"&& reload_completed"
[(set (match_dup 2)
(ior:SI (and:SI (match_dup 2)
(const_int -65536))
(lshiftrt:SI (match_dup 0)
(const_int 16))))
(set (cc0)
(zero_extract:SI (match_dup 2)
(const_int 1)
(match_dup 3)))]
"operands[3] = GEN_INT (INTVAL (operands[1]) - 16);")
(define_insn ""
[(set (cc0)
(and:HI (match_operand:HI 0 "register_operand" "r")
......@@ -2878,6 +2899,17 @@
[(set_attr "cc" "clobber")
(set_attr "length" "2")])
(define_insn "*iorsi3_e2f"
[(set (match_operand:SI 0 "register_operand" "=r")
(ior:SI (and:SI (match_operand:SI 1 "register_operand" "0")
(const_int -65536))
(lshiftrt:SI (match_operand:SI 2 "register_operand" "r")
(const_int 16))))]
"TARGET_H8300H || TARGET_H8300S"
"mov.w\\t%e2,%f0"
[(set_attr "length" "2")
(set_attr "cc" "clobber")])
(define_insn_and_split "*iorsi3_two_qi_sext"
[(set (match_operand:SI 0 "register_operand" "=r")
(ior:SI (zero_extend:SI (match_operand:QI 1 "register_operand" "0"))
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment