Merge r6127: Extend for AIX5.  Nothing surprising here.


git-svn-id: svn://svn.valgrind.org/valgrind/trunk@6264 a5019735-40e9-0310-863c-91ae7b9d1cf9
diff --git a/include/pub_tool_machine.h b/include/pub_tool_machine.h
index 3648de9..9ed8ec5 100644
--- a/include/pub_tool_machine.h
+++ b/include/pub_tool_machine.h
@@ -31,30 +31,45 @@
 #ifndef __PUB_TOOL_MACHINE_H
 #define __PUB_TOOL_MACHINE_H
 
-#if defined(VGA_x86)
+#if defined(VGP_x86_linux)
 #  define VG_MIN_INSTR_SZB          1  // min length of native instruction
 #  define VG_MAX_INSTR_SZB         16  // max length of native instruction
 #  define VG_CLREQ_SZB             14  // length of a client request, may
                                        //   be larger than VG_MAX_INSTR_SZB
 #  define VG_STACK_REDZONE_SZB      0  // number of addressable bytes below %RSP
-#elif defined(VGA_amd64)
+#elif defined(VGP_amd64_linux)
 #  define VG_MIN_INSTR_SZB          1
 #  define VG_MAX_INSTR_SZB         16
 #  define VG_CLREQ_SZB             19
 #  define VG_STACK_REDZONE_SZB    128
-#elif defined(VGA_ppc32)
+#elif defined(VGP_ppc32_linux)
 #  define VG_MIN_INSTR_SZB          4
 #  define VG_MAX_INSTR_SZB          4 
 #  define VG_CLREQ_SZB             20
 #  define VG_STACK_REDZONE_SZB      0
-#elif defined(VGA_ppc64)
+#elif defined(VGP_ppc64_linux)
 #  define VG_MIN_INSTR_SZB          4
 #  define VG_MAX_INSTR_SZB          4 
 #  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
+#elif defined(VGP_ppc32_aix5)
+#  define VG_MIN_INSTR_SZB          4
+#  define VG_MAX_INSTR_SZB          4 
+#  define VG_CLREQ_SZB             20
+   /* The PowerOpen ABI actually says 220 bytes, but that is not an
+      8-aligned number, and frequently forces Memcheck's
+      mc_{new,die}_mem_stack_N routines into slow cases by losing
+      8-alignment of the area to be messed with.  So let's just say
+      224 instead.  Gdb has a similar kludge. */
+#  define VG_STACK_REDZONE_SZB    224
+#elif defined(VGP_ppc64_aix5)
+#  define VG_MIN_INSTR_SZB          4
+#  define VG_MAX_INSTR_SZB          4 
+#  define VG_CLREQ_SZB             20
+#  define VG_STACK_REDZONE_SZB    288 // is this right?
 #else
-#  error Unknown arch
+#  error Unknown platform
 #endif
 
 // Guest state accessors