This is the mail archive of the
gcc-help@gcc.gnu.org
mailing list for the GCC project.
Re: __declspec(naked) and function body size
- From: Brian Dessent <brian at dessent dot net>
- To: Ilyes Gouta <ilyes dot gouta at gmail dot com>
- Cc: gcc-help at gcc dot gnu dot org
- Date: Sat, 08 Dec 2007 11:46:04 -0800
- Subject: Re: __declspec(naked) and function body size
- References: <475AB169.1000905@gmail.com>
- Reply-to: gcc-help at gcc dot gnu dot org
Ilyes Gouta wrote:
> Is it possible using GCC? If yes, could you please tell me how?
There is __attribute__((naked)) but it's not supported for x86. I think
the feeling is that gcc should be able to detect when a prologue is not
necessary on its own and just not emit it, and that forcably disabling
the prologue just results in horribly broken code if the function
happens to require a spill. See also
<http://gcc.gnu.org/ml/gcc/2004-02/threads.html#00939>.
Brian