This is the mail archive of the
gcc@gcc.gnu.org
mailing list for the GCC project.
Re: __builtin_apply/sparc.md problem on SPARC-Solaris ?
- To: Richard Henderson <rth at cygnus dot com>
- Subject: Re: __builtin_apply/sparc.md problem on SPARC-Solaris ?
- From: Ovidiu Predescu <ovidiu at cup dot hp dot com>
- Date: Thu, 22 Oct 1998 08:52:59 -0700
- Cc: Helge Hess <hh at mdlink dot de>, egcs <egcs at cygnus dot com>
On Wed, 21 Oct 1998 23:18:05 -0700, Richard Henderson <rth@cygnus.com> wrote:
> On Tue, Oct 20, 1998 at 12:50:42PM +0200, Helge Hess wrote:
> > I had problems using the objc_msg_sendv() function from the Objective-C
> > runtime. Since the function relies on __builtin_apply() I wonder whether
> > something is wrong with this in egcs-SPARC and whether such a problem is
> > known.
>
> Very well known. __builtin_apply will not work on any machine
> that doesn't simply push arguments on the stack.
It does actually work on RISC machines and it used to work on Sparc/Solaris.
All the registers are saved and restored in and from a buffer by the
__builtin_apply/restore functions, so it should work even if the arguments are
passed on registers. Conceptually the idea seems to be good, I never understood
why you're saying it's not good.
> The extention is an abomination and should be removed.
I would also like to replace it with something else but I don't know of a
dynamic function invocation library that could be released together with EGCS,
so that we don't introduce unnecessary dependencies for the Objective-C runtime
library.
Ovidiu