From 90c700cd2b0c0b4124a678c8c20b79db6f397361 Mon Sep 17 00:00:00 2001 From: "H.J. Lu" Date: Wed, 30 Jul 2008 20:19:53 +0000 Subject: [PATCH] builtins.c (std_gimplify_va_arg_expr): Replace PREFERRED_STACK_BOUNDARY with MAX_SUPPORTED_STACK_ALIGNMENT. 2008-07-30 H.J. Lu * 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. From-SVN: r138340 --- gcc/ChangeLog | 6 ++++++ gcc/builtins.c | 8 ++++---- gcc/config/i386/i386.c | 8 ++++---- 3 files changed, 14 insertions(+), 8 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index bc455ab423fc..d7094e2a9e47 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2008-07-30 H.J. Lu + + * 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-30 Joey Ye H.J. Lu diff --git a/gcc/builtins.c b/gcc/builtins.c index 9a9c6a33b514..ca551915c50a 100644 --- a/gcc/builtins.c +++ b/gcc/builtins.c @@ -4798,11 +4798,11 @@ std_gimplify_va_arg_expr (tree valist, tree type, gimple_seq *pre_p, 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; diff --git a/gcc/config/i386/i386.c b/gcc/config/i386/i386.c index c9cbe69b262b..46505cc48048 100644 --- a/gcc/config/i386/i386.c +++ b/gcc/config/i386/i386.c @@ -6585,12 +6585,12 @@ ix86_gimplify_va_arg (tree valist, tree type, gimple_seq *pre_p, /* ... 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 -- 2.47.2