]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
fix early initialization of s390_host_hwcaps in LibVEX_FrontEnd
authorPetar Jovanovic <mips32r2@gmail.com>
Wed, 12 Apr 2017 17:51:45 +0000 (17:51 +0000)
committerPetar Jovanovic <mips32r2@gmail.com>
Wed, 12 Apr 2017 17:51:45 +0000 (17:51 +0000)
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

index f658ed8372750d6f1482704936af15c78813620b..8c4845e72ad31b773f4c348b2636017970ef7407 100644 (file)
@@ -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);