Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84; site drivax.UUCP Path: utzoo!watmath!clyde!burl!ulysses!mhuxr!mhuxt!houxm!mtuxo!mtunh!mtung!mtunf!ariel!vax135!petsd!pesnta!hplabs!amdahl!drivax!alan From: alan@drivax.UUCP (Alan Fargusson) Newsgroups: net.arch Subject: Re: risc, cisc, and microprogramming Message-ID: <168@drivax.UUCP> Date: Sun, 30-Jun-85 03:05:22 EDT Article-I.D.: drivax.168 Posted: Sun Jun 30 03:05:22 1985 Date-Received: Thu, 4-Jul-85 04:42:07 EDT References: <557@hou2b.UUCP> <1078@peora.UUCP> <334@spar.UUCP> <145@mips.UUCP> <350@spar.UUCP> <171@watmum.UUCP> Organization: Digital Research, Monterey, CA Lines: 27 > Does not the average RISC type machine do a purge-pipe action upon > receipt of a branch instruction, or is there something so incredibly obvious > going on here that I am missing? The reason I ask is that in any but the most > nontrivial loops, throwing in enough NOPs to fill the pipe so that the next > instruction is the right one strikes me as grossly inefficient. > start: load a > store b > start+2:add c > store d > decr e > brnz start+2: > load a \ do these 2 if branch taken, else throw them away > store b / ... (purge) and do the xor > xor a ---> continue here because "load" & "store" were purged > ... when the branch was not taken > The Bearkly type RISC (and most others I think) delay the action of the branch for one cycle. Thus for your example program a noop would have to be placed after the brnz to start+2. In many cases the noop can be optimized out by a smart compiler. -- Alan Fargusson. { ihnp4, amdahl, mot }!drivax!alan