Subject: Re: -current kernel broken
To: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>
From: Paul Kranenburg <pk@cs.few.eur.nl>
List: port-sparc
Date: 06/14/1996 00:10:12
> >> No need to no-op it, just make a special path of execution within
> >> locore for the from-kernel case of "ta 3".
> > I know.  But I just wish that these goodies were implemented in, say,
> > libgcc whenever possible.
> 
> But __builtin_return_address _can't_ be implemented in libgcc.  libgcc
> doesn't - can't - know how many windows the machine has; it _has_ to
> push this one off to the kernel.  And indeed, it asks the kernel for as
> little as possible - just a window-flush; the rest _is_ done by gcc.

I was objecting to the fact that there is now no easy (non-klugy) way
to implement things a little differently in the kernel, if so desired.
The entire `__builtin_return_address' routine could have been in libgcc,
doing the same things as the in-line version for user-land code. This
would allow a kernel library to replace it with a specialized version.

Besides, I'm of the opinion the a compiler has no business generating
`ta 3' instructions even if it's in some sparc API. I can imagine that
some `embedded system' developers might not be entirely happy.

(Next thing you'll know is that we have a `_builtin_exit' -- evaluating
to `mov 1,%o0; ta 0' on a sparc -- because that's so much easier :-)