The logic that drove basic block to IR disassembly had been duplicated
over the 3 front ends (x86, amd64, ppc32).  Given the need to take
into account basic block chasing, adding of instruction marks, etc,
the logic is not completely straightforward, and so commoning it up is
a good thing.



git-svn-id: svn://svn.valgrind.org/vex/trunk@1247 8f6e269a-dfd6-0310-a8e1-e2731360e62c
diff --git a/test_main.c b/test_main.c
index 854dbbf..dc5f054 100644
--- a/test_main.c
+++ b/test_main.c
@@ -66,7 +66,7 @@
    VexTranslateResult tres;
    VexControl vcon;
    VexGuestExtents vge;
-   VexArchInfo vai;
+   VexArchInfo vai_x86, vai_amd64, vai_ppc32;
 
    if (argc != 2) {
       fprintf(stderr, "usage: vex file.org\n");
@@ -123,29 +123,31 @@
          origbuf[i] = (UChar)u;
       }
 
-      LibVEX_default_VexArchInfo(&vai);
-      vai.subarch = VexSubArchX86_sse1;
+      LibVEX_default_VexArchInfo(&vai_x86);
+      vai_x86.subarch = VexSubArchX86_sse1;
+
+      LibVEX_default_VexArchInfo(&vai_amd64);
+      vai_amd64.subarch = VexSubArch_NONE;
+
+      LibVEX_default_VexArchInfo(&vai_ppc32);
+      vai_ppc32.subarch = VexSubArchPPC32_AV;
+      vai_ppc32.ppc32_cache_line_szB = 128;
 
       for (i = 0; i < TEST_N_ITERS; i++)
          tres
             = LibVEX_Translate ( 
-#if 0 /* ppc32 -> ppc32 */
-                 VexArchPPC32, VexSubArchPPC32_noAV,
-                 VexArchPPC32, VexSubArchPPC32_noAV,
-#endif
-#if 0 /* ppc32 -> x86 */
-                 VexArchPPC32, VexSubArchPPC32_noAV,
-                 VexArchX86, VexSubArchX86_sse2,
+#if 1 /* ppc32 -> ppc32 */
+                 VexArchPPC32, &vai_ppc32,
+                 VexArchPPC32, &vai_ppc32,
 #endif
 #if 0 /* amd64 -> amd64 */
-                 VexArchAMD64, VexSubArch_NONE, 
-                 VexArchAMD64, VexSubArch_NONE, 
+                 VexArchAMD64, &vai_amd64, 
+                 VexArchAMD64, &vai_amd64, 
 #endif
-#if 1 /* x86 -> x86 */
-                 VexArchX86, &vai, 
-                 VexArchX86, &vai, 
+#if 0 /* x86 -> x86 */
+                 VexArchX86, &vai_x86, 
+                 VexArchX86, &vai_x86, 
 #endif
-
                  origbuf, (Addr64)orig_addr, chase_into_not_ok,
                  &vge,
                  transbuf, N_TRANSBUF, &trans_used,