[Andrea Arcangeli]
> Can you think at one case where it's better to push the parameter on
> the stack instead of passing them through the callee clobbered
> ebx/eax/edx?

Well it's safer if you are lazy about prototyping varargs functions.
But of course by doing that you're treading on thin ice anyway, in
terms of type promotion and portability.  So I guess it's much better
to say "varargs functions MUST be prototyped" and use the registers.

I'd say go for it -- set up a mailing list and flesh out a better x86
ABI.  (Yes, this is the ubiquitous "someone besides me should..."
suggestion, I'm afraid I would look pretty foolish trying to help
design such.)  One issue: ideally you want to use 64-bit regs on AMD
Hammer for long longs, but then you leave out all legacy x68s. :(

AIUI gcc can cope OK with multiple ABIs to be chosen at runtime, am I
right?  IRIX, HP-UX and AIX all have both 32-bit and 64-bit ABIs.

Peter
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [EMAIL PROTECTED]
Please read the FAQ at http://www.tux.org/lkml/

Reply via email to