|Caller/Callee saved Registers email@example.com (1994-03-14)|
|Re: Caller/Callee saved Registers firstname.lastname@example.org (1994-03-21)|
|Re: Caller/Callee saved Registers email@example.com (1994-03-22)|
|Re: Caller/Callee saved Registers firstname.lastname@example.org (1994-03-22)|
|Caller/Callee saved Registers email@example.com (1994-03-22)|
|Re: Caller/Callee saved Registers firstname.lastname@example.org (1994-03-22)|
|Re: Caller/Callee saved Registers email@example.com (1994-03-22)|
|Re: Caller/Callee saved Registers firstname.lastname@example.org (1994-03-23)|
|Re: Caller/Callee saved Registers email@example.com (1994-03-23)|
|Re: Caller/Callee saved Registers firstname.lastname@example.org (1994-03-23)|
|Re: Caller/Callee saved Registers Peter-Lawrence.Montgomery@cwi.nl (1994-03-24)|
|Re: Caller/Callee saved Registers email@example.com (1994-03-24)|
|[24 later articles]|
|From:||firstname.lastname@example.org (Paul Beusterien)|
|Organization:||Harris Computer Systems Division|
|Date:||Tue, 22 Mar 1994 19:02:16 GMT|
email@example.com (Paul Jakob Magun) writes:
> What would happen if all registers were saved by the called procedure
> (callee saved) ?
> Why are there no callee saved parameter registers ?
Saving all registers would negate some of the advantages gained by passing
parameters in register. There's often no reason to save parameter
registers since the values can often be used right where they are.
> The kind (caller saved/callee saved) of register used for a variable is
> determined locally. Won't this a suboptimal global allocation ?
It's impossible to be optimal unless you are looking at all of the callers
and callees at once. Register saving conventions are designed to do as
well as possible most of the time for only being able to consider a single
routine at once. Typically the biggest win from a good convention is very
cheap leaf routines. If they are not too big, they typically won't have
to save any registers and may not need to do any stack adjustments at all.
> How did the designers of the architecture decide on the relative number of
> caller/callee saved registers ? Should the division be chosen differently
> for different high level languages ?
This isn't an architecture issue. If you're designing a register
allocator, you can design your own conventions. However, if you have to
be able to call or be called by code generated by other compilers, you
need to know what their conventions are.
Different divisions may be better for different languages, but then you
have problems with calls between languages. Coding style is probably an
even bigger determinant than language on what makes a good division.
Paul Beusterien firstname.lastname@example.org
Harris Computer Systems (305) 973 5270
2101 W. Cypress Creek Road
Ft. Lauderdale, FL 33309
Return to the
Search the comp.compilers archives again.