diff options
author | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-13 13:20:27 +0000 |
---|---|---|
committer | kazu <kazu@138bc75d-0d04-0410-961f-82ee72b054a4> | 2003-01-13 13:20:27 +0000 |
commit | 0c90f90154b0ee027c1414ef6ef8ae7da70d4f63 (patch) | |
tree | cc358b9be040e0c70b3be32259d348e4ce3a019a | |
parent | f0e48d6f059d4a17d097eb9496ddbed28b9bfaee (diff) | |
download | ppe42-gcc-0c90f90154b0ee027c1414ef6ef8ae7da70d4f63.tar.gz ppe42-gcc-0c90f90154b0ee027c1414ef6ef8ae7da70d4f63.zip |
* config/h8300/h8300.md (*andsi3_lshift_n_sb): New.
(*iorsi3_and_lshiftrt_n_sb): Likewise.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@61251 138bc75d-0d04-0410-961f-82ee72b054a4
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/h8300/h8300.md | 29 |
2 files changed, 34 insertions, 0 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index efcc6353783..32e95b16239 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2003-01-13 Kazu Hirata <kazu@cs.umass.edu> + + * config/h8300/h8300.md (*andsi3_lshift_n_sb): New. + (*iorsi3_and_lshiftrt_n_sb): Likewise. + 2003-01-12 Mark Mitchell <mark@codesourcery.com> PR c++/9264 diff --git a/gcc/config/h8300/h8300.md b/gcc/config/h8300/h8300.md index 66c79e7d41b..5b38e049b93 100644 --- a/gcc/config/h8300/h8300.md +++ b/gcc/config/h8300/h8300.md @@ -2598,6 +2598,24 @@ (clobber (scratch:QI))])] "") +;; Accept (A >> 30) & 2 and the like. + +(define_insn "*andsi3_lshiftrt_n_sb" + [(set (match_operand:SI 0 "register_operand" "=r") + (and:SI (lshiftrt:SI (match_operand:SI 1 "register_operand" "0") + (match_operand:SI 2 "const_int_operand" "n")) + (match_operand:SI 3 "single_one_operand" "n")))] + "(TARGET_H8300H || TARGET_H8300S) + && exact_log2 (INTVAL (operands[3])) < 16 + && INTVAL (operands[2]) + exact_log2 (INTVAL (operands[3])) == 31" + "* +{ + operands[3] = GEN_INT (exact_log2 (INTVAL (operands[3]))); + return \"shll.l\\t%S0\;xor.l\\t%S0,%S0\;bst\\t%Z3,%Y0\"; +}" + [(set_attr "length" "8") + (set_attr "cc" "clobber")]) + ;; plus:SI (define_insn "*addsi3_upper" @@ -2711,6 +2729,17 @@ [(set_attr "length" "6") (set_attr "cc" "set_znv")]) +(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") + (const_int 30)) + (const_int 2)) + (match_operand:SI 2 "register_operand" "0")))] + "(TARGET_H8300H || TARGET_H8300S)" + "rotl.l\\t%S1\;rotr.l\\t%S1\;bor\\t#1,%w0\;bst\\t#1,%w0" + [(set_attr "length" "8") + (set_attr "cc" "clobber")]) + ;; Used to OR the exponent of a float. (define_insn "*iorsi3_shift" |