Commit 39ecf301 by Kazu Hirata Committed by Kazu Hirata

h8300.md (*iorsi3_and_ashift): New.

	* config/h8300/h8300.md (*iorsi3_and_ashift): New.
	(*iorsi3_and_lshiftrt): Likewise.
	(*iorsi3_zero_extract): Likewise.

From-SVN: r65019
parent d4048ff6
2003-03-29 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.md (*iorsi3_and_ashift): New.
(*iorsi3_and_lshiftrt): Likewise.
(*iorsi3_zero_extract): Likewise.
2003-03-29 Kazu Hirata <kazu@cs.umass.edu>
* config/h8300/h8300.md (*insv_si_8_8): New.
(*insv_si_8_8_lshiftrt_8): Likewise.
(a peephole2): Likewise.
......
......@@ -3092,6 +3092,58 @@
[(set_attr "length" "6")
(set_attr "cc" "set_znv")])
(define_insn "*iorsi3_and_ashift"
[(set (match_operand:SI 0 "register_operand" "=r")
(ior:SI (and:SI (ashift:SI (match_operand:SI 1 "register_operand" "r")
(match_operand:SI 2 "const_int_operand" "n"))
(match_operand:SI 3 "single_one_operand" "n"))
(match_operand:SI 4 "register_operand" "0")))]
"(TARGET_H8300H || TARGET_H8300S)
&& (INTVAL (operands[3]) & ~0xffff) == 0"
"*
{
rtx srcpos = GEN_INT (exact_log2 (INTVAL (operands[3]))
- INTVAL (operands[2]));
rtx dstpos = GEN_INT (exact_log2 (INTVAL (operands[3])));
operands[2] = srcpos;
operands[3] = dstpos;
return \"bld\\t%Z2,%Y1\;bor\\t%Z3,%Y0\;bst\\t%Z3,%Y0\";
}"
[(set_attr "length" "6")
(set_attr "cc" "clobber")])
(define_insn "*iorsi3_and_lshiftrt"
[(set (match_operand:SI 0 "register_operand" "=r")
(ior:SI (and:SI (lshiftrt:SI (match_operand:SI 1 "register_operand" "r")
(match_operand:SI 2 "const_int_operand" "n"))
(match_operand:SI 3 "single_one_operand" "n"))
(match_operand:SI 4 "register_operand" "0")))]
"(TARGET_H8300H || TARGET_H8300S)
&& ((INTVAL (operands[3]) << INTVAL (operands[2])) & ~0xffff) == 0"
"*
{
rtx srcpos = GEN_INT (exact_log2 (INTVAL (operands[3]))
+ INTVAL (operands[2]));
rtx dstpos = GEN_INT (exact_log2 (INTVAL (operands[3])));
operands[2] = srcpos;
operands[3] = dstpos;
return \"bld\\t%Z2,%Y1\;bor\\t%Z3,%Y0\;bst\\t%Z3,%Y0\";
}"
[(set_attr "length" "6")
(set_attr "cc" "clobber")])
(define_insn "*iorsi3_zero_extract"
[(set (match_operand:SI 0 "register_operand" "=r")
(ior:SI (zero_extract:SI (match_operand:SI 1 "register_operand" "r")
(const_int 1)
(match_operand:SI 2 "const_int_operand" "n"))
(match_operand:SI 3 "register_operand" "0")))]
"(TARGET_H8300H || TARGET_H8300S)
&& INTVAL (operands[2]) < 16"
"bld\\t%Z2,%Y1\;bor\\t#0,%w0\;bst\\t#0,%w0"
[(set_attr "length" "6")
(set_attr "cc" "clobber")])
(define_insn "*iorsi3_and_lshiftrt_n_sb"
[(set (match_operand:SI 0 "register_operand" "=r")
(ior:SI (and:SI (lshiftrt:SI (match_operand:SI 1 "register_operand" "r")
......
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