[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: [Gcl-devel] ia64 and garbage collection

>>>>> On 30 Jul 2002 17:11:08 -0400, Camm Maguire <camm@enhanced.com> said:

  Camm> David Mosberger <davidm@napali.hpl.hp.com> writes:

  >> >>>>> On Tue, 30 Jul 2002 13:33:12 -0400, Camm Maguire <camm@enhanced.com> said:

  Camm> 1) Is there a work around, i.e. a way in which I can ensure
  Camm> clearing all registers back to the stack at a certain point in
  Camm> the program?

  David>  A call to getcontext() does have the effect of forcing all
  David> callee-saved (preserved) registers into memory (and the "scratch"
  David> registers won't be live, by virtue of getcontext() being a
  David> regular function call).

  Camm> And thank you for this suggestion!  How does this differ from
  Camm> the flushrs solution?

The difference is that getcontext() also makes sure that all the
callee-saved registers are in memory.  Depending on how your garbage
collector works, you may want one or the other solution.  getcontext()
is arguably a bit safer, as in the worst case, you'll look at the same
pointers twice.  On the other hand, __builtin_flushrs() is faster, if
that's all you need.


Reply to: