diff options
author | Jakub Jelinek <jakub@redhat.com> | 2009-03-11 22:12:33 +0100 |
---|---|---|
committer | Jakub Jelinek <jakub@gcc.gnu.org> | 2009-03-11 22:12:33 +0100 |
commit | 9bfaf89d4f07272d60824efcbcbdb2d7f1dd4d6e (patch) | |
tree | aac00dcd74a4bb14c38abd88b8fbe9ad9b4c2d6b /gcc/defaults.h | |
parent | 8a9ceef2cc5783e9920cb48e8eb68c21c9244a29 (diff) | |
download | gcc-9bfaf89d4f07272d60824efcbcbdb2d7f1dd4d6e.tar.gz |
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
Diffstat (limited to 'gcc/defaults.h')
-rw-r--r-- | gcc/defaults.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/gcc/defaults.h b/gcc/defaults.h index fbb13accc08..217c0d94a56 100644 --- a/gcc/defaults.h +++ b/gcc/defaults.h @@ -944,6 +944,11 @@ along with GCC; see the file COPYING3. If not see ((TYPE) ? LOCAL_ALIGNMENT ((TYPE), (ALIGN)) : (ALIGN)) #endif +#ifndef LOCAL_DECL_ALIGNMENT +#define LOCAL_DECL_ALIGNMENT(DECL) \ + LOCAL_ALIGNMENT (TREE_TYPE (DECL), DECL_ALIGN (DECL)) +#endif + /* Alignment value for attribute ((aligned)). */ #ifndef ATTRIBUTE_ALIGNED_VALUE #define ATTRIBUTE_ALIGNED_VALUE BIGGEST_ALIGNMENT |