This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: Why gcc align stack to 16-bytes when passing arguments to a function?
- From: Ian Lance Taylor <ian at airs dot com>
- To: cheng long <kevinclcn at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: 28 Dec 2005 21:41:34 -0800
- Subject: Re: Why gcc align stack to 16-bytes when passing arguments to a function?
- References: <786736460512282137yd146899v@mail.gmail.com>
cheng long <kevinclcn@gmail.com> writes:
> The colored lines show that gcc has aligned the stack to 16-bytes. Why is that?
See the documentation of the -mpreferred-stack-boundary option. The
preferred stack boundary is enforced by aligning the stack in 'main',
and keeping it aligned thereafter.
Ian