This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
[PATCH/RFA] PR target/13250
- 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 superh dot com, aoliva at redhat dot com
- Date: Fri, 28 May 2004 12:15:31 +0900 (JST)
- Subject: [PATCH/RFA] PR target/13250
Hi,
It seems that PR target/13250
<URL:http://gcc.gnu.org/bugzilla/show_bug.cgi?id=13250>
is a problem caused by a direct substitution operands[1] for parts[?]
in rotlsi3 expand of SH. The appended patch fixes it.
It's tested with bootstrap 3.4 on sh4-unknown-linux-gnu and regtested
on mainline for x86 cross to sh4-unknown-linux-gnu, though now mainline
fails in building c++ library for this target without -fno-schedule-insns.
Regards,
kaz
--
PR target/13250
* config/sh/sh.md (rotlsi3): Use emit_move_insn.
diff -uprN ORIG/gcc/gcc/config/sh/sh.md LOCAL/gcc/gcc/config/sh/sh.md
--- ORIG/gcc/gcc/config/sh/sh.md 2004-05-14 10:08:34.000000000 +0900
+++ LOCAL/gcc/gcc/config/sh/sh.md 2004-05-27 08:32:37.000000000 +0900
@@ -2194,7 +2194,7 @@
parts[0] = gen_reg_rtx (SImode);
parts[1] = gen_reg_rtx (SImode);
emit_insn (gen_rotlsi3_16 (parts[2-choice], operands[1]));
- parts[choice-1] = operands[1];
+ emit_move_insn (parts[choice-1], operands[1]);
emit_insn (gen_ashlsi3 (parts[0], parts[0], GEN_INT (8)));
emit_insn (gen_lshrsi3 (parts[1], parts[1], GEN_INT (8)));
emit_insn (gen_iorsi3 (operands[0], parts[0], parts[1]));