From 9bfaf89d4f07272d60824efcbcbdb2d7f1dd4d6e Mon Sep 17 00:00:00 2001 From: Jakub Jelinek Date: Wed, 11 Mar 2009 22:12:33 +0100 Subject: re PR target/39137 (-mpreferred-stack-boundary=2 causes lots of dynamic realign) PR target/39137 * cfgexpand.c (get_decl_align_unit): Use LOCAL_DECL_ALIGNMENT macro. * defaults.h (LOCAL_DECL_ALIGNMENT): Define if not yet defined. * config/i386/i386.h (LOCAL_DECL_ALIGNMENT): Define. * config/i386/i386.c (ix86_local_alignment): For -m32 -mpreferred-stack-boundary=2 use 32-bit alignment for long long variables on the stack to avoid dynamic realignment. Allow the first argument to be a decl rather than type. * doc/tm.texi (LOCAL_DECL_ALIGNMENT): Document. * gcc.target/i386/stackalign/longlong-1.c: New test. * gcc.target/i386/stackalign/longlong-2.c: New test. From-SVN: r144792 --- gcc/cfgexpand.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'gcc/cfgexpand.c') diff --git a/gcc/cfgexpand.c b/gcc/cfgexpand.c index c73bba7..4bfdc5f 100644 --- a/gcc/cfgexpand.c +++ b/gcc/cfgexpand.c @@ -488,8 +488,7 @@ get_decl_align_unit (tree decl) { unsigned int align; - align = DECL_ALIGN (decl); - align = LOCAL_ALIGNMENT (TREE_TYPE (decl), align); + align = LOCAL_DECL_ALIGNMENT (decl); if (align > MAX_SUPPORTED_STACK_ALIGNMENT) align = MAX_SUPPORTED_STACK_ALIGNMENT; -- cgit v1.1