Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!mit-eddie!ll-xn!ames!amdahl!nsc!voder!apple!bcase From: bcase@apple.UUCP (Brian Case) Newsgroups: comp.arch Subject: Re: register windows Message-ID: <6417@apple.UUCP> Date: Mon, 5-Oct-87 23:01:16 EDT Article-I.D.: apple.6417 Posted: Mon Oct 5 23:01:16 1987 Date-Received: Fri, 9-Oct-87 04:46:52 EDT References: <1242@k.gp.cs.cmu.edu> Reply-To: bcase@apple.UUCP (Brian Case) Distribution: na Organization: Apple Computer Inc., Cupertino, USA Lines: 26 In article <1242@k.gp.cs.cmu.edu> lindsay@k.gp.cs.cmu.edu (Donald Lindsay) writes: >Register windows interest me. >Lose#4: Some programs (particularly Unix's "printf" ) want their parameter > list to be at an address. > >What ways have been used around lose#4 ? Well, I wouldn't say this is such a great way around it, but it does "work:" In the compiler I implemented for internal use at AMD, if the address of *any* argument was taken inside a procedure, the compiler assumed that at least 16 argumnts were passed to the procedure (the max. that the compiler would place in registers), and it stored all 16 arguments in memory in such a way that if more than 16 were passed, they would all line up real nice, thus facilitating printf. The method that I implemented required three (count 'em, three) stacks. It was a very quick solution to a somewhat tricky problem, but there are lots of others. BTW, you mentioned a coupla things about reg. windows that need elaboration: Registers *are* a cache, so the tradeoff "the space taken by registers could have been used for something else, like a cache" is kinda weird; you seemed to be saying in one "win" that registers were more dense than cache, but I don't know that this is really true: caches are typically single-ported memories while register files are at least two-ported (probably three-). The tags necessary for traditional caches take some space, true, but I still think caches, as a general class, are denser than register files. Register files have two or three times the bandwidth, *this* is the big win.