Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!apple!baum From: baum@Apple.COM (Allen J. Baum) Newsgroups: comp.arch Subject: Re: more registers for ix86, was: Let's pretend Message-ID: <47713@apple.Apple.COM> Date: 3 Jan 91 19:12:34 GMT References: <3042@crdos1.crd.ge.COM> <1990Dec26.020034.4131@lpi.liant.com> <5827@labtam.labtam.oz> Reply-To: baum@apple.UUCP (Allen Baum) Organization: Apple Computer, Inc. Lines: 36 [] >In article <5827@labtam.labtam.oz> scott@labtam.labtam.oz (Scott Colwell) writes: >On the 486, reg to reg operations take one clock, cached memory to reg take >two and reg to cached mem take three. By improving this performance and making >some changes to the cache allocation scheme, cache can and does compensate >for the lack of general purpose registers. I'm afraid that I can't let this statement of fact go unchallenged. I'm assuming it is fact- I have no reason to believe otherwise. But, the plain facts don't tell all the details, and those details are significant. For example, it is easy to make a memory (or cache) access a single single if you make your cycle slow enough. I will make an assertion here- the critical path for most processors with cache is the cache access path. Secondly, you can make horribly complicated instructions take a single cycle (even for fast cycles) if you make your pipeline deep enough. Unfortunately, deep pipes have a problem with stalling because of branches and dependencies when the pipeline gets deep. So, the book says that some instruction will take only one cycle. What it doesn't say is that for an average instruction mix the pipeline stalls so much that even with 100% cache hits you'll get 2.5 cycles per instruction. Be very careful when you think that cache accesses are fast & free- there isn't a free lunch, and the the cost is tricky to measure. Second order effects (like dependency stalls) are not necessarily down in the noise. One further point- my sense of compiler technology is that 80x86 compilers are very good at what they do. However, because of the lack of registers, there are all sorts of techniques they don't even attempt to do. This cost of opportunity is not easily measured either. -- baum@apple.com (408)974-3385 {decwrl,hplabs}!amdahl!apple!baum