Re: compiling for mips environment

Matt Postiff <postiffm@umich.edu>
1 Jul 1999 15:02:26 -0400

          From comp.compilers

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)
| List of all articles for this month |

From: Matt Postiff <postiffm@umich.edu>
Newsgroups: comp.compilers
Date: 1 Jul 1999 15:02:26 -0400
Organization: University of Michigan EECS
References: 99-06-086 99-06-110 <Pine.GSO.4.10.9907010848090.15371-100000@rodan.eecs.umich.edu>
Keywords: architecture, design

> 1. Why reserve stack space for arguments that are being passed in
> registers?


Support of vararg functions is the primary utility of the 16-byte
reserved space as was already pointed out. These "home locations", as
they are called in the SYSV ABI, are also convenient when you need to
dump a parameter to a memory location because it's address is
taken. For example:


void main(int argc)
{
    foo(&argc); <--- causes store of $4 into first reserved location
}


The ABI specs at http://www.sco.com/developer/devspecs/ are helpful.


Float arguments can be passed in $f12 and $f14 according to that spec
if they are the first one or two arguments to a non-vararg function.


Matt


Post a followup to this message

Return to the comp.compilers page.
Search the comp.compilers archives again.