From: Florian Krohm Date: Thu, 5 Feb 2026 18:03:05 +0000 (+0000) Subject: s390: disasm-test: use s390_disasm X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ac1fdea5812d2214087f9045482eafe5f981301f;p=thirdparty%2Fvalgrind.git s390: disasm-test: use s390_disasm No need to capture the disassembled insn from a tracing side effect. Call s390_disasm directly with mnemonic-padding disabled. --- diff --git a/none/tests/s390x/disasm-test/vex.c b/none/tests/s390x/disasm-test/vex.c index 3e98aa3b6..32383e7ac 100644 --- a/none/tests/s390x/disasm-test/vex.c +++ b/none/tests/s390x/disasm-test/vex.c @@ -26,7 +26,8 @@ #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. */ @@ -98,9 +99,6 @@ vex_init(void) 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; @@ -147,21 +145,5 @@ vex_disasm(const unsigned char *codebuf, int *spec_exc) *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); }