This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug target/10413] [3.3 Regression] SH ICE 3.3 branch


PLEASE REPLY TO gcc-bugzilla@gcc.gnu.org ONLY, *NOT* gcc-bugs@gcc.gnu.org.

http://gcc.gnu.org/bugzilla/show_bug.cgi?id=10413



------- Additional Comments From dhananjayd at kpitcummins dot com  2003-06-25 09:52 -------
Subject: RE:  [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))

===========================================================================


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]