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

  1. Path: sparky!uunet!wupost!crcnis1.unl.edu!moe.ksu.ksu.edu!zaphod.mps.ohio-state.edu!cs.utexas.edu!sun-barr!news2me.EBay.Sun.COM!exodus.Eng.Sun.COM!flayout.Eng.Sun.COM!tremblay
  2. From: tremblay@flayout.Eng.Sun.COM (Marc Tremblay)
  3. Newsgroups: comp.arch
  4. Subject: Re: why no register + register addressing mode in R3000 (repost)
  5. Date: 16 Nov 1992 19:14:11 GMT
  6. Organization: Sun Microsystems, Mt. View, Ca.
  7. Lines: 77
  8. Message-ID: <lgfso3INN8if@exodus.Eng.Sun.COM>
  9. References: <lg5i5oINN1q4@exodus.Eng.Sun.COM> <endecotp.721675619@cs.man.ac.uk>
  10. NNTP-Posting-Host: flayout
  11.  
  12. In article <endecotp.721675619@cs.man.ac.uk> endecotp@cs.man.ac.uk (PB Endecott (PhD SFurber)) writes:
  13. >On an architecture without this mode, assuming that each of these
  14. >operations would need a separate ADD to calculate the address, the number
  15. >of instructions needed to do the same work would increase by 6.2%.  Does a
  16. >6.2% performance increase justify an extra register read port ?
  17.  
  18. I sure would add a port for a 6.2% increase in integer performance.
  19. The level of integration achievable today, coupled with the presence
  20. of many critical paths not related to the register file, makes the
  21. cost of adding one read port negligible.
  22.  
  23. The 6.2% number given above has to be reduced somewhat to account for
  24. some other optimizations. As stated, it assumes that a processor
  25. without register + register addressing requires an extra cycle
  26. to compute the address. That is not exactly the case for a variety
  27. of reasons:
  28.  
  29.     - in some cases the second register can be replaced by a constant
  30.       if proper analysis is done. Notice that the numbers I originally
  31.       gave excluded register g0 (hardwired to 0). Also notice that
  32.       register allocation normally tries to replace register usage
  33.       with a constant especially for address generation. So the number
  34.       would be reduced but not significantly.
  35.  
  36.     - for superscalars the extra addition may be for free in terms
  37.       of cycles. There are some second order effects though, such as
  38.       increased code size (bigger I$ miss), etc. (small). On the other
  39.       hand this extra addition suggests the use of two other read
  40.       ports and another write port unless they are already there
  41.       so that generic ALU operation can be accomplished (aka Viking).
  42.  
  43. In any case the 6.2% number is significant and in our case has justified
  44. the definition of register + register addressing in the instruction set.
  45. Some people asked about the impact on floating-point programs, here are
  46. the numbers for SPECfp92:
  47.  
  48. Percentage of loads/stores that use register + register addressing:
  49.  
  50. Benchmark    loads    stores
  51. ---------    -----    ------
  52. ora        98.1%    0.6%
  53. spice        73%    29%
  54. su2cor        29.6%    6.7%
  55. hydro        22.5%    18.3%
  56. tomcatv        22.2%    0.03%
  57. fpppp        10.3%    0.002%
  58. doduc        9.2%    4.9%
  59. wave5        7.1%    0.9%
  60. mdljdp2        6.4%    0.3%
  61. alvinn        5.7%    0.2%
  62. ear        4.0%    0.01%
  63. mdljsp2        2.7%    0.7%
  64. nasa7        0.9%    0.1%
  65. swm256        0.3%    0.16%
  66.  
  67. As you can see, mileage varies according to the application. Globally though,
  68. it does suggest a high utilization of the register + register addressing mode.
  69.  
  70. >Question : does the Sparc do both sorts of addressing in the same number of
  71. >cycles, or does it use an extra cycle for reading the extra register ?
  72.  
  73. Viking handles both addressing modes indiscriminately. The load merely
  74. uses the two read ports that are already provided to support an ALU
  75. operation, so this did not add a port.
  76.  
  77. >The 6.2% is a maximum; clever compiler techniques should reduce this.
  78.  
  79. True, see above. Also, one could compile with the register + register
  80. addressing feature turned on/off to see the difference between the two.
  81. That's what Hall and O'Brien did (paper in ASPLOS-IV) to prove the
  82. usefulness of pre-increment and pre-decrement load/stores.
  83. Finally, one could claim that the register + register mode gives the
  84. compiler more flexibility, which could turn out to help in future
  85. optimizations.
  86.  
  87. - Marc Tremblay.
  88. Sun Microsystems.
  89.