This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: Suggestion for function attributes on x86 architecture
- From: Richard Earnshaw <rearnsha at arm dot com>
- To: dewar at gnat dot com (Robert Dewar)
- Cc: Richard dot Earnshaw at arm dot com, bkausbk at web dot de, gcc at gcc dot gnu dot org, rth at redhat dot com
- Date: Wed, 17 Apr 2002 18:30:29 +0100
- Subject: Re: Suggestion for function attributes on x86 architecture
- Organization: ARM Ltd.
- Reply-to: Richard dot Earnshaw at arm dot com
> I would assume that it never made sense to use __naked unless you used
> assembler insertions to do specialized epilogs or prologs
Doesn't help much. Consider a function that needs registers saving (maybe
it calls another function). If you make that work, consider a function
that needs some stack allocating. How much do you allocate? If you leave
out the prologue and epilogue code you open up such a can of worms that
about the only thing you should allow inside the body of a function is an
asm statement that takes no arguments and sets no values.
R.