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

  1. Xref: sparky comp.arch:10855 comp.lang.misc:3754
  2. Newsgroups: comp.arch,comp.lang.misc
  3. Path: sparky!uunet!cs.utexas.edu!qt.cs.utexas.edu!yale.edu!spool.mu.edu!news.nd.edu!mentor.cc.purdue.edu!pop.stat.purdue.edu!hrubin
  4. From: hrubin@pop.stat.purdue.edu (Herman Rubin)
  5. Subject: Re: how to advocate new software/hardware features (Re: Hardware Support for Numeric Algorithms)
  6. Message-ID: <BxwzzK.6Lr@mentor.cc.purdue.edu>
  7. Sender: news@mentor.cc.purdue.edu (USENET News)
  8. Organization: Purdue University Statistics Department
  9. References: <Bxs63J.BxA@exnet.co.uk> <BxtA6v.CE8@mentor.cc.purdue.edu> <id.HJ1V.BTG@ferranti.com>
  10. Date: Wed, 18 Nov 1992 13:54:55 GMT
  11. Lines: 41
  12.  
  13. In article <id.HJ1V.BTG@ferranti.com> peter@ferranti.com (peter da silva) writes:
  14. >In article <BxtA6v.CE8@mentor.cc.purdue.edu> hrubin@pop.stat.purdue.edu (Herman Rubin) writes:
  15. >> But it is.  The operations often use register arguments and the results
  16. >> are wanted in registers.
  17.  
  18. >What's a register? Most modern compilers ignore "register", or use it as a
  19. >hint "this is a frequently used value".
  20.  
  21. Maybe that is one reason for such poor object code.  Most modern architectures
  22. REQUIRE that arguments are in registers.  This should be well known; no matter
  23. how well loads or stores can be integrated into the code, they certainly add
  24. an instruction issue.
  25.  
  26. So, assuming that addition takes one cycle, a = b + c takes one cycle if
  27. only registers are used, but four cycles otherwise.
  28.  
  29. Take one of the examples, unpack.  Since the registers typically do not 
  30. behave in enough respects like memory, it is certainly difficult to put
  31. a struct in the register file.  And even if it is, they might be in the
  32. wrong registers.  So that unpack, as a macro, can often be done in 3 steps,
  33. while any use of a struct for the result is likely to add at least 2 more,
  34. and if memory is invoked, 4 more.
  35.  
  36. >And how is an inline library part of the language more than a subroutine
  37. >or an include file?
  38.  
  39. An include file should be considered as part of the program.  The programmer
  40. decides explicitly which ones to include.  By a subroutine, I normally mean
  41. one compiled separately, and with object code linked at run time, or when
  42. an object file is being produced, by the loader.  Inlining requires that
  43. the compiler introduce instructions directly into the compilation as it
  44. does when it is handling the user's code.  The current inlining is a special
  45. case of what I would like to accomplish with the macro processor I have
  46. called for; I would allow macros applied to macros, etc.  Inlining corresponds
  47. to a subset of what a more powerful #define would handle.  But since it is not
  48. under the control of the programmer, it becomes part of the language.
  49. -- 
  50. Herman Rubin, Dept. of Statistics, Purdue Univ., West Lafayette IN47907-1399
  51. Phone: (317)494-6054
  52. hrubin@snap.stat.purdue.edu (Internet, bitnet)  
  53. {purdue,pur-ee}!snap.stat!hrubin(UUCP)
  54.