]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Export s390_host_hwcaps in LibVEX_Translate, so we can use it in
authorFlorian Krohm <florian@eich-krohm.de>
Mon, 8 Dec 2014 12:42:26 +0000 (12:42 +0000)
committerFlorian Krohm <florian@eich-krohm.de>
Mon, 8 Dec 2014 12:42:26 +0000 (12:42 +0000)
are_valid_hwcaps.

git-svn-id: svn://svn.valgrind.org/vex/trunk@3033

VEX/priv/host_s390_defs.c
VEX/priv/host_s390_isel.c
VEX/priv/main_main.c

index f358a950debb2a3c5b87e0df3a9b8f97b34f6da0..05990097769c260ddae738f43f98d036c3324dcf 100644 (file)
@@ -48,8 +48,7 @@
    code. But that info is not passed to emit_S390Instr. Only mode64 is
    being passed. So, ideally, we want this passed as an argument, too.
    Until then, we use a global variable. This variable is set as a side
-   effect of iselSB_S390. This is safe because instructions are selected
-   before they are emitted. */
+   effect of LibVEX_Translate. */
 UInt s390_host_hwcaps;
 
 
index fc320144e1077f53b3f86ab61e31547429576d46..8317e6774561b8c0b85d91f1786a9b7b45ecaa0b 100644 (file)
@@ -4060,9 +4060,6 @@ iselSB_S390(IRSB *bb, VexArch arch_host, const VexArchInfo *archinfo_host,
    ISelEnv *env;
    UInt     hwcaps_host = archinfo_host->hwcaps;
 
-   /* KLUDGE: export hwcaps. */
-   s390_host_hwcaps = hwcaps_host;
-
    /* Do some sanity checks */
    vassert((VEX_HWCAPS_S390X(hwcaps_host) & ~(VEX_HWCAPS_S390X_ALL)) == 0);
 
index 175c6137fcd150215bf864e2936a7a2c314b1756..905b9eef4a3b6294e79fbce315b2e41adf2862aa 100644 (file)
@@ -369,6 +369,8 @@ VexTranslateResult LibVEX_Translate ( VexTranslateArgs* vta )
 
       case VexArchS390X:
          mode64      = True;
+         /* KLUDGE: export hwcaps. */
+         s390_host_hwcaps = vta->archinfo_host.hwcaps;
          getAllocableRegs_S390 ( &n_available_real_regs,
                                  &available_real_regs, mode64 );
          isMove       = (__typeof__(isMove)) isMove_S390Instr;