This is the mail archive of the
gcc-patches@gcc.gnu.org
mailing list for the GCC project.
RE: [Bug target/10413] [3.3 Regression] SH ICE 3.3 branch
- From: "Dhananjay R. Deshpande" <dhananjayd at KPITCummins dot com>
- To: <gcc-bugzilla at gcc dot gnu dot org>
- Cc: <gcc-patches at gcc dot gnu dot org>
- Date: Wed, 25 Jun 2003 14:23:05 +0530
- Subject: RE: [Bug target/10413] [3.3 Regression] SH ICE 3.3 branch
Hi,
As there is no instruction to move register macl to mach, it should use temporary register.
For this, register_move_cost needs to be defined higher than 2.
The patch below fixes the problem on 3.3 branch. Although the problem doesn't appear on mainline (Better register allocation?), I believe it should be safe to apply the patch to mainline too.
Regards,
Dhananjay
Changelog -
2003-06-25 Dhananjay Deshpande <dhananjayd@kpitcummins.com>
* config/sh/sh.c (sh_register_move_cost): Add case for moving between MAC_REGS
===========================================================================
--- /home/kpit/fsfsrc/gcc-20030324/gcc/config/sh/sh.c Wed Mar 26 16:37:02 2003
+++ gcc0302/gcc/config/sh/sh.c Mon Jun 16 10:55:28 2003
@@ -7845,6 +7845,9 @@ sh_register_move_cost (mode, srcclass, d
if (dstclass == T_REGS || dstclass == PR_REGS)
return 10;
+ if (dstclass == MAC_REGS && srcclass == MAC_REGS)
+ return 4;
+
if (mode == SImode && ! TARGET_SHMEDIA && TARGET_FMOVD
&& REGCLASS_HAS_FP_REG (srcclass)
&& REGCLASS_HAS_FP_REG (dstclass))
===========================================================================