home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #30 / NN_1992_30.iso / spool / comp / arch / 11650 < prev    next >
Encoding:
Text File  |  1992-12-15  |  2.1 KB  |  52 lines

  1. Newsgroups: comp.arch
  2. Path: sparky!uunet!usc!elroy.jpl.nasa.gov!decwrl!deccrl!news.crl.dec.com!news!nntpd.lkg.dec.com!ryn.mro4.dec.com!news
  3. From: pjdm@chmeee.enet.dec.com (Peter Mayne)
  4. Subject: Re: Alpha Architecture Quirks
  5. Message-ID: <1992Dec15.021242.6331@ryn.mro4.dec.com>
  6. Keywords: Alpha 21064
  7. Lines: 37
  8. Sender: news@ryn.mro4.dec.com (USENET News System)
  9. Reply-To: Peter.Mayne@cao.mts.dec.com
  10. Organization: Digital Equipment Corporation
  11. References:  <1992Dec14.072942.21962@doug.cae.wisc.edu>
  12. Distribution: usa
  13. Date: Tue, 15 Dec 1992 02:12:42 GMT
  14.  
  15.  
  16. In article <1992Dec14.072942.21962@doug.cae.wisc.edu>, keiths@cae.wisc.edu (Keith Scidmore) writes:
  17.  
  18. >2)  The 21064 has no integer divide.  Again, isn't this going to make math
  19. >    performance poor.  Integer constants can be converted to multiplies
  20. >    but this is only a partial solution.
  21.  
  22. From the Alpha Architecture Handbook, p A-12, or the Alpha Architecture
  23. Reference Manual, also p A-12:
  24.  
  25. Integer division does not exist as a hardware opcode. Division by a
  26. constant can always be done via UMULH of another appropriate constant,
  27. followed by a right shift. General quadword division by true variables
  28. can be done via a subroutine. The subroutine could test for small
  29. divisors (less than about 1000 in absolute value) and for those, do a
  30. table lookup on the exact constant and shift count for an UMULH/shift
  31. sequence. For the remaining cases, a table lookup on about a 1000-entry
  32. table and a multiply can give a linear approximation to 1/divisor that
  33. is accurate to 16 bits. Using this approximation, a multiply and a
  34. back-multiply and a subtract can generate one 16-bit quotient "digit"
  35. plus a 48-bit new partial dividend. Three more such steps can generate
  36. the full quotient. Having prior knowledge of the possible sizes of the
  37. divisor and dividend, normalizing away leading bytes of zeros, and
  38. performing an early-out test can reduce the average number of
  39. multiplies to about 5 (compared to a best case of 1 and a worst case of
  40. 9).
  41.  
  42. >Thanks in advance.
  43. >
  44. >Keith R. Scidmore
  45.  
  46. PJDM
  47. --
  48. Peter Mayne                     | My statements, not Digital's.
  49. Digital Equipment Corporation   |
  50. Canberra, ACT, Australia        | "AXP!": Bill the Cat
  51.  
  52.