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]

[stack] Check MAX_SUPPORTED_STACK_ALIGNMENT


I checked in this patch to replace PREFERRED_STACK_BOUNDARY with
MAX_SUPPORTED_STACK_ALIGNMENT.


H.J.
----
Index: builtins.c
===================================================================
--- builtins.c	(revision 137997)
+++ builtins.c	(working copy)
@@ -4791,11 +4791,11 @@ std_gimplify_va_arg_expr (tree valist, t
   boundary = FUNCTION_ARG_BOUNDARY (TYPE_MODE (type), type);
 
   /* When we align parameter on stack for caller, if the parameter
-     alignment is beyond PREFERRED_STACK_BOUNDARY, it will be
-     aligned at PREFERRED_STACK_BOUNDARY.  We will match callee
+     alignment is beyond MAX_SUPPORTED_STACK_ALIGNMENT, it will be
+     aligned at MAX_SUPPORTED_STACK_ALIGNMENT.  We will match callee
      here with caller.  */
-  if (boundary > PREFERRED_STACK_BOUNDARY)
-    boundary = PREFERRED_STACK_BOUNDARY;
+  if (boundary > MAX_SUPPORTED_STACK_ALIGNMENT)
+    boundary = MAX_SUPPORTED_STACK_ALIGNMENT;
 
   boundary /= BITS_PER_UNIT;
 
Index: ChangeLog.stackalign
===================================================================
--- ChangeLog.stackalign	(revision 138003)
+++ ChangeLog.stackalign	(working copy)
@@ -1,5 +1,11 @@
 2008-07-19  H.J. Lu  <hongjiu.lu@intel.com>
 
+	* builtins.c (std_gimplify_va_arg_expr): Replace
+	PREFERRED_STACK_BOUNDARY with MAX_SUPPORTED_STACK_ALIGNMENT.
+	* config/i386/i386.c (ix86_gimplify_va_arg): Likewise.
+
+2008-07-19  H.J. Lu  <hongjiu.lu@intel.com>
+
 	* function.c (assign_stack_local_1): Use ">" instead of ">="
 	to check MAX_SUPPORTED_STACK_ALIGNMENT.
 	(locate_and_pad_parm): Likewise.
Index: config/i386/i386.c
===================================================================
--- config/i386/i386.c	(revision 137997)
+++ config/i386/i386.c	(working copy)
@@ -5723,12 +5723,12 @@ ix86_gimplify_va_arg (tree valist, tree 
   /* ... otherwise out of the overflow area.  */
 
   /* When we align parameter on stack for caller, if the parameter
-     alignment is beyond PREFERRED_STACK_BOUNDARY, it will be
-     aligned at PREFERRED_STACK_BOUNDARY.  We will match callee
+     alignment is beyond MAX_SUPPORTED_STACK_ALIGNMENT, it will be
+     aligned at MAX_SUPPORTED_STACK_ALIGNMENT.  We will match callee
      here with caller.  */
   arg_boundary = FUNCTION_ARG_BOUNDARY (VOIDmode, type);
-  if ((unsigned int) arg_boundary > PREFERRED_STACK_BOUNDARY)
-     arg_boundary = PREFERRED_STACK_BOUNDARY;
+  if ((unsigned int) arg_boundary > MAX_SUPPORTED_STACK_ALIGNMENT)
+     arg_boundary = MAX_SUPPORTED_STACK_ALIGNMENT;
 
   /* Care for on-stack alignment if needed.  */
   if (arg_boundary <= 64


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