Review Board 2.0.15

Power: Provide a utility function to copy registers from one thread context

Review Request #35 - Created July 9, 2010 and submitted

Timothy Jones
Power: Provide a utility function to copy registers from one thread context
to another in the Power ISA.

Posted (July 10, 2010, 1:29 a.m.)
It looks like this is identical to the Alpha version of this code, and is probably the right piece of code to replace the "panic unimplemented" version in every other ISA except SPARC.  I'm guessing this is a can of worms that Timothy did not intend to open, but it seems like we should have a mechanism for having some common implementations of utility functions like this that can get overridden as necessary... say some sort of ISAUtility class with virtual functions.  I have not kept up with the details of the evolution of the ISA code (maybe Gabe is the only one who really knows all the ins and outs anymore?).

I'm also partly prompted by recent experience with overly zealous code replication in other areas... there used to be a default argsInit() method in LiveProcess that had a pretty generic stack setup, but then as minor tweaks were needed for different ISAs, we ended up with each ISA having its own copy, with about 90%+ similarity across the versions, and no one was calling the default version anymore.  It would be nice if people would find ways to add hooks to common pieces of code to do just the specialization they need rather than copy-and-pasting large functions just so they can change a couple of lines.  (That was a general rant, not directed at you, Timothy.)
Posted (July 21, 2010, 5:09 p.m.)

src/arch/power/ (Diff revision 1)
Do we really need all these copyrights here? We can imagine it was copied from the Alpha implementation instead and just leave the UM one there. I'll file a bug in flyspray against myself to create a generic ISA directory for this sort of thing.