Path: utzoo!attcan!uunet!lll-winken!lll-lcc!ames!ll-xn!husc6!bbn!rochester!crowl From: crowl@cs.rochester.edu (Lawrence Crowl) Newsgroups: comp.arch Subject: The VAX Always Uses Fewer Instructions Message-ID: <10595@sol.ARPA> Date: 15 Jun 88 15:07:45 GMT References: <6921@cit-vax.Caltech.Edu> <28200161@urbsdc> Reply-To: crowl@cs.rochester.edu (Lawrence Crowl) Organization: U of Rochester, CS Dept, Rochester, NY Lines: 48 In article <28200161@urbsdc> aglew@urbsdc.Urbana.Gould.COM writes: >In article <491@daver.UUCP> daver@daver.UUCP (Dave Rand) writes: >>I am confused. How can a risc machine have a higher "vax mips" than native >>mips? MORE (not less) risc instructions are required to do the same task, >>when compared to a vax. > >Not always. Consider A=B+C, all in registers: > VAX: > mov rB,rA > add rC,rA > 3 address RISC: > add rA,rB,rC > >So, we have an existence proof. What characteristics of the machine actually >let this happen? This is incorrect. The VAX has three address arithmetic instructions. So the above example for a VAX (destinations are always on the right side) is: addl3 rB, rC, rA It also takes four bytes to encode this instruction, the same as most RISC machines. The VAX instruction set wins (on number of instructions executed) when using complex data structures because of the extensive addressing modes. For example, the loop to add two vectors into a third on the VAX is: top: addl3 (rA)+, (rB)+, (rC)+ sobgeq rD, top which takes seven bytes for two instructions. Most RISCs I now would have something like the following loop (again destinations on the right): top: load rA, rM load rB, rN add rM, rN, rO store rO, rC add rA, 1, rA add rB, 1, rB add rC, 1, rC add rD, -1, rD bgeq top which takes something on the order of thirty-six bytes and nine instructions. I cannot think of any general computing task (such as the loop above) in which the VAX will not execute fewer instructions. Anyone? -- Lawrence Crowl 716-275-9499 University of Rochester crowl@cs.rochester.edu Computer Science Department ...!{allegra,decvax,rutgers}!rochester!crowl Rochester, New York, 14627