#include "libvex.h" // LibVEX_Init
#include "guest_s390_defs.h" // disInstr_S390
#include "host_s390_defs.h" // s390_host_hwcaps
-#include "main_globals.h" // vex_traceflags
+#include "main_globals.h" // vex_init_done
+#include "s390_disasm.h"
/* Some VEX header defines this. Need to get rid of it before
including standard headers. */
LibVEX_default_VexControl(&vcon);
LibVEX_Init(vex_exit, vex_put_string, 0, &vcon);
- /* Enable disassembly. */
- vex_traceflags = VEX_TRACE_FE;
-
/* Pretend all hardware extensions are available to avoid running
into an emulation failure */
s390_host_hwcaps = VEX_HWCAPS_S390X_ALL;
*spec_exc = 1;
}
- if (last_vex_string) {
- /* Compress a sequence of spaces with a single blank. */
- int space_seen = 0;
- char *p, *q;
- for (p = q = last_vex_string; *p; ++p) {
- if (isspace(*p)) {
- if (space_seen) continue;
- space_seen = 1;
- } else {
- space_seen = 0;
- }
- *q++ = *p;
- }
- *q = '\0';
- }
-
- return last_vex_string;
+ return s390_disasm(codebuf, /* padmnm */ 0);
}