Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!seismo!uwvax!oddjob!gargoyle!ihnp4!alberta!auvax!rwa From: rwa@auvax.UUCP (Ross Alexander) Newsgroups: comp.arch Subject: Re: 32-bit CPUs ( NEC V70 ) and silly examples Message-ID: <166@auvax.UUCP> Date: Thu, 14-May-87 13:52:26 EDT Article-I.D.: auvax.166 Posted: Thu May 14 13:52:26 1987 Date-Received: Sat, 16-May-87 11:17:51 EDT References: <3810030@nucsrl.UUCP> <491@necis.UUCP> <3530@spool.WISC.EDU> <1526@drivax.UUCP> Distribution: na Organization: Athabasca U., Alberta, Canada Lines: 48 Keywords: V60, V70, not so silly examples Summary: perhaps too critical, but.... In article <1526@drivax.UUCP>, tyler@drivax.UUCP (William Tyler) justly takes me to task for an intemperate criticism of the use of 'a->b->c->d=2;' as a meaningful example of code generation for a very CISCy processor (this is the essence of the example under discussion). I apologize profusely for a rather hectoring tone and overbearing attitude. One shouldn't post to the net after happy hour :-(, I won't do that again. On a more positive note, Mr. Tyler provides some concrete evidence that triple indirection is indeed used and useful. I concur. I have written hacks like that in assembly and C many times, and was immoderately pleased with them at the time :-). I just wonder if this construction is common enough and useful enough to deserve silicon real estate for it's support. It seems to me that this sort of thing ought rather to be done in user code rather than microcode, and that the user should take the hit rather than the system. This arguement is predicated on a belief that there are more constructive things to do with the real estate, such as (for example) wallace tree multipliers and barrel shifters, large register files, and so on ad naseaum (I am not a 'real' hardware hacker, just a dilettante). In support of this position, I have just spent a happy half hour grepping my kernel sources (Ultrix 1.2 with Decnet support). A few facts emerged: there were 365 occurences of 'a->b->c' constructions. Most of these were in the sockets and inet code (and in the decnet code too, interestingly enough), and the remainder were scattered around with clustering in the vm code and the buss autoconfiguration code. There were 5 occurences of 'a->b->c->d', which I consider rather herculean, and 0 occurences of 'a->b->c->d->e', which came as no suprize (to me). Auvax spends from 25 to 50 percent of it's time executing the kernel, since our installation workload emphasizes character pushing (we drive lots of laser printers, et c.) and also database applications. My conclusion from this evidence is that deep levels of indirection a la a->b->c... are a lightly used feature. I welcome constructive discussion. By the way :-) the H6050, a real beater of a 1960's-architecture machine, could do the original example in at most two instructions (if the compiler was _incredibly_ clever and we make an assumption or two about where operands are; I would have to think carefully for about 20 minutes to write the equivalent assembly. I think it would come out to something like 'ldx0 2,du; stxl0 fake,i' where fake is the beginning of a long descriptor chain dragging in a, b, c, establishing the offset of d, et c., et c. It's been years.) ...!ihnp4!alberta!auvax!rwa Ross Alexander, Athabasca University