This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: gcc return struct code generation
- From: Ian Lance Taylor <iant at google dot com>
- To: jose gomez valcarcel <jcgv33 at yahoo dot es>
- Cc: "gcc-help\ at gcc dot gnu dot org" <gcc-help at gcc dot gnu dot org>, "jcgv\ at elgron dot org" <jcgv at elgron dot org>
- Date: Mon, 29 Aug 2011 14:29:33 -0700
- Subject: Re: gcc return struct code generation
- References: <1314618077.16009.YahooMailNeo@web29017.mail.ird.yahoo.com>
jose gomez valcarcel <jcgv33@yahoo.es> writes:
> I just read x86_64 ABI code generation, and the result is ok. The
> struct is returned in registers RAX, RDX. The only disappointing thing
> is the allocation of 40 stack bytes, whic apparently is not used. This
> effect cause my kernel code not to mix well with hand-assembler code.
That is a good question. I think it is a bug. Although I'm curious as
to why allocating extra unused stack space is a problem for your kernel
code. Some stack space will always be used, because the x86_64 ABI
requires the stack to be aligned on a 16-byte boundary before executing
a call instruction.
Ian