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: [PATCH] Fix for FAIL gcc.c-torture/compile/20050622-1.c


Hi Nick,

I'm sorry.
I sent a miss patch.

This is a patch for the following problem.

Regards,

Kazuhiro Inaoka

Kazuhiro Inaoka wrote:
> Hi Nick,
> 
> This is a patch to fix the following FAIL.
> Please commit it.
> 
> Executing on host: /home4/src/gcc/build.elf-4.1/gcc/xgcc
> -B/home4/src/gcc/build.elf-4.1/gcc/   -O0  -w -fno-show-column -c  -o
> 20050622-1.o /home4/src/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20050622-1.c
>    (timeout = 300)
> spawn /home5/src/gcc/build.elf-4.1/gcc/xgcc -B/home4/src/gcc/build.elf-4.1/gcc/
> -O0 -w -fno-show-column -c -o 20050622-1.o
> /home4/src/gcc/gcc/gcc/testsuite/gcc.c-torture/compile/20050622-1.c
> /tmp/ccBcoMHF.s: Assembler messages:
> /tmp/ccBcoMHF.s:26: Error: bad instruction `ld24 r4,#75497472'
> compiler exited with status 1
> output is:
> /tmp/ccBcoMHF.s: Assembler messages:
> /tmp/ccBcoMHF.s:27: Error: bad instruction `ld24 r4,#75497472'
> 
> FAIL: gcc.c-torture/compile/20050622-1.c (test for excess errors)
> Excess errors:
> /tmp/ccBcoMHF.s:26: Error: bad instruction `ld24 r4,#75497472'
> 
> gcc/ChangeLog
> 
> 2005-07-08  Kazuhiro Inaoka <inaoka.kazuhiro@renesas.com>
> 
> 	* config/m32r/m32r.c (m32r_output_function_epilogue): Care for
> 	a large stack frame at epilogue.
> 
> Regards,
> 
> Kazuhiro Inaoka
> 
> 
> ------------------------------------------------------------------------
> 
> --- m32r.c.orig	2005-07-08 12:47:12.000000000 +0900
> +++ m32r.c.new	2005-07-08 12:48:44.000000000 +0900
> @@ -1532,11 +1532,20 @@
>  	  else if (reg_offset < 32768)
>  	    fprintf (file, "\tadd3 %s,%s,%s%d\n",
>  		     sp_str, sp_str, IMMEDIATE_PREFIX, reg_offset);
> -	  else
> +	  else if (reg_offset < (1 << 24))
>  	    fprintf (file, "\tld24 %s,%s%d\n\tadd %s,%s\n",
>  		     reg_names[PROLOGUE_TMP_REGNUM],
>  		     IMMEDIATE_PREFIX, reg_offset,
>  		     sp_str, reg_names[PROLOGUE_TMP_REGNUM]);
> +	  else
> +	    fprintf (file, "\tseth %s,high(%s%d)\n\tor3 %s,%s,low(%s%d)\n" \
> +			   "\tadd %s,%s\n",
> +		     reg_names[PROLOGUE_TMP_REGNUM],
> +		     IMMEDIATE_PREFIX, reg_offset,
> +		     reg_names[PROLOGUE_TMP_REGNUM],
> +		     reg_names[PROLOGUE_TMP_REGNUM],
> +		     IMMEDIATE_PREFIX, reg_offset,
> +		     sp_str, reg_names[PROLOGUE_TMP_REGNUM]);
>  	}
>        else if (frame_pointer_needed)
>  	{
> @@ -1547,11 +1556,20 @@
>  	  else if (reg_offset < 32768)
>  	    fprintf (file, "\tadd3 %s,%s,%s%d\n",
>  		     sp_str, fp_str, IMMEDIATE_PREFIX, reg_offset);
> -	  else
> +	  else if (reg_offset < (1 << 24))
>  	    fprintf (file, "\tld24 %s,%s%d\n\tadd %s,%s\n",
>  		     reg_names[PROLOGUE_TMP_REGNUM],
>  		     IMMEDIATE_PREFIX, reg_offset,
>  		     sp_str, reg_names[PROLOGUE_TMP_REGNUM]);
> +	  else
> +	    fprintf (file, "\tseth %s,high(%s%d)\n\tor3 %s,%s,low(%s%d)\n" \
> +			   "\tadd %s,%s\n",
> +		     reg_names[PROLOGUE_TMP_REGNUM],
> +		     IMMEDIATE_PREFIX, reg_offset,
> +		     reg_names[PROLOGUE_TMP_REGNUM],
> +		     reg_names[PROLOGUE_TMP_REGNUM],
> +		     IMMEDIATE_PREFIX, reg_offset,
> +		     sp_str, reg_names[PROLOGUE_TMP_REGNUM]);
>  	}
>        else
>  	gcc_unreachable ();
Index: m32r.c
===================================================================
RCS file: /cvs/gcc/gcc/gcc/config/m32r/m32r.c,v
retrieving revision 1.119
diff -u -r1.119 m32r.c
--- m32r.c	5 Jul 2005 14:16:05 -0000	1.119
+++ m32r.c	8 Jul 2005 05:57:16 -0000
@@ -1532,11 +1532,19 @@
 	  else if (reg_offset < 32768)
 	    fprintf (file, "\tadd3 %s,%s,%s%d\n",
 		     sp_str, sp_str, IMMEDIATE_PREFIX, reg_offset);
-	  else
+	  else if (reg_offset < (1 << 24))
 	    fprintf (file, "\tld24 %s,%s%d\n\tadd %s,%s\n",
 		     reg_names[PROLOGUE_TMP_REGNUM],
 		     IMMEDIATE_PREFIX, reg_offset,
 		     sp_str, reg_names[PROLOGUE_TMP_REGNUM]);
+	  else
+	    fprintf (file, "\tseth %s,%s%d\n\tor3 %s,%s,%s%d\n\tadd %s,%s\n",
+		     reg_names[PROLOGUE_TMP_REGNUM],
+		     IMMEDIATE_PREFIX, reg_offset >> 16,
+		     reg_names[PROLOGUE_TMP_REGNUM],
+		     reg_names[PROLOGUE_TMP_REGNUM],
+		     IMMEDIATE_PREFIX, reg_offset & 0xffff,
+		     sp_str, reg_names[PROLOGUE_TMP_REGNUM]);
 	}
       else if (frame_pointer_needed)
 	{
@@ -1547,11 +1555,19 @@
 	  else if (reg_offset < 32768)
 	    fprintf (file, "\tadd3 %s,%s,%s%d\n",
 		     sp_str, fp_str, IMMEDIATE_PREFIX, reg_offset);
-	  else
+	  else if (reg_offset < (1 << 24))
 	    fprintf (file, "\tld24 %s,%s%d\n\tadd %s,%s\n",
 		     reg_names[PROLOGUE_TMP_REGNUM],
 		     IMMEDIATE_PREFIX, reg_offset,
 		     sp_str, reg_names[PROLOGUE_TMP_REGNUM]);
+	  else
+	    fprintf (file, "\tseth %s,%s%d\n\tor3 %s,%s,%s%d\n\tadd %s,%s\n",
+		     reg_names[PROLOGUE_TMP_REGNUM],
+		     IMMEDIATE_PREFIX, reg_offset >> 16,
+		     reg_names[PROLOGUE_TMP_REGNUM],
+		     reg_names[PROLOGUE_TMP_REGNUM],
+		     IMMEDIATE_PREFIX, reg_offset & 0xffff,
+		     sp_str, reg_names[PROLOGUE_TMP_REGNUM]);
 	}
       else
 	gcc_unreachable ();

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