PATCH: Check MAX_SUPPORTED_STACK_ALIGNMENT
H.J. Lu
hongjiu.lu@intel.com
Thu Jul 31 01:03:00 GMT 2008
With stack alignment merged with trunk, we should check
MAX_SUPPORTED_STACK_ALIGNMENT instead of PREFERRED_STACK_BOUNDARY for
maximum supported stack alignment. I am checking in this as an
obvious fix.
Thanks.
H.J.
---
2008-07-30 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.
--- ../../gcc/gcc/builtins.c 2008-07-30 12:29:42.000000000 -0700
+++ gcc/builtins.c 2008-07-29 15:50:04.000000000 -0700
@@ -4798,11 +4798,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;
--- ../../gcc/gcc/config/i386/i386.c 2008-07-30 12:29:42.000000000 -0700
+++ gcc/config/i386/i386.c 2008-07-30 12:50:31.000000000 -0700
@@ -6585,12 +6585,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
More information about the Gcc-patches
mailing list