From: Petar Jovanovic Date: Wed, 12 Apr 2017 17:51:45 +0000 (+0000) Subject: fix early initialization of s390_host_hwcaps in LibVEX_FrontEnd X-Git-Tag: svn/VALGRIND_3_13_0^2~33 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=95c019d0005090901f30220da6c207d2895014dc;p=thirdparty%2Fvalgrind.git fix early initialization of s390_host_hwcaps in LibVEX_FrontEnd This is a follow-up to r3341 and r3344. r3341 split LibVEX_Translate into LibVEX_FrontEnd and LibVEX_BackEnd. s390_host_hwcaps needs to be initialized early when arch_host is VexArchS390X. This also fixes none/tests/libvexmultiarch_test on MIPS64 BE platforms. git-svn-id: svn://svn.valgrind.org/vex/trunk@3348 --- diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index f658ed8372..8c4845e72a 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -362,6 +362,11 @@ IRSB* LibVEX_FrontEnd ( /*MOD*/ VexTranslateArgs* vta, vex_traceflags = vta->traceflags; + /* KLUDGE: export hwcaps. */ + if (vta->arch_host == VexArchS390X) { + s390_host_hwcaps = vta->archinfo_host.hwcaps; + } + /* First off, check that the guest and host insn sets are supported. */ @@ -438,9 +443,6 @@ IRSB* LibVEX_FrontEnd ( /*MOD*/ VexTranslateArgs* vta, break; case VexArchS390X: - /* KLUDGE: export hwcaps. */ - s390_host_hwcaps = vta->archinfo_host.hwcaps; - preciseMemExnsFn = S390FN(guest_s390x_state_requires_precise_mem_exns); disInstrFn = S390FN(disInstr_S390);