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: Illegal insn due to system register


"Rakesh Kumar - Software, Noida" wrote:
> I am not so familiar with reload internals.
> What exactly should be happening here?

On closer inspection, the actual problem turned
out to be a too low REGISTER_MOVE_COST.

I've attached the patch I'v just checked in to fix this.

> Also I am curious to know what is the advantage of
> allowing SImode for floating point registers (in the patch)?

When you handle vector moves, you have to decompose them at
some point into individual register loads / stores.
The generic code uses integer modes for this purpose; if
we don't allow these modes in flaoting point registers,
that means FP vectors would be moved through general purpuse
registers for loads, stores and copies.
	
-- 
--------------------------
SuperH (UK) Ltd.
2410 Aztec West / Almondsbury / BRISTOL / BS32 4QX
T:+44 1454 465658
2003-05-20  J"orn Rennecke <joern.rennecke@superh.com>

	* sh.c (sh_register_move_cost): Add clase for moving between
	FP registers and MAC registers.

Index: config/sh/sh.c
===================================================================
RCS file: /cvsroot/gcc/gcc/gcc/config/sh/sh.c,v
retrieving revision 1.212
diff -p -r1.212 sh.c
*** config/sh/sh.c	14 May 2003 07:29:52 -0000	1.212
--- config/sh/sh.c	20 May 2003 15:45:46 -0000
*************** sh_register_move_cost (mode, srcclass, d
*** 8243,8248 ****
--- 8243,8252 ----
        && REGCLASS_HAS_FP_REG (dstclass))
      return 4;
  
+   if ((REGCLASS_HAS_FP_REG (dstclass) && srcclass == MAC_REGS)
+       || (dstclass== MAC_REGS && REGCLASS_HAS_FP_REG (srcclass)))
+     return 9;
+ 
    if ((REGCLASS_HAS_FP_REG (dstclass)
         && REGCLASS_HAS_GENERAL_REG (srcclass))
        || (REGCLASS_HAS_GENERAL_REG (dstclass)

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