Related articles |
---|
compiling for mips environment simon@gatecrashers.com (simon) (1999-06-27) |
Re: compiling for mips environment zalman@netcom15.netcom.com (Zalman Stern) (1999-06-29) |
Re: compiling for mips environment jejones@microware.com (James Jones) (1999-06-29) |
Re: compiling for mips environment chrisd@reservoir.com (Chris Dodd) (1999-06-29) |
Re: compiling for mips environment postiffm@umich.edu (Matt Postiff) (1999-07-01) |
Re: compiling for mips environment meissner@cygnus.com (Michael Meissner) (1999-07-11) |
From: | James Jones <jejones@microware.com> |
Newsgroups: | comp.compilers |
Date: | 29 Jun 1999 03:00:59 -0400 |
Organization: | Microware Systems Corporation |
References: | 99-06-086 |
Keywords: | architecture |
There are two questions here:
1. Why reserve stack space for arguments that are being passed in
registers?
2. Why only set aside four registers to pass arguments in registers--
there are plenty of registers.
The moderator has answered #2; I believe the answer to #1, why leave
stack space for arguments being passed in registers, is to support C
optional arguments in a way that lets the optional argument portion
just walk through the stack while letting the caller still pass some
arguments in registers--the function prologue for the function with
optional arguments would presumably shove the argument registers onto
the stack so they'd be contiguous with the stack space for arguments
that would go on the stack anyway.
James Jones
Return to the
comp.compilers page.
Search the
comp.compilers archives again.