|
From: <sv...@va...> - 2012-08-26 04:23:17
|
florian 2012-08-26 05:23:08 +0100 (Sun, 26 Aug 2012)
New Revision: 12902
Log:
On s390: detect presence of stckf hardware facility.
Modified files:
trunk/coregrind/m_machine.c
Modified: trunk/coregrind/m_machine.c (+12 -6)
===================================================================
--- trunk/coregrind/m_machine.c 2012-08-26 04:24:01 +01:00 (rev 12901)
+++ trunk/coregrind/m_machine.c 2012-08-26 05:23:08 +01:00 (rev 12902)
@@ -1117,7 +1117,7 @@
vki_sigaction_toK_t tmp_sigill_act;
volatile Bool have_LDISP, have_EIMM, have_GIE, have_DFP, have_FGX;
- volatile Bool have_STFLE, have_ETF2, have_ETF3;
+ volatile Bool have_STFLE, have_ETF2, have_ETF3, have_STCKF;
Int r, model;
/* Unblock SIGILL and stash away the old action for that signal */
@@ -1185,12 +1185,14 @@
__asm__ __volatile__(".long 0xb3cd0000" : : : "r0"); /* lgdr r0,f0 */
}
- /* Detect presence of the ETF2-enhancement facility using the
- STFLE insn. Note, that STFLE and ETF2 were introduced at the same
- time, so the absence of STLFE implies the absence of ETF2. */
+ /* Detect presence of certain facilities using the STFLE insn.
+ Note, that these facilities were introduced at the same time or later
+ as STFLE, so the absence of STLFE implies the absence of the facility
+ we're trying to detect. */
have_STFLE = True;
have_ETF2 = False;
have_ETF3 = False;
+ have_STCKF = False;
if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
have_STFLE = False;
} else {
@@ -1204,6 +1206,8 @@
have_ETF2 = True;
if (hoststfle[0] & (1ULL << (63 - 30)))
have_ETF3 = True;
+ if (hoststfle[0] & (1ULL << (63 - 25)))
+ have_STCKF = True;
}
/* Restore signals */
@@ -1220,8 +1224,9 @@
identification yet. Keeping fingers crossed. */
VG_(debugLog)(1, "machine", "machine %d LDISP %d EIMM %d GIE %d DFP %d "
- "FGX %d STFLE %d ETF2 %d ETF3 %d\n", model, have_LDISP, have_EIMM,
- have_GIE, have_DFP, have_FGX, have_STFLE, have_ETF2, have_ETF3);
+ "FGX %d STFLE %d ETF2 %d ETF3 %d STCKF %d\n",
+ model, have_LDISP, have_EIMM, have_GIE, have_DFP, have_FGX,
+ have_STFLE, have_ETF2, have_ETF3, have_STCKF);
vai.hwcaps = model;
if (have_LDISP) {
@@ -1237,6 +1242,7 @@
if (have_ETF2) vai.hwcaps |= VEX_HWCAPS_S390X_ETF2;
if (have_ETF3) vai.hwcaps |= VEX_HWCAPS_S390X_ETF3;
if (have_STFLE) vai.hwcaps |= VEX_HWCAPS_S390X_STFLE;
+ if (have_STCKF) vai.hwcaps |= VEX_HWCAPS_S390X_STCKF;
VG_(debugLog)(1, "machine", "hwcaps = 0x%x\n", vai.hwcaps);
|