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]

[PATCH] ICE on m32r-linux-gcc-4.0.0


Hi,

This patch fixes ICE on m32r-linux-gcc-4.0.0.

Please commit it.

2004-10-07  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com

	* config/m32r/m32r.h (CONDITIONAL_REGISTER_USAGE): Don't exclude
	fixed registers form all_used_regs. Update 	
	call_really_used_regs.
	(CALL_REALLY_USED_REGISTERS): Define.
	* config/m32r/m32r.c (MUST_SAVE_REGISTER): Replace 	
	call_used_regs with call_really_used_regs.

Regards,

Kazuhiro Inaoka

Index: m32r.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m32r/m32r.c,v
retrieving revision 1.106
diff -u -p -r1.106 m32r.c
--- m32r.c	26 Aug 2004 13:03:02 -0000	1.106
+++ m32r.c	1 Oct 2004 04:23:05 -0000
@@ -1592,7 +1592,7 @@ static struct m32r_frame_info zero_frame
    Don't consider them here.  */
 #define MUST_SAVE_REGISTER(regno, interrupt_p) \
 ((regno) != RETURN_ADDR_REGNUM && (regno) != FRAME_POINTER_REGNUM \
- && (regs_ever_live[regno] && (!call_used_regs[regno] || interrupt_p)))
+ && (regs_ever_live[regno] && (!call_really_used_regs[regno] || interrupt_p)))
 
 #define MUST_SAVE_FRAME_POINTER (regs_ever_live[FRAME_POINTER_REGNUM])
 #define MUST_SAVE_RETURN_ADDR   (regs_ever_live[RETURN_ADDR_REGNUM] || current_function_profile)
Index: m32r.h
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m32r/m32r.h,v
retrieving revision 1.117
diff -u -p -r1.117 m32r.h
--- m32r.h	24 Aug 2004 08:07:31 -0000	1.117
+++ m32r.h	1 Oct 2004 04:23:05 -0000
@@ -633,6 +633,8 @@ extern enum m32r_sdata m32r_sdata;
   SUBTARGET_CALL_USED_REGISTERS	\
 }
 
+#define CALL_REALLY_USED_REGISTERS CALL_USED_REGISTERS
+
 /* Zero or more C statements that may conditionally modify two variables
    `fixed_regs' and `call_used_regs' (both of type `char []') after they
    have been initialized from the two preceding macros.
@@ -649,7 +651,10 @@ extern enum m32r_sdata m32r_sdata;
   do							 \
     {							 \
       if (flag_pic)					 \
+        {						 \
           fixed_regs[PIC_OFFSET_TABLE_REGNUM] = 1;	 \
+          call_used_regs[PIC_OFFSET_TABLE_REGNUM] = 1;	 \
+        }						 \
     }							 \
   while (0)
 #endif

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