Sparc branch updates

Merges recent updates to develop into the SPARC branch, fixing a couple of conflicts on the way.

Also adds in my test harness changes to allow testing under valgrind and qemu frameworks.