Generate Function without Prologue and Epilogue

Ian Lance Taylor iant@google.com
Wed Sep 5 17:36:00 GMT 2012


On Wed, Sep 5, 2012 at 9:36 AM, David Brown <david.brown@hesbynett.no> wrote:
> On 05/09/12 07:37, Ian Lance Taylor wrote:
>>
>> On Tue, Sep 4, 2012 at 10:35 PM, Xin Tong<xerox.time.tech@gmail.com>
>> wrote:
>>>
>>> any reason why naked functions are not support for x86 ?
>>
>>
>> No special reason, no.
>>
>> Ian
>>
>
> Is this something that could easily be moved from target-specific attributes
> into more general gcc support?  I'm sure the maintainers of ports like the
> avr that have a "naked" attribute would be happier if it were a general
> feature rather than specific to their port, and I'm sure that other embedded
> targets would appreciate it.
>
> However, I have no clue as to whether this is a simple matter of moving code
> from a target-specific file to a generic file, or if it needs a lot more
> work.

The way GCC is structured, it requires some support from every
backend.  A bit of machinery could be moved into target-independent
code, but most of the work is backend-specific.  It's not hard,
though.

In general I would support providing this attribute in every backend,
but somebody needs to do the work.

Ian



More information about the Gcc-help mailing list