Path: utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!csd4.milw.wisc.edu!bbn!apple!rutgers!att!alberta!ubc-cs!van-bc!rsoft!mindlink!a464 From: a464@mindlink.UUCP (Bruce Dawson) Newsgroups: comp.arch Subject: Re: Register usage Message-ID: <259@mindlink.UUCP> Date: 12 May 89 05:12:08 GMT Organization: MIND LINK! - British Columbia, Canada Lines: 23 One thing that needs to be kept in mind when talking about the advantages of huge numbers of registers is that some of the advantages of registers go away when you have a lot (when have you a lot availabel simultaneously I should say). In the extreme case of the computer someone mentioned that had 256 registers, a register-register operation would use up sixteen bits just to specify the two registers involved. Contrast that with the six bits required if you only have eight registers. Given the finite memory speeds that we have to deal with, an extra ten bits so that you can have 256 instead of eight registers is probably too big a price to pay and would probably slow programs down. Speaking from my experience on the 68000, I would say that for assembly language programming, 16 registers is generally enough, with more being occasionally desirable. Because C can't do a very good job of comprehending an entire substantial subroutine or program and deciding what should be in registers (actually, replace 'C' with HLL) I would think that a compiler could actually get by with slightly less. One thing to keep in mind is that the 80386's eight registers are actually eight, whereas the 680x0 families sixteen are usually more like thirteen or fourteen (by the time you use one for a stack pointer, one for a data segment pointer and one for a stack frame pointer). .Bruce.