This is the mail archive of the gcc@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: A sibcall is also a leaf?!?


>   This logic works fine - except when gcc tells me that this sibcall
> function is a leaf, despite the fact that it calls out to another function
> that probably clobbers the call_used regs.

A leaf function is one that doesn't make any function calls. Technically 
speaking, a sibcall isn't really a function call, it's "returning" to 
somewhere other than the caller. For most purposes it's as if foo4's caller 
made the function call, not foo4.

As you say, the correct solution is to disallow sibcalls on isr routines.

Paul


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