home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1992 #26 / NN_1992_26.iso / spool / comp / arch / 10395 < prev    next >
Encoding:
Internet Message Format  |  1992-11-13  |  4.6 KB

  1. Xref: sparky comp.arch:10395 comp.lang.forth:3444
  2. Path: sparky!uunet!europa.asd.contel.com!awds.imsd.contel.com!news!usc!cs.utexas.edu!uwm.edu!linac!pacific.mps.ohio-state.edu!cis.ohio-state.edu!magnus.acs.ohio-state.edu!usenet.ins.cwru.edu!agate!spool.mu.edu!yale.edu!jvnc.net!nuscc!ntuix!eoahmad
  3. From: eoahmad@ntuix.ntu.ac.sg (Othman Ahmad)
  4. Newsgroups: comp.arch,comp.lang.forth
  5. Subject: Re: What's RIGHT with stack machines (Was Re: What's wrong...)
  6. Message-ID: <1992Nov5.050640.24183@ntuix.ntu.ac.sg>
  7. Date: 5 Nov 92 05:06:40 GMT
  8. References: <Bx5AIr.EAy.2@cs.cmu.edu>
  9. Organization: Nanyang Technological University - Singapore
  10. Lines: 95
  11. X-Newsreader: TIN [version 1.1 PL6]
  12.  
  13. Philip Koopman (koopman+@cs.cmu.edu) wrote:
  14. : This is a consolidated attempt to address some of the points
  15. : people have been bringing up about stack-based architectures.
  16. : It's written from the point of view who has actually
  17. : made a living designing and selling them (first with
  18. : WISC Technologies, later with Harris Semiconductor RTX family).
  19. : PIPELINING
  20. : Stack processors don't need to be pipelined for ALU & 
  21. : operands, because the operands are immediately available
  22. : in the top of stack buffer registers.  Access to the on-CPU
  23.  
  24. Pipelining is required for maximum performance but I do not foresee any
  25. special problems with implementing stack based pipelined operations.
  26. Just use invisilbe registers, and better still multiple stack architecture.
  27. It is extremely attractive to me in DSP applications where lists are the
  28. most common data structures used.
  29.  
  30. : embedded control it matters a lot, especially when you're limited
  31. Refer to another posting on why code size is till important for the ultimate
  32. performance. Basically it is the cache bottle-neck that I observe in 
  33. current microprocessors running only still relatively simple programs.
  34.  
  35. : COMPILERS
  36. : Stack compilers aren't currently very efficient -- but
  37. : that's because no-one has really tried all that hard.
  38. : I've published an algorithm and experimental results that
  39. : suggest that stacks can be made about as efficient as
  40. : registers in terms of keeping local variables at the
  41. : top level of the memory hierarchy.  The work is based on GNU C 
  42. : intermediate code (P. Koopman, A Preliminary
  43. : Exploration of Optimized Stack Code Generation, 1992
  44. : Rochester Forth Conference, in press; uuencoded postscript
  45. : copy of paper available upon request).
  46. : I'm currently working (at hobby level) on a GNU C stack-based compiler 
  47. : that will generate very compact code.  Of course, one could
  48. : always argue that trying to map C to a stack machine will
  49. : necessarily be less efficient than mapping a stack-friendly
  50. : language such as Forth to a stack machine.  The issue starts
  51. : to have more to do with marketing than technology, but
  52. : seems like a neat challenge.
  53.  
  54. I have not tried this yet but from my experience writing a "sissy
  55. compiler", I  notice that my intermediate data structure is a linked list.
  56. It may not be optimal but it is not optimal becaue the input is not 
  57. optimal.
  58.     After all the compiler just generate what we ask it to do.
  59.  
  60. The optimisation should be done at the source code level.
  61.  
  62. I also observe that the advantages of the 3 address opcode is exaggerated.
  63. When I look at a "convolution code fragment", I do not recall any 3 address
  64. instruction genereated by GCC for sparc.
  65.  
  66. What is the point of providing a 3 address when 99% of the cases need only
  67. 2 address? Tanenbaum had written a paper analysing the frequencies of the
  68. number of operands.
  69.     I do not pay particular attention because it is too dependent on the
  70. test programs.
  71.  
  72. Someone will say that "convolution code is not frequent".
  73. You can think of it as operations on link lists.
  74.     Isn't that a very common operation. Of course it can be substituted
  75. by the 3 address instructions, but isn't it more natural to use a special
  76. stack machine for it?
  77.  
  78. I'm posting this article because I could be dead wrong. I'll try to
  79. read Kopman's paper but I doubt it will address my suspicions.
  80.  
  81. Any comment is most appreciated.
  82. : APPLICATIONS
  83. : Overall, I'd say stack machines are now an excellent fit
  84. : for high performance in a low cost system (not necessarily
  85. : highest performance given unlimited cost).  They should do
  86. : especially well in embedded applications.  
  87. I believe you could be wrong. the T9000 is nothing compared to better 
  88. designed stack machines.
  89.     It is only waiting for better compilers and architectures. Admittedluy
  90. it is harder but may be worth it to overcome the von-neuman limitations,
  91. or rather optimizations of bandwidth.
  92.  
  93. --
  94. Othman bin Ahmad, School of EEE,
  95. Nanyang Technological University, Singapore 2263.
  96. Internet Email: eoahmad@ntuix.ntu.ac.sg
  97. Bitnet Email: eoahmad@ntuvax.bitnet
  98.