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]

Re: making naked attr generally available


> Bad news: the return statement (ie ret on i386) still gets output.  I
> still have to find the code that generates that.

The rtl emitting code might do it, or jump.c (look for gen_return).
I think the easiest way to fix this is just to change the predicate
of the "return" instruction in the *.md file to always return false
while a naked function is compiled.

That will force rtl generation to generate jumps to the end of the function
instead of returns, and inhibit any optimizations that generate returns.


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