h8300.md (an anonymous pattern): Give an internal name *tst_extzv_bitqi_1_n.

* config/h8300/h8300.md (an anonymous pattern): Give an
	internal name *tst_extzv_bitqi_1_n.
	Accept bit_operand instead of bit_memory_operand.
	Do not accept bit tests with the MSB.
	(*tst_extzv_memqi_1_n): New.

From-SVN: r59636
This commit is contained in:
Kazu Hirata 2002-11-29 16:10:21 +00:00 committed by Kazu Hirata
parent a1cd285d75
commit d23dff51b2
2 changed files with 29 additions and 3 deletions

View file

@ -1,3 +1,11 @@
2002-11-29 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.md (an anonymous pattern): Give an
internal name *tst_extzv_bitqi_1_n.
Accept bit_operand instead of bit_memory_operand.
Do not accept bit tests with the MSB.
(*tst_extzv_memqi_1_n): New.
2002-11-28 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.c (h8300_eightbit_constant_address_p):

View file

@ -580,15 +580,33 @@
[(set_attr "length" "2")
(set_attr "cc" "set_zn")])
(define_insn ""
[(set (cc0) (zero_extract:SI (match_operand:QI 0 "bit_memory_operand" "r,U")
(define_insn "*tst_extzv_bitqi_1_n"
[(set (cc0) (zero_extract:SI (match_operand:QI 0 "bit_operand" "r,U")
(const_int 1)
(match_operand 1 "const_int_operand" "n,n")))]
"TARGET_H8300H || TARGET_H8300S"
"(TARGET_H8300H || TARGET_H8300S)
&& INTVAL (operands[1]) != 7"
"btst %Z1,%Y0"
[(set_attr "length" "2,8")
(set_attr "cc" "set_zn,set_zn")])
(define_insn_and_split "*tst_extzv_memqi_1_n"
[(set (cc0) (zero_extract:SI (match_operand:QI 0 "memory_operand" "m")
(const_int 1)
(match_operand 1 "const_int_operand" "n")))
(clobber (match_scratch:QI 2 "=&r"))]
"(TARGET_H8300H || TARGET_H8300S)
&& !EXTRA_CONSTRAINT (operands[0], 'U')
&& INTVAL (operands[1]) != 7"
"#"
"&& reload_completed"
[(set (match_dup 2)
(match_dup 0))
(set (cc0) (zero_extract:SI (match_dup 2)
(const_int 1)
(match_dup 1)))]
"")
(define_insn ""
[(set (cc0) (zero_extract:SI (match_operand:SI 0 "register_operand" "r")
(const_int 1)