From 95c019d0005090901f30220da6c207d2895014dc Mon Sep 17 00:00:00 2001 From: Petar Jovanovic Date: Wed, 12 Apr 2017 17:51:45 +0000 Subject: [PATCH] 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 --- VEX/priv/main_main.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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); -- 2.47.2