diff options
author | Kaz Kojima <kkojima@gcc.gnu.org> | 2005-03-23 00:14:52 +0000 |
---|---|---|
committer | Kaz Kojima <kkojima@gcc.gnu.org> | 2005-03-23 00:14:52 +0000 |
commit | 39f44b0b2b2af89dec6d6295ed92d5bac981348a (patch) | |
tree | 0a580ae4cac845d28d9627c9b4f1a063d8aa89f7 /gcc | |
parent | 65ec6c0eb28c3d9ca88aac7b2cfd15a7cdf1905e (diff) | |
download | gcc-39f44b0b2b2af89dec6d6295ed92d5bac981348a.zip gcc-39f44b0b2b2af89dec6d6295ed92d5bac981348a.tar.gz gcc-39f44b0b2b2af89dec6d6295ed92d5bac981348a.tar.bz2 |
sh.md (ashlhi3): Rename to *ashlhi3_n and add a new ashlhi3 expander.
* config/sh/sh.md (ashlhi3): Rename to *ashlhi3_n and add a new
ashlhi3 expander.
From-SVN: r96905
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 5 | ||||
-rw-r--r-- | gcc/config/sh/sh.md | 18 |
2 files changed, 22 insertions, 1 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 9473dc1..2f7a329 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,8 @@ +2005-03-22 Kaz Kojima <kkojima@gcc.gnu.org> + + * config/sh/sh.md (ashlhi3): Rename to *ashlhi3_n and add a new + ashlhi3 expander. + 2005-03-22 Tobias Schl"uter <tobias.schlueter@physik.uni-muenchen.de> * tree.h (DECL_IGNORED_P, DECL_IN_SYSTEM_HEADER): Clarify comments. diff --git a/gcc/config/sh/sh.md b/gcc/config/sh/sh.md index e367d60..bb799fb 100644 --- a/gcc/config/sh/sh.md +++ b/gcc/config/sh/sh.md @@ -2293,7 +2293,7 @@ FAIL; }") -(define_insn "ashlhi3" +(define_insn "*ashlhi3_n" [(set (match_operand:HI 0 "arith_reg_operand" "=r") (ashift:HI (match_operand:HI 1 "arith_reg_operand" "0") (match_operand:HI 2 "const_int_operand" "n"))) @@ -2308,6 +2308,22 @@ (const_string "6"))) (set_attr "type" "arith")]) +(define_expand "ashlhi3" + [(parallel [(set (match_operand:HI 0 "arith_reg_operand" "") + (ashift:HI (match_operand:HI 1 "arith_reg_operand" "") + (match_operand:SI 2 "nonmemory_operand" ""))) + (clobber (reg:SI T_REG))])] + "TARGET_SH1" + " +{ + if (GET_CODE (operands[2]) != CONST_INT) + FAIL; + /* It may be possible to call gen_ashlhi3 directly with more generic + operands. Make sure operands[1] is a HImode register here. */ + if (!arith_reg_operand (operands[1], HImode)) + operands[1] = copy_to_mode_reg (HImode, operands[1]); +}") + (define_split [(set (match_operand:HI 0 "arith_reg_operand" "") (ashift:HI (match_operand:HI 1 "arith_reg_operand" "") |