extern UInt s390_host_hwcaps;
/* Convenience macros to test installed facilities */
-#define s390_host_has_ldisp \
- (s390_host_hwcaps & (VEX_HWCAPS_S390X_LDISP))
#define s390_host_has_eimm \
(s390_host_hwcaps & (VEX_HWCAPS_S390X_EIMM))
#define s390_host_has_gie \
UInt hwcaps_bit;
HChar name[6];
} hwcaps_list[] = {
- { VEX_HWCAPS_S390X_LDISP, "ldisp" },
{ VEX_HWCAPS_S390X_EIMM, "eimm" },
{ VEX_HWCAPS_S390X_GIE, "gie" },
{ VEX_HWCAPS_S390X_DFP, "dfp" },
}
case VexArchS390X:
- if (! s390_host_has_ldisp)
- invalid_hwcaps(arch, hwcaps,
- "Host does not have long displacement facility.\n");
return;
case VexArchMIPS32:
#define VEX_S390X_MODEL_UNKNOWN 19 /* always last in list */
#define VEX_S390X_MODEL_MASK 0x3F
-#define VEX_HWCAPS_S390X_LDISP (1<<6) /* Long-displacement facility */
#define VEX_HWCAPS_S390X_EIMM (1<<7) /* Extended-immediate facility */
#define VEX_HWCAPS_S390X_GIE (1<<8) /* General-instruction-extension facility */
#define VEX_HWCAPS_S390X_DFP (1<<9) /* Decimal floating point facility */
#define VEX_HWCAPS_S390X_MSA9 (1<<30) /* Message-security-assist extension 9 */
/* Special value representing all available s390x hwcaps */
-#define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_LDISP | \
- VEX_HWCAPS_S390X_EIMM | \
+#define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_EIMM | \
VEX_HWCAPS_S390X_GIE | \
VEX_HWCAPS_S390X_DFP | \
VEX_HWCAPS_S390X_FGX | \
vki_sigaction_fromK_t saved_sigill_act;
vki_sigaction_toK_t tmp_sigill_act;
- volatile Bool have_LDISP, have_STFLE;
+ volatile Bool have_STFLE;
Int i, r, model;
/* If the model is "unknown" don't treat this as an error. Assume
/* Determine hwcaps. Note, we cannot use the stfle insn because it
is not supported on z900. */
- have_LDISP = True;
- if (VG_MINIMAL_SETJMP(env_unsup_insn)) {
- have_LDISP = False;
- } else {
- /* BASR loads the address of the next insn into r1. Needed to avoid
- a segfault in XY. */
- __asm__ __volatile__("basr %%r1,%%r0\n\t"
- ".long 0xe3001000\n\t" /* XY 0,0(%r1) */
- ".short 0x0057" : : : "r0", "r1", "cc", "memory");
- }
-
/* Check availability of STFLE. If available store facility bits
in hoststfle. */
ULong hoststfle[S390_NUM_FACILITY_DW];
vai.hwcaps = model;
if (have_STFLE) vai.hwcaps |= VEX_HWCAPS_S390X_STFLE;
- if (have_LDISP) {
- /* Use long displacement only on machines >= z990. For all other
- machines it is millicoded and therefore slow. */
- if (model >= VEX_S390X_MODEL_Z990)
- vai.hwcaps |= VEX_HWCAPS_S390X_LDISP;
- }
/* Detect presence of certain facilities using the STFLE insn.
Note, that these facilities were introduced at the same time or later
UInt hwcaps_bit;
const HChar name[6]; // may need adjustment for new facility names
} fac_hwcaps[] = {
- { False, 18, VEX_HWCAPS_S390X_LDISP, "LDISP" },
{ False, 21, VEX_HWCAPS_S390X_EIMM, "EIMM" },
{ False, 34, VEX_HWCAPS_S390X_GIE, "GIE" },
{ False, 42, VEX_HWCAPS_S390X_DFP, "DFP" },
case VexArchARM64: return 0;
case VexArchPPC32: return 0;
case VexArchPPC64: return 0;
- case VexArchS390X: return VEX_HWCAPS_S390X_LDISP;
+ case VexArchS390X: return 0;
#if (__mips_isa_rev>=6)
case VexArchMIPS32: return VEX_PRID_COMP_MIPS | VEX_MIPS_CPU_ISA_M32R6 |
VEX_MIPS_HOST_FR;
match = facilities[0] & FAC_BIT(0);
} else if (strcmp(feature, "s390x-stfle") == 0 ) {
match = facilities[0] & FAC_BIT(7);
- } else if (strcmp(feature, "s390x-ldisp") == 0 ) {
- match = (facilities[0] & FAC_BIT(18)) && (facilities[0] & FAC_BIT(19));
} else if (strcmp(feature, "s390x-eimm") == 0 ) {
match = facilities[0] & FAC_BIT(21);
} else if (strcmp(feature, "s390x-genins") == 0 ) {