This is the mail archive of the gcc-patches@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]

Re: RFA: reload infrastructure to fix PR target/21623


> Thanks for your explanation.  It clarifies all of what I wanted
> to learn.  I'll fix the cost patch and spin the usual tests.

The appended is the revised patch.  It's tested with bootstrap
and the toplevel "make -k check" with no new failures on
sh4-unknown-linux-gnu.  It's also regtested on x86-linux cross
sh-elf with "make check RUNTESTFLAGS=--target_board=sh-sim/-m2e".
I've taken the PR number line away from the ChangeLog entry to
avoid confusing the bugzilla.  OK for mainline and 4.0?

Regards,
	kaz
--
:ADDPATCH target:
2005-09-30  Kaz Kojima  <kkojima@gcc.gnu.org>

	* config/sh/sh.c (sh_register_move_cost): Add case for moving
	from T_REGS to FP register class.

diff -up ORIG/gcc/gcc/config/sh/sh.c TMP/gcc/gcc/config/sh/sh.c
--- ORIG/gcc/gcc/config/sh/sh.c	2005-09-07 06:16:56.000000000 +0900
+++ TMP/gcc/gcc/config/sh/sh.c	2005-09-30 07:06:35.000000000 +0900
@@ -9491,6 +9491,9 @@ sh_register_move_cost (enum machine_mode
       && REGCLASS_HAS_FP_REG (dstclass))
     return 4;
 
+  if (REGCLASS_HAS_FP_REG (dstclass) && srcclass == T_REGS)
+    return ((TARGET_HARD_SH4 && !optimize_size) ? 10 : 7);
+
   if ((REGCLASS_HAS_FP_REG (dstclass) && srcclass == MAC_REGS)
       || (dstclass == MAC_REGS && REGCLASS_HAS_FP_REG (srcclass)))
     return 9;


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