Why gcc align stack to 16-bytes when passing arguments to a function?

Ian Lance Taylor ian@airs.com
Thu Dec 29 05:41:00 GMT 2005


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



More information about the Gcc-help mailing list