This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH/RFA] SH: Rename ashlhi3 insn
- From: Kaz Kojima <kkojima at rr dot iij4u dot or dot jp>
- To: gcc-patches at gcc dot gnu dot org
- Cc: joern dot rennecke at st dot com, aoliva at redhat dot com
- Date: Sun, 20 Mar 2005 20:19:39 +0900 (JST)
- Subject: [PATCH/RFA] SH: Rename ashlhi3 insn
Hi,
testsuite/gfortran.dg/g77/f90-intrinsic-bit.f fails on
sh4-unknown-linux-gnu with an ICE because of the unrecognizable
insn:
(insn 1052 1051 1053 26 (parallel [
(set (reg:HI 1351)
(ashift:HI (reg:HI 1352)
(reg:HI 1353 [ j2.58 ])))
(clobber (reg:SI 147 t))
]) -1 (nil)
(expr_list:REG_UNUSED (reg:SI 147 t)
(expr_list:REG_DEAD (reg:HI 1352)
(expr_list:REG_DEAD (reg:HI 1353 [ j2.58 ])
(expr_list:REG_UNUSED (reg:SI 147 t)
(nil))))))
Non-SHmedia SH targets define an "ashlhi3" insn:
(define_insn "ashlhi3"
[(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")))
(clobber (reg:SI T_REG))]
"TARGET_SH1"
...
which has the rather limited operands, but it seems that ashl*3
insns are expected to have more generic operands. The attached
one-liner fixes the failure for f90-intrinsic-bit.f.
Bootstrapped and regtested on sh4-unknown-linux-gnu. Ok for
mainline?
Regards,
kaz
--
2005-03-20 Kaz Kojima <kkojima@gcc.gnu.org>
* config/sh/sh.md (ashlhi3): Rename to ashlhi3_n.
diff -uprN ORIG/gcc/gcc/config/sh/sh.md LOCAL/gcc/gcc/config/sh/sh.md
--- ORIG/gcc/gcc/config/sh/sh.md 2005-01-19 08:56:18.000000000 +0900
+++ LOCAL/gcc/gcc/config/sh/sh.md 2005-03-19 15:47:48.000000000 +0900
@@ -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")))