|Caller/Callee saved Registers firstname.lastname@example.org (1994-03-14)|
|Re: Caller/Callee saved Registers email@example.com (1994-03-21)|
|Re: Caller/Callee saved Registers firstname.lastname@example.org (1994-03-22)|
|Re: Caller/Callee saved Registers email@example.com (1994-03-22)|
|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-22)|
|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 email@example.com (1994-03-23)|
|Re: Caller/Callee saved Registers Peter-Lawrence.Montgomery@cwi.nl (1994-03-24)|
|[25 later articles]|
|From:||firstname.lastname@example.org (Steve Simmons)|
|Organization:||CONVEX News Network, Engineering (cnn.eng), Richardson, Tx USA|
|Date:||Tue, 22 Mar 1994 13:32:53 GMT|
These are more likely calling conventions than architecture issues;
however, many architectures do impose restrictions on which registers to
use. These conventions are defined so that inter-module calls in any
language can be done, regardless of the compiler used. Each compiler in
that environment must be compliant with those calling conventions.
Callee saved registers are those registers that the called routine must
save before it may use them. The VAX is one big proponent of this.
Caller saved registers are registers that must be saved by the calling
routine before a call can be made. Otherwise, the contents of the
register may be destroyed across the call.
It is a religous war as to which is more correct. Caller saved registers
places the smarts in the calling routine. It knows what values are live
across the call. Callee saved registers places the smarts in the called
routine. It knows which values to save.
If you wish to minimize registers spills, a hybrid approach may be the
best... When scheduling registers, use the caller saved registers first
because your caller has already saved the information if it was needed.
If you need a value across a subroutine call, move it into a callee saved
register and let the called routine decide whether or not to spill its
value into memory. If your requirements exceed the number of either
register set, you must start spilling.
Return to the
Search the comp.compilers archives again.