This is the mail archive of the gcc-patches@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: [PATCH] MIPS function attributes for interrupt handlers


Richard Sandiford wrote:

> First of all, I really don't want to see the "naked" attribute spread
> to new ports.  I think it's generally considered to have been a mistake
> on the ports that do support it.

FWIW, I tend to agree.  However, what the attribute buys you is that you
don't have to write the assembly prologue/epilogue pseudo-ops like
".globl x; .fnstart; ...", etc.  So, if that's what we really want, then
I think the semantics should be that the body of a naked function
contains *only* asm statements, and that any inputs, outputs, clobbers,
etc. contain only references to entities with static storage duration.

That would allow the compiler to spit out the bits of assembly goo which
vary from OS to OS, including things like setting the function
visibility, without getting into the messy bits where people try to
write C code inside a naked function.

-- 
Mark Mitchell
CodeSourcery
mark@codesourcery.com
(650) 331-3385 x713


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