Patchwork hookize FUNCTION_ARG_BOUNDARY

login
register
mail settings
Submitter Nathan Froyd
Date Nov. 17, 2010, 3:18 a.m.
Message ID <20101117031828.GU24469@nightcrawler>
Download mbox | patch
Permalink /patch/71507/
State New
Headers show

Comments

Nathan Froyd - Nov. 17, 2010, 3:18 a.m.
On Tue, Nov 16, 2010 at 09:39:25PM -0500, Joern Rennecke wrote:
> You patch broke picochip and xtensa.

Doh.  Here's a patch.  Tested with cross compilers.

-Nathan

	* config/xtensa/xtensa.c (function_arg_boundary): Really rename to...
	(xtensa_function_arg_boundary): ...this.
	* config/picochip/pichochip.c (picochip_function_arg_boundary): Fix
	thinko in declaration.
	(picochip_function_arg, picochip_arg_partial_bytes): Pass proper
	number of parameters to picochip_function_arg_boundary.
	(picochip_arg_advance): Likewise.
Mark Mitchell - Nov. 18, 2010, 8:27 a.m.
On 11/16/2010 7:18 PM, Nathan Froyd wrote:

> 	* config/xtensa/xtensa.c (function_arg_boundary): Really rename to...
> 	(xtensa_function_arg_boundary): ...this.
> 	* config/picochip/pichochip.c (picochip_function_arg_boundary): Fix
> 	thinko in declaration.
> 	(picochip_function_arg, picochip_arg_partial_bytes): Pass proper
> 	number of parameters to picochip_function_arg_boundary.
> 	(picochip_arg_advance): Likewise.

If not already applied, this is OK.

Thank you,

Patch

Index: config/xtensa/xtensa.c
===================================================================
--- config/xtensa/xtensa.c	(revision 166848)
+++ config/xtensa/xtensa.c	(working copy)
@@ -2098,7 +2098,7 @@  xtensa_function_incoming_arg (CUMULATIVE
 }
 
 static unsigned int
-function_arg_boundary (enum machine_mode mode, const_tree type)
+xtensa_function_arg_boundary (enum machine_mode mode, const_tree type)
 {
   unsigned int alignment;
 
Index: config/picochip/picochip.c
===================================================================
--- config/picochip/picochip.c	(revision 166848)
+++ config/picochip/picochip.c	(working copy)
@@ -89,8 +89,8 @@  rtx picochip_incoming_function_arg (CUMU
 				    const_tree type, bool named);
 void picochip_arg_advance (CUMULATIVE_ARGS * p_cum, enum machine_mode mode,
 			   const_tree type, bool named);
-unsigned int picochip_function_boundary (enum machine_mode mode,
-					 const_tree type);
+unsigned int picochip_function_arg_boundary (enum machine_mode mode,
+					     const_tree type);
 
 int picochip_sched_lookahead (void);
 int picochip_sched_issue_rate (void);
@@ -856,7 +856,7 @@  picochip_function_arg (CUMULATIVE_ARGS *
 
   /* Compute the alignment and size of the parameter. */
   type_align_in_units =
-    picochip_function_arg_boundary (mode) / BITS_PER_UNIT;
+    picochip_function_arg_boundary (mode, type) / BITS_PER_UNIT;
   type_size_in_units = picochip_compute_arg_size (type, mode);
 
   /* Compute the correct offset (i.e., ensure that the offset meets
@@ -989,7 +989,7 @@  picochip_arg_partial_bytes (CUMULATIVE_A
 
   /* Compute the alignment and size of the parameter. */
   type_align_in_units =
-    picochip_function_arg_boundary (mode) / BITS_PER_UNIT;
+    picochip_function_arg_boundary (mode, type) / BITS_PER_UNIT;
   type_size_in_units = picochip_compute_arg_size (type, mode);
 
   /* Compute the correct offset (i.e., ensure that the offset meets
@@ -1043,7 +1043,7 @@  picochip_arg_advance (CUMULATIVE_ARGS *c
 
   /* Compute the alignment and size of the parameter. */
   type_align_in_units =
-    picochip_function_arg_boundary (mode) / BITS_PER_UNIT;
+    picochip_function_arg_boundary (mode, type) / BITS_PER_UNIT;
   type_size_in_units = picochip_compute_arg_size (type, mode);
 
   /* Compute the correct offset (i.e., ensure that the offset meets