>>>>> "NI" == Nick Ing-Simmons <[EMAIL PROTECTED]> writes:

  NI> Uri Guttman <[EMAIL PROTECTED]> writes:

  >> but indexing directly into a stack frame is effectively a register
  >> window. the problem is that you need to do an indirection through the
  >> window base for every access and that is slow in software (but free in
  >> hardware).

  NI> It isn't free in hardware either, but cost may be lower.  Modern
  NI> machines should be able to schedule indirection fairly
  NI> efficiently.  But I would contend we are going to have at least
  NI> one index operation anyway - if only from the "thread" pointer, or
  NI> "global base" - so with careful design so that "registers" are at
  NI> right "offset" from the "base" we can subsume the register lookup
  NI> index into that.

  NI> i.e. 
  NI>      R4 = frame[N]
  NI> is same cost as
  NI>      R4 = per_thread[N]
  NI> and about the same as
  NI>      extern REGISTER GlobalRegs4     
  NI>      R4 = GlobalRegs4;

well, if there is no multithreading then you don't need the per_thread
lookup. and the window base is not accounted for. you would need 2
indirections, the first to get the window base and the second to get the
register in that window. i am just saying register windows don't seem to
be any win for us and cost an extra indirection for each data access. my
view is let the compiler keep track of the register usage and just do
individual push/pops as needed when registers run out.

uri

-- 
Uri Guttman  ---------  [EMAIL PROTECTED]  ----------  http://www.sysarch.com
SYStems ARCHitecture and Stem Development ------ http://www.stemsystems.com
Learn Advanced Object Oriented Perl from Damian Conway - Boston, July 10-11
Class and Registration info:     http://www.sysarch.com/perl/OOP_class.html

Reply via email to