This is the mail archive of the gcc-help@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Stack allocation on amd64


On 09/03/2018 12:39, Florian Weimer wrote:

> On 03/09/2018 11:28 AM, Mason wrote:
> 
>> IIUC, it's the callee's responsibility to align the stack.
> 
> On GNU, the caller has to provide 16-byte alignment.  Beyond that, the 
> callee has to do its own thing, but it can (and will) assume 16 byte 
> alignment (i.e., %rsp + 8 is a multiple of 16).

Thanks for clearing that up.

The main question remains: why is gcc allocating e.g. 24 bytes
for an 8-byte array? (N=2) 8 bytes are enough AFAICT.

Regards.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]