|
From: <sv...@va...> - 2014-12-08 12:42:34
|
Author: florian
Date: Mon Dec 8 12:42:26 2014
New Revision: 3033
Log:
Export s390_host_hwcaps in LibVEX_Translate, so we can use it in
are_valid_hwcaps.
Modified:
trunk/priv/host_s390_defs.c
trunk/priv/host_s390_isel.c
trunk/priv/main_main.c
Modified: trunk/priv/host_s390_defs.c
==============================================================================
--- trunk/priv/host_s390_defs.c (original)
+++ trunk/priv/host_s390_defs.c Mon Dec 8 12:42:26 2014
@@ -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;
Modified: trunk/priv/host_s390_isel.c
==============================================================================
--- trunk/priv/host_s390_isel.c (original)
+++ trunk/priv/host_s390_isel.c Mon Dec 8 12:42:26 2014
@@ -4060,9 +4060,6 @@
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);
Modified: trunk/priv/main_main.c
==============================================================================
--- trunk/priv/main_main.c (original)
+++ trunk/priv/main_main.c Mon Dec 8 12:42:26 2014
@@ -369,6 +369,8 @@
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;
|