home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #27 / NN_1992_27.iso / spool / comp / arch / 10770 < prev    next >
Encoding:
Internet Message Format  |  1992-11-15  |  2.5 KB

  1. Path: sparky!uunet!mcsun!uknet!mucs!cs.man.ac.uk!endecotp
  2. From: endecotp@cs.man.ac.uk (PB Endecott (PhD SFurber))
  3. Newsgroups: comp.arch
  4. Subject: Re: why no register + register addressing mode in R3000 (repost)
  5. Message-ID: <endecotp.721675619@cs.man.ac.uk>
  6. Date: 13 Nov 92 17:26:59 GMT
  7. References: <lg5i5oINN1q4@exodus.Eng.Sun.COM>
  8. Sender: news@cs.man.ac.uk
  9. Lines: 53
  10.  
  11. tremblay@flayout.Eng.Sun.COM (Marc Tremblay) writes:
  12.  
  13.  
  14. >Here is the percentage of loads and stores for SPECint92 benchmarks
  15. >running on SPARC which use the two register addressing mode [RX + RY]:
  16.  
  17. >benchmark    loads    stores
  18. >---------    -----    ------
  19. >espresso    37%    9.8%
  20. >li        2.5%    2.8%
  21. >eqntott    76.4%    5.4%
  22. >compress    27%    7.3%
  23. >sc        13.5%    7.9%
  24. >gcc        18.9%    37.5%
  25.  
  26. Interesting numbers, thank you.
  27.  
  28. I calculate from this that an average of 11.8% of stores and 29.2% of loads
  29. use a two-register addressing mode.
  30.  
  31. Using numbers from Hennessey & Patterson fig 4.34 (sorry I don't have them
  32. for the SPEC benchmarks), 8% of instructions in dynamic execution are
  33. stores, and 18% are loads.  So, (8% x 11.8%) = 0.9% of instructions are
  34. stores that use two registers, and (18% x 29.2%) = 5.3% of instructions are
  35. loads that use two registers; a total of 6.2% of instructions use
  36. two-register addressing modes.
  37.  
  38. On an architecture without this mode, assuming that each of these
  39. operations would need a separate ADD to calculate the address, the number
  40. of instructions needed to do the same work would increase by 6.2%.  Does a
  41. 6.2% performance increase justify an extra register read port ?
  42.  
  43. The answer depends on the actual cost of adding the read port, and other
  44. factors such as the impact on code density of the extra code.
  45.  
  46. Question : does the Sparc do both sorts of addressing in the same number of
  47. cycles, or does it use an extra cycle for reading the extra register ?
  48.  
  49. The 6.2% is a maximum; clever compiler techniques should reduce this.
  50.  
  51. Consider a processor which implements register+register for loads (where
  52. the extra port is available) but not for stores, where the port is needed
  53. for the data.  I believe that the HP-PA does this.  From the above numbers,
  54. 0.9% of instructions need an extra ADD for address calculations compared to
  55. a machine with register+register for loads and stores.  Is this a good
  56. compromise ?
  57.  
  58. In a superscalar implementation, you have lots of register ports.  For
  59. example, you may have four read ports so that you can do two ALU operations
  60. simultaneously.  You could then do a store with two registers for the
  61. address at the same time as a monadic ALU operation!
  62.  
  63. --Phil.
  64.