Commit 82b4dc2e by Kazu Hirata Committed by Kazu Hirata

h8300.md (*tst_extzv_bitqi_1_n): Take a scratch register.

	* config/h8300/h8300.md (*tst_extzv_bitqi_1_n): Take a scratch
	register.
	(*tst_extzv_memqi_1_n): Change to a splitter.
	(a peephole2): Update.

From-SVN: r63610
parent 05e643de
2003-03-01 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.md (*tst_extzv_bitqi_1_n): Take a scratch
register.
(*tst_extzv_memqi_1_n): Change to a splitter.
(a peephole2): Update.
2003-03-01 Richard Earnshaw <rearnsha@arm.com> 2003-03-01 Richard Earnshaw <rearnsha@arm.com>
* predict.c (estimate_bb_frequencies): Initialize the sreal * predict.c (estimate_bb_frequencies): Initialize the sreal
......
...@@ -588,29 +588,35 @@ ...@@ -588,29 +588,35 @@
[(set_attr "length" "2") [(set_attr "length" "2")
(set_attr "cc" "set_zn")]) (set_attr "cc" "set_zn")])
(define_insn "*tst_extzv_bitqi_1_n" (define_insn "*tst_extzv_1_n"
[(set (cc0) (zero_extract:SI (match_operand:QI 0 "bit_operand" "r,U") [(set (cc0)
(const_int 1) (zero_extract:SI (match_operand:QI 0 "general_operand_src" "r,U,mn>")
(match_operand 1 "const_int_operand" "n,n")))] (const_int 1)
(match_operand 1 "const_int_operand" "n,n,n")))
(clobber (match_scratch:QI 2 "=X,X,&r"))]
"(TARGET_H8300H || TARGET_H8300S)" "(TARGET_H8300H || TARGET_H8300S)"
"btst %Z1,%Y0" "@
[(set_attr "length" "2,8") btst\\t%Z1,%Y0
(set_attr "cc" "set_zn,set_zn")]) btst\\t%Z1,%Y0
#"
[(set_attr "length" "2,8,10")
(set_attr "cc" "set_zn,set_zn,set_zn")])
(define_insn_and_split "*tst_extzv_memqi_1_n" (define_split
[(set (cc0) (zero_extract:SI (match_operand:QI 0 "memory_operand" "m") [(set (cc0)
(const_int 1) (zero_extract:SI (match_operand:QI 0 "general_operand" "")
(match_operand 1 "const_int_operand" "n"))) (const_int 1)
(clobber (match_scratch:QI 2 "=&r"))] (match_operand 1 "const_int_operand" "")))
(clobber (match_operand:QI 2 "register_operand" ""))]
"(TARGET_H8300H || TARGET_H8300S) "(TARGET_H8300H || TARGET_H8300S)
&& reload_completed
&& !EXTRA_CONSTRAINT (operands[0], 'U')" && !EXTRA_CONSTRAINT (operands[0], 'U')"
"#"
"&& reload_completed"
[(set (match_dup 2) [(set (match_dup 2)
(match_dup 0)) (match_dup 0))
(set (cc0) (zero_extract:SI (match_dup 2) (parallel [(set (cc0) (zero_extract:SI (match_dup 2)
(const_int 1) (const_int 1)
(match_dup 1)))] (match_dup 1)))
(clobber (scratch:QI))])]
"") "")
(define_insn "" (define_insn ""
...@@ -3513,10 +3519,11 @@ ...@@ -3513,10 +3519,11 @@
"") "")
(define_peephole2 (define_peephole2
[(set (cc0) [(parallel [(set (cc0)
(zero_extract:SI (match_operand:QI 0 "register_operand" "") (zero_extract:SI (match_operand:QI 0 "register_operand" "")
(const_int 1) (const_int 1)
(const_int 7))) (const_int 7)))
(clobber (scratch:QI))])
(set (pc) (set (pc)
(if_then_else (match_operator 1 "eqne_operator" (if_then_else (match_operator 1 "eqne_operator"
[(cc0) (const_int 0)]) [(cc0) (const_int 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