Path: utzoo!utgpu!attcan!uunet!seismo!sundc!pitstop!sun!decwrl!decvax!ima!johnl From: johnl@ima.ima.isc.com (John R. Levine) Newsgroups: comp.arch Subject: Re: register save/restore Message-ID: <2849@ima.ima.isc.com> Date: 3 Nov 88 02:14:23 GMT References: <3300037@m.cs.uiuc.edu> <5938@killer.DALLAS.TX.US> <7580@aw.sei.cmu.edu> Reply-To: johnl@ima.UUCP (John R. Levine) Organization: Not much Lines: 14 In article <7580@aw.sei.cmu.edu> firth@bd.sei.cmu.edu (Robert Firth) writes: >Which is better - caller saves or callee saves? > >[he argues that for a variety of reasons, caller saves is faster.] The argument I most often heard for the callee saving the registers is that it makes the object code smaller. Most subroutines are called from more than one place (otherwise, why make it a subroutine? I know, libraries, modularity, etc.) so that you would need N copies of caller-saves, one for each call, but you only need one copy of callee-saves. -- John R. Levine, IECC, PO Box 349, Cambridge MA 02238-0349, +1 617 492 3869 { bbn | think | decvax | harvard | yale }!ima!johnl, Levine@YALE.something Rome fell, Babylon fell, Scarsdale will have its turn. -G. B. Shaw