Path: utzoo!attcan!uunet!aplcen!samsung!brutus.cs.uiuc.edu!apple!motcsd!hpda!hpcuhc!edwardm From: edwardm@hpcuhc.HP.COM (Edward McClanahan) Newsgroups: comp.sys.m88k Subject: Re: Register Allocation (was Re: Info about 88open & standards) Message-ID: <100050001@hpcuhc.HP.COM> Date: 21 Nov 89 18:47:18 GMT References: <1989Nov16.212149.9770@paris.ics.uci.edu> Organization: Hewlett Packard, Cupertino Lines: 37 Ron Guilmette *debates*: > If I'm wrong that "callee-saves" always produces better performance > (with smaller executables to boot) then such tests could also have another > significant benefit. They could shut me up, and I'm sure everybody > would be in favor of that! :-) I offer a simple example... Caller uses 2 registers... Callee uses 30 registers... Using the Caller-saved convention, every time a call is made, 2 registers are *saved*. Using the Callee-saved convention, every time a call is made, 30 registers are *saved*. Similarly, consider the opposite situation (where the caller uses 30 registers and the callee uses only 2). In this case, it would be better to have used the callee-saved convention. Which of the above is more common? This is the very question that the OCS (and HP and MIPS and ...) had to consider. Your arguments about other *special conditions* (such as a callee only needing particular registers in a infrequently executed path, etc...) are all valid, but what is the frequency of these conditions? =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= Edward McClanahan Hewlett Packard Company Mail Stop 47UE -or- edwardm%hpda@hplabs.hp.com 19447 Pruneridge Avenue Cupertino, CA 95014 Phone: (408)447-5651