Changes to make function wrapping work better on ppc64-linux:

- when recording the non-redirected address in guest_NRADDR, also
  snapshot the current R2 value, as that will be needed to run the
  original safely

- As a consequence, the original-function information extracted by
  VALGRIND_GET_ORIG_FN is different on ppc64-linux (2 words) from
  all other platforms (1 word).  So change the type of it from
  void* to a new type OrigFn which can be defined differently for
  each platform.

- Change the CALL_FN_* macros for ppc64-linux to save/restore
  R2 values appropriately.

- ppc64-linux: detect overflow/underflow of the redirect stack
  and bring Valgrind to a halt if this happens

- Update VG_CLREQ_SZB for ppc32/64 (was out of date).





git-svn-id: svn://svn.valgrind.org/valgrind/trunk@5569 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/include/pub_tool_machine.h b/include/pub_tool_machine.h
index 67c65f0..ff54997 100644
--- a/include/pub_tool_machine.h
+++ b/include/pub_tool_machine.h
@@ -45,12 +45,12 @@
 #elif defined(VGA_ppc32)
 #  define VG_MIN_INSTR_SZB          4
 #  define VG_MAX_INSTR_SZB          4 
-#  define VG_CLREQ_SZB             24
+#  define VG_CLREQ_SZB             20
 #  define VG_STACK_REDZONE_SZB      0
 #elif defined(VGA_ppc64)
 #  define VG_MIN_INSTR_SZB          4
 #  define VG_MAX_INSTR_SZB          4 
-#  define VG_CLREQ_SZB             24
+#  define VG_CLREQ_SZB             20
 #  define VG_STACK_REDZONE_SZB    288  // number of addressable bytes below R1
                                        // from 64-bit PowerPC ELF ABI Supplement 1.7
 #else