Article View: comp.arch
Article #2936Re: Unsafe at any speed
From: Michael A. Pasek
Date: Fri, 10 Nov 1989 13:58
Date: Fri, 10 Nov 1989 13:58
38 lines
2717 bytes
2717 bytes
In article <2725@brazos.Rice.edu> preston@titan.rice.edu (Preston Briggs) wrote: >[stuff about how many registers you need deleted] >...Separate load-store instructions allow lower cost of access >to non-registered variables. Why? Imagine trying to add from memory >to a register. A CISC version might be > ADD r5,0(r8) ; load from adress specisfied from r8 > wait for memory, doing > nothing much in the meantime > add the value to r5 > throw away the value you just waited for. > cost = 1 or 2 + memory acess time >[and promotes the RISC version as:] > LD r7,0(r8) ; load from adress in r8 into r7 > . ; do some useful work while waiting for memory > ADD r5,r6,r7 ; r5 := r6 + r7 > cost equals 2. Additionally, the old value of r6 is still > around, and the value from memory is handy if we need it. I don't know if I'm just stupid, but on the machine I work with, the "CISC" example takes a total of ONE cycle, assuming that the next instruction does not reference R5, and is not contained in the memory location referenced by R8. Also, in the "RISC" example, the "useful work" that may be done would have the same restrictions as the "CISC" version (no reference to R7, and the instructions cannot be in the memory location referenced by R8). Finally, the "throw away" of the value we just waited for can be avoided by coding the "RISC" example on the "CISC" machine, with the same results: it takes 2 cycles (if you do that "useful work" in between the two instructions). Anyway, I think the RISC/CISC battle will only be a philosophical argument (or perhaps a religious war), and the real decision of which is best will be made on a case by case basis by the implementer(s) of the solution(s) to a specific problem (or set of problems). If one actually is better than the other, the marketplace will decide (maybe). M. A. Pasek Switching Software Development NCR Comten, Inc. (612) 638-7668 CNG--er--PU4 Port Devel. 2700 N. Snelling Ave. pasek@c10sd3.StPaul.NCR.COM Roseville, MN 55113
Technical Details
Message-ID:
<1702@ncrcce.StPaul.NCR.COM>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!ncrlnk!ncrcce!pasekReferences:
<1477@aber-cs.UUCP> <2725@brazos.Rice.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!utstat!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!cs.utexas.edu!uunet!ncrlnk!ncrcce!pasek From: pasek@ncrcce.StPaul.NCR.COM (Michael A. Pasek) Newsgroups: comp.arch Subject: Re: Unsafe at any speed Summary: How fast were we going ? Keywords: Prefetch, Register, Memory, Conflict Message-ID: <1702@ncrcce.StPaul.NCR.COM> Date: 10 Nov 89 13:58:22 GMT References: <1477@aber-cs.UUCP> <2725@brazos.Rice.edu> Reply-To: pasek@c10sd3.StPaul.NCR.COM (M. A. Pasek) Followup-To: comp.arch Distribution: na Organization: NCR Comten, Inc. Lines: 38