public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Libgcc symbols
@ 2001-04-13 21:11 Mark Mitchell
  2001-04-14  8:02 ` law
                   ` (2 more replies)
  0 siblings, 3 replies; 28+ messages in thread
From: Mark Mitchell @ 2001-04-13 21:11 UTC (permalink / raw)
  To: gcc

Joseph Meyers points out in PR2003 that:

  libgcc-std.ver includes:

   # ??? Some of these are for `-a', which ought to die.
   __bb
   __bb_exit_func
   __bb_fork_func
   __bb_init_func
   __bb_init_trace_func
   __bb_trace_func
   __bb_trace_ret

   # ??? Symbols that perhaps unused should be nuked.
   __builtin_saveregs
   __clear_cache
   __dummy
   __empty
   __eprintf
   __gcc_bcmp

   If these symbols appear in a released shared libgcc, we need to
   support them as part of the libgcc ABI for ever. Thus, we must
   resolve, before GCC 3.0 is released, whether each of these symbols
   should be part of the libgcc ABI or not.

He's right that we should decide about this.

I don't know enough to do so.  Therefore, without further action from
someone else, nothing will happen, and these symbols *will* be in the
libgcc ABI.

I'm going to downgrade the PR to `medium' priority, so it will go off
my radar screen.  If anyone else cares to take more intelligent action
here, please do so.

Thanks,

--
Mark Mitchell                   mark@codesourcery.com
CodeSourcery, LLC               http://www.codesourcery.com

^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: Libgcc symbols
@ 2001-04-16  9:35 Richard Kenner
  2001-04-16 12:22 ` Alexandre Oliva
  0 siblings, 1 reply; 28+ messages in thread
From: Richard Kenner @ 2001-04-16  9:35 UTC (permalink / raw)
  To: pedwards; +Cc: gcc

    > #ifdef L__dummy
    > void
    > __dummy (void) {}
    > #endif
    > 
    > Referenced nowhere, but I'd like to know why it was added in the first
    > place before killing it.

It was used in builtin setjmp support to get GP properly restored on machines
where it was needed.  I don't see it in the current sources, so I'm curious how
this was done instead.

^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: Libgcc symbols
@ 2001-04-16 12:25 Richard Kenner
  2001-04-16 12:48 ` Alexandre Oliva
  2001-04-17 11:29 ` Richard Henderson
  0 siblings, 2 replies; 28+ messages in thread
From: Richard Kenner @ 2001-04-16 12:25 UTC (permalink / raw)
  To: aoliva; +Cc: gcc

    > It was used in builtin setjmp support to get GP properly restored on
    > machines where it was needed.  I don't see it in the current
    > sources, so I'm curious how this was done instead.

    builtin_setjmp_receiver

Yes, I know that's where this sort of thing is supposed to be done, but
as far as I know, there's no way in the MIPS assembler (for O32 calling
convention) to actually *do* the GP restore.

^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: Libgcc symbols
@ 2001-04-16 12:49 Richard Kenner
  0 siblings, 0 replies; 28+ messages in thread
From: Richard Kenner @ 2001-04-16 12:49 UTC (permalink / raw)
  To: aoliva; +Cc: gcc

    Oh, I didn't realize you were talking specifically about MIPS.  I
    suppose GP may have to be stored in the stack frame somewhere, by
    builtin_setjmp_setup or the function prologue, so that
    builtin_setjmp_receiver can restore it.  But then, I know very little
    of MIPS calling conventions, so there may even be a reason why this
    would be impossible to do.

At the time I added _dummy, I was told it could not be done, but I forget
exactly why.  The suggestion was to pass the address of a function and call
it since the return from that call would set GP.

^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: Libgcc symbols
@ 2001-04-16 12:58 dewar
  0 siblings, 0 replies; 28+ messages in thread
From: dewar @ 2001-04-16 12:58 UTC (permalink / raw)
  To: aoliva, kenner; +Cc: gcc

<<Oh, I didn't realize you were talking specifically about MIPS.  I
suppose GP may have to be stored in the stack frame somewhere, by
builtin_setjmp_setup or the function prologue, so that
builtin_setjmp_receiver can restore it.  But then, I know very little
of MIPS calling conventions, so there may even be a reason why this
would be impossible to do.
>>

My understanding is that it is the MIPS assembler that takes charge of
GP restore, so you really do need to generate a dummy call to get GP
restored properly.

^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: Libgcc symbols
@ 2001-04-17 11:33 Richard Kenner
  0 siblings, 0 replies; 28+ messages in thread
From: Richard Kenner @ 2001-04-17 11:33 UTC (permalink / raw)
  To: rth; +Cc: gcc

    I believe Kenner added it in the distant past as a way to reload
    the PIC register after a non-local goto or exception receiver.
    Which happens to work on Alpha and a few other architectures.

No, Alpha was fine.  It was SGI IRIX O32 where you need to make the
call to restore GP.

^ permalink raw reply	[flat|nested] 28+ messages in thread
* Re: Libgcc symbols
@ 2001-04-17 12:14 dewar
  0 siblings, 0 replies; 28+ messages in thread
From: dewar @ 2001-04-17 12:14 UTC (permalink / raw)
  To: kenner, rth; +Cc: aoliva, gcc

<<So instead we drop the GP value into the builtin jmpbuf and
have builtin_longjmp restore it directly.
>>

OK, in our original design we were intent on absolutely minimizing the
setjmp time, so that is why we preferred to have the assembler reload
the GP on the longjmp (also it kept things more target independent).
But, indeed it works fine to include GP in the jmpbuf.

^ permalink raw reply	[flat|nested] 28+ messages in thread

end of thread, other threads:[~2001-04-17 23:14 UTC | newest]

Thread overview: 28+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-13 21:11 Libgcc symbols Mark Mitchell
2001-04-14  8:02 ` law
2001-04-16  5:54 ` Nix
2001-04-16  9:08   ` Zack Weinberg
2001-04-16  9:28     ` Phil Edwards
2001-04-16  9:44       ` Zack Weinberg
2001-04-16 10:43         ` Gabriel Dos Reis
2001-04-16 11:52         ` Phil Edwards
2001-04-16 10:39       ` Gabriel Dos Reis
2001-04-16 11:00     ` Nix
2001-04-17 11:23     ` Richard Henderson
2001-04-17 16:17     ` Joern Rennecke
2001-04-16 10:17   ` Profiling with '-a' [was Re: Libgcc symbols] Scott A Crosby
2001-04-16 15:01     ` Nix
2001-04-16 11:06   ` Libgcc symbols Mark Mitchell
2001-04-17 16:10 ` Michael Meissner
2001-04-17 17:57   ` Joe Buck
2001-04-17 23:11     ` Russ Allbery
2001-04-17 23:14       ` Russ Allbery
2001-04-16  9:35 Richard Kenner
2001-04-16 12:22 ` Alexandre Oliva
2001-04-16 12:25 Richard Kenner
2001-04-16 12:48 ` Alexandre Oliva
2001-04-17 11:29 ` Richard Henderson
2001-04-16 12:49 Richard Kenner
2001-04-16 12:58 dewar
2001-04-17 11:33 Richard Kenner
2001-04-17 12:14 dewar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).