Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!watmath!clyde!cbatt!ucbvax!ucbcad!faustus From: faustus@ucbcad.UUCP Newsgroups: comp.arch Subject: Re: Optimizing compiler's view on: no. of regs, aliasing, caller/callee save etc. Message-ID: <1283@ucbcad.berkeley.edu> Date: Sat, 21-Feb-87 21:42:46 EST Article-I.D.: ucbcad.1283 Posted: Sat Feb 21 21:42:46 1987 Date-Received: Sun, 22-Feb-87 05:43:43 EST References: <902@orcisi.UUCP> Organization: CAD Group, U.C. Berkeley Lines: 9 WRT the discussion about whether the caller or the callee should save registers -- wouldn't the most efficient strategy be for the caller to pass the callee a mask of which registers are currently in use (by itself and previous functions)? That way, the callee could AND its mask with the caller's mask and save those registers, and OR its mask and the caller's and pass that to any functions that it calls. I think this should prevent any unnecessary saving of registers. Wayne