Re: Problems with EGCS 1.1 vs GCC 2.7.2.3

Peter T. Breuer (ptb@it.uc3m.es)
Fri, 1 Jan 1999 19:29:55 +0100 (MET)


"A month of sundays ago Michael Meissner wrote:"
>
> is only true as it concerns the x86 implementation of varargs. In the 12+
> ports I've worked on with GCC, the majority of systems pass varadic arguments
> in registers. Some of them in fact make the handling of varardic arguments
> fairly complecated at runtime (the PowerPC System V ABI which is used in Linux
> and eABI situations is an example of this).

If anyone cares (michael in particular), this is simply not acceptable
at the programming level. It's hell trying to get fundamentally varadic
(I prefer "polymorphic") code working across systems. I've JUST, after
maybe 6 months of trying, managed to get my compiler compiler working
under g++ as well as under gcc. The holdup is largely due to the
incompatibility of c++ with c in the area of polymorphic typing
(instantiations in C++ must be declared polymorphic too, whereas in C
they'll be able to have base types) but some of the blame lies with
obscure register passing implementations across compilers and platforms.
I use polymorphic core library functions - 'nuff said.

Actually, ix86 gcc 2.7.* is regular in the way it works - thank goodness.
Can't say the same about solaris. If someone would like to explain the
distribution of stack variables and register variables under solaris
compilers, feel free. Seems something like "if it's size 2 or 4 bytes
and it's tuesday, put it on the stack .. otherwise use miraculous
indirection". Compilers seem to be playing silly games for speed when
it would be much faster if they would do things regularly and
predictably so that I could just map whole stack regios across. When
calling one polymorphic function from another I just want to pass a
pointer to the region containing its args, not collect the args up one
by one then make another call. No - I can't use a passable array the
whole time. Some of these functions come from user space and users don't
play ball. </frustrated complaint about silly varargs implementations>

Peter

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.rutgers.edu
Please read the FAQ at http://www.tux.org/lkml/