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] hookize FUNCTION_ARG_BOUNDARY


On Tue, Nov 16, 2010 at 07:43:01AM -0800, Richard Henderson wrote:
> On 11/15/2010 07:42 PM, Nathan Froyd wrote:
> > +/* If defined, a C expression that gives the alignment boundary, in bits,
> > +   of an argument with the specified mode and type.  If it is not defined, 
> > +   PARM_BOUNDARY is used for all arguments.  */
> > +#define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \
> > +/* Worker function for TARGET_FUNCTION_ARG_BOUNDARY.  */
> 
> Paste-o with that #define, surely.
> 
> > +static unsigned int
> > +pa_function_arg_boundary (enum machine_mode mode, const_tree type)
> > +{
> > +  tree size = TYPE_SIZE (type);
> > +  bool singleword = (type
> > +		     ? (integer_zerop (size)
> > +			|| !TREE_CONSTANT (size)
> > +			|| int_size_in_bytes (type) <= UNITS_PER_WORD)
> > +		     : GET_MODE_SIZE (mode));
> 
> Missing a comparison vs U_P_W here.
> 
> > -    : GET_MODE_SIZE(MODE) <= UNITS_PER_WORD)				\
> 
> ... from here.

Doh, thank you for looking those over.  Fixed like so, committed as
obvious.

-Nathan

	* config/arc/arc.c: Delete pasto.
	* config/pa/pa.c (pa_function_arg_boundary): Add missing comparison.

Index: config/arc/arc.c
===================================================================
--- config/arc/arc.c	(revision 166803)
+++ config/arc/arc.c	(working copy)
@@ -2426,10 +2426,6 @@ arc_function_arg_advance (CUMULATIVE_ARG
 	  + ROUND_ADVANCE_ARG (mode, type));
 }
 
-/* If defined, a C expression that gives the alignment boundary, in bits,
-   of an argument with the specified mode and type.  If it is not defined, 
-   PARM_BOUNDARY is used for all arguments.  */
-#define FUNCTION_ARG_BOUNDARY(MODE, TYPE) \
 /* Worker function for TARGET_FUNCTION_ARG_BOUNDARY.  */
 
 static unsigned int
Index: config/pa/pa.c
===================================================================
--- config/pa/pa.c	(revision 166803)
+++ config/pa/pa.c	(working copy)
@@ -9613,7 +9613,7 @@ pa_function_arg_boundary (enum machine_m
 		     ? (integer_zerop (size)
 			|| !TREE_CONSTANT (size)
 			|| int_size_in_bytes (type) <= UNITS_PER_WORD)
-		     : GET_MODE_SIZE (mode));
+		     : GET_MODE_SIZE (mode) <= UNITS_PER_WORD);
 
   return singleword ? PARM_BOUNDARY : MAX_PARM_BOUNDARY;
 }


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