Path: utzoo!attcan!uunet!seismo!sundc!pitstop!sun!amdcad!ames!vsi1!daver!mips!cprice From: cprice@mips.COM (Charlie Price) Newsgroups: comp.arch Subject: Re: register save/restore Message-ID: <7702@winchester.mips.COM> Date: 5 Nov 88 02:27:45 GMT References: <3300037@m.cs.uiuc.edu> <5938@killer.DALLAS.TX.US> <7580@aw.sei.cmu.edu> <1009@l.cc.purdue.edu> Reply-To: cprice@winchester.UUCP (Charlie Price) Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 23 In article <1009@l.cc.purdue.edu> cik@l.cc.purdue.edu (Herman Rubin) writes: >In article <7580@aw.sei.cmu.edu>, firth@sei.cmu.edu (Robert Firth) writes: >> Register Saving across Procedure Calls >> -------------------------------------- >> Which is better - caller saves or callee saves? >> >> A. Is this the right question? > >It is, if library subroutines are to be used. A compiler cannot change >the procedure to be followed in this case. Not necessarily. MIPS has ucode libraries (an intermediate representation) available and compiling C with -O4 optimization selected uses these libraries and does interprocedural register allocation including the library modules. For some applications this is worth doing. On the other hand, what about shared-library routines with dynamic linkage at runtime? -- Charlie Price cprice@mips.com (408) 720-1700 MIPS Computer Systems / 928 Arques Ave. / Sunnyvale, CA 94086