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: avoid unnecessary register saves for setjmp


On Fri, 2003-11-21 at 12:11, Geoff Keating wrote:
> I've looked at this some time in the past (I don't remember the exact
> circumstances).  I came to the same conclusion as you, except in the
> case when NON_SAVING_SETJMP is defined, when we do need to save any
> call-saved registers.

There is code in final_start_function to do this.  However, this can
only work if you aren't using register elimination, and if you are
emitting assembly language prologues instead of using RTL patterns in
the md file.  So this could only work for old ports.

Checking, I see that the only port that uses NON_SAVING_SETJMP is the
x86 svr3 port, and I am fairly certain that is a dead port.  Yes, I see
it on Nathanael Nerode's obsolete list for 3.4.  Actually, it looks like
this is the only target that ever used this macro.

If we really need this to work, then we can move the code from
final_start_function to reload.  This will give code very similar to
what I just deleted, except that it tests NON_SAVING_SETJMP.

Or we can just obsolete all of the NON_SAVING_SETJMP support, as I
believe we don't need it anymore.  It seems very unlikely that we need
gcc to support systems with a broken setjmp() library function.  The
original definition of the macro might even have been based on a
misunderstanding of what setjmp does.

I think dropping the NON_SAVING_SETJMP support is the more sensible
solution.
-- 
Jim Wilson, GNU Tools Support, http://www.SpecifixInc.com


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