This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug target/39137] [4.4 Regression] -mpreferred-stack-boundary=2 causes lots of dynamic realign
- From: "hjl dot tools at gmail dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 12 Mar 2009 13:30:48 -0000
- Subject: [Bug target/39137] [4.4 Regression] -mpreferred-stack-boundary=2 causes lots of dynamic realign
- References: <bug-39137-87@http.gcc.gnu.org/bugzilla/>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Comment #49 from hjl dot tools at gmail dot com 2009-03-12 13:30 -------
(In reply to comment #48)
> If it ignores -mpreferred-stack-boundary it shouldn't end up setting
> ix86_preferred_stack_boundary to the ignored value.
>
i386/darwin.h has
/* On Darwin, the stack is 128-bit aligned at the point of every call.
Failure to ensure this will lead to a crash in the system libraries
or dynamic loader. */
#undef STACK_BOUNDARY
#define STACK_BOUNDARY 128
#undef MAIN_STACK_BOUNDARY
#define MAIN_STACK_BOUNDARY 128
/* Since we'll never want a stack boundary less aligned than 128 bits
we need the extra work here otherwise bits of gcc get very grumpy
when we ask for lower alignment. We could just reject values less
than 128 bits for Darwin, but it's easier to up the alignment if
it's below the minimum. */
#undef PREFERRED_STACK_BOUNDARY
#define PREFERRED_STACK_BOUNDARY \
MAX (STACK_BOUNDARY, ix86_preferred_stack_boundary)
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39137