Related articles |
---|
Return value address nicolas_capens@hotmail.com (2004-09-07) |
Re: Return value address christoph.neubauer@siemens.com (Christoph Neubauer) (2004-09-08) |
Re: Return value address tmk@netvision.net.il (2004-09-13) |
Re: Return value address Nicola.Musatti@ObjectWay.it (2004-09-14) |
Re: Return value address christoph.neubauer@siemens.com (Christoph Neubauer) (2004-09-21) |
Re: Return value address kamalp@acm.org (2004-09-21) |
From: | Nicola.Musatti@ObjectWay.it (Nicola Musatti) |
Newsgroups: | comp.compilers |
Date: | 14 Sep 2004 16:37:36 -0400 |
Organization: | http://groups.google.com |
References: | 04-09-054 04-09-069 |
Keywords: | architecture, design |
Posted-Date: | 14 Sep 2004 16:37:36 EDT |
"Christoph Neubauer" <christoph.neubauer@siemens.com> wrote
> What about a stack model, that allocates:
>
> r allways at 0
> arguments starting at 4
> local variables afterwards
> temp variables afterwards
In my ignorance I thought that just about every compiler worked in
this way, except maybe when return value and arguments are directly
allocated into registers. Are there reasons to do otherwise?
> [It also seemed to me that the obvious solution is for the caller to
> allocate the return value cell. -John]
Wouldn't this also give the opportunity to optimize it away, e.g. by
directly using the variable to which the function result is assigned?
Cheers,
Nicola Musatti
Return to the
comp.compilers page.
Search the
comp.compilers archives again.