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: [Bug target/10412] Renesas SH - Incorrect code generation


Hi,

With DJ's patch for Renesas ABI support,
http://gcc.gnu.org/ml/gcc-patches/2003-09/msg00184.html

+ 	(calc_live_regs): Save MACL and MACH if the function has the
+ 	renesas attribute.

MACL and MACH are saved in prologue if -mhitachi option is specified. 

So we no longer need to have

  /* Renesas saves and restores mac registers on call.  */              \
  if (TARGET_HITACHI && ! TARGET_NOMACSAVE)                             \
    {                                                                   \
      call_used_regs[MACH_REG] = 0;                                     \
      call_used_regs[MACL_REG] = 0;                                     \
    }  

in CONDITIONAL_REGISTER_USAGE  which is causing this bug.

Changelog - 

2004-02-09  Dhananjay Deshpande  <dhananjayd@kpitcummins.com>

        PR target/14041
        * config/sh/sh.h (CONDITIONAL_REGISTER_USAGE): Do not change call_used_regs for
	    MACH and MACL if TARGET_HITACHI.

--- gcc/config/sh/sh.h.old	Mon Feb  9 21:59:02 2004
+++ gcc/config/sh/sh.h	Mon Feb  9 22:02:01 2004
@@ -102,12 +102,6 @@ do { \
     }									\
   if (flag_pic)								\
     fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;				\
-  /* Renesas saves and restores mac registers on call.  */		\
-  if (TARGET_HITACHI && ! TARGET_NOMACSAVE)				\
-    {									\
-      call_used_regs[MACH_REG] = 0;					\
-      call_used_regs[MACL_REG] = 0;					\
-    }									\
   for (regno = FIRST_FP_REG + (TARGET_LITTLE_ENDIAN != 0);		\
        regno <= LAST_FP_REG; regno += 2)				\
     SET_HARD_REG_BIT (reg_class_contents[DF_HI_REGS], regno);		\


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