h8300.md (*tstsi_variable_bit): New.

* config/h8300/h8300.md (*tstsi_variable_bit): New.
	(*tstsi_variable_bit_qi): Likewise.

From-SVN: r71902
This commit is contained in:
Kazu Hirata 2003-09-29 16:32:28 +00:00 committed by Kazu Hirata
parent ea57e5adfa
commit 22a3d55fdf
2 changed files with 41 additions and 0 deletions

View File

@ -1,3 +1,8 @@
2003-09-29 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.md (*tstsi_variable_bit): New.
(*tstsi_variable_bit_qi): Likewise.
2003-09-28 Phil Edwards <phil@codesourcery.com>
* doc/cppopts.texi: Use 'dashMP' instead of '-MP' as a cross-

View File

@ -652,6 +652,42 @@
(match_dup 3)))]
"operands[3] = GEN_INT (INTVAL (operands[1]) - 16);")
(define_insn "*tstsi_variable_bit"
[(set (cc0)
(zero_extract:SI (match_operand:SI 0 "register_operand" "r")
(const_int 1)
(and:SI (match_operand:SI 1 "register_operand" "r")
(const_int 7))))]
"TARGET_H8300H || TARGET_H8300S"
"btst %w1,%w0"
[(set_attr "length" "2")
(set_attr "cc" "set_zn")])
(define_insn_and_split "*tstsi_variable_bit_qi"
[(set (cc0)
(zero_extract:SI (zero_extend:SI (match_operand:QI 0 "general_operand_src" "r,U,mn>"))
(const_int 1)
(and:SI (match_operand:SI 1 "register_operand" "r,r,r")
(const_int 7))))
(clobber (match_scratch:QI 2 "=X,X,&r"))]
"(TARGET_H8300H || TARGET_H8300S)"
"@
btst\\t%w1,%X0
btst\\t%w1,%X0
#"
"&& reload_completed
&& !EXTRA_CONSTRAINT (operands[0], 'U')"
[(set (match_dup 2)
(match_dup 0))
(parallel [(set (cc0) (zero_extract:SI (zero_extend:SI (match_dup 2))
(const_int 1)
(and:SI (match_dup 1)
(const_int 7))))
(clobber (scratch:QI))])]
""
[(set_attr "length" "2,8,10")
(set_attr "cc" "set_zn,set_zn,set_zn")])
(define_insn "tstqi"
[(set (cc0) (match_operand:QI 0 "register_operand" "r"))]
""