From: Florian Krohm Date: Mon, 24 Nov 2025 17:56:44 +0000 (+0000) Subject: s390: MSA4 facility related cleanups (BZ 509562) X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=232bb62ce8020e915c75587e13ca7f5f55ca884c;p=thirdparty%2Fvalgrind.git s390: MSA4 facility related cleanups (BZ 509562) The message-security-assist-extension-4 facility is always present on the supported machines. - Remove VEX_HWCAPS_S390X_MSA4 and s390_host_has_msa4 - Remove EmFail_S390X_msa4 Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 --- diff --git a/VEX/priv/guest_s390_toIR.c b/VEX/priv/guest_s390_toIR.c index 463f389df..58656966f 100644 --- a/VEX/priv/guest_s390_toIR.c +++ b/VEX/priv/guest_s390_toIR.c @@ -20142,10 +20142,6 @@ s390_irgen_KMAC(UChar r1, UChar r2) static const HChar * s390_irgen_PCC(void) { - if (! s390_host_has_msa4) { - emulation_failure(EmFail_S390X_msa4); - return "pcc"; - } extension(S390_EXT_PCC, 0); return "pcc"; } @@ -20153,10 +20149,6 @@ s390_irgen_PCC(void) static const HChar * s390_irgen_KMCTR(UChar r3, UChar r1, UChar r2) { - if (! s390_host_has_msa4) { - emulation_failure(EmFail_S390X_msa4); - return "kmctr"; - } s390_insn_assert("kmctr", r1 % 2 == 0 && r1 != 0 && r2 % 2 == 0 && r2 != 0 && r3 % 2 == 0 && r3 != 0); extension(S390_EXT_KMCTR, r1 | (r2 << 4) | (r3 << 8)); @@ -20166,10 +20158,6 @@ s390_irgen_KMCTR(UChar r3, UChar r1, UChar r2) static const HChar * s390_irgen_KMO(UChar r1, UChar r2) { - if (! s390_host_has_msa4) { - emulation_failure(EmFail_S390X_msa4); - return "kmo"; - } s390_insn_assert("kmo", r1 != 0 && r1 % 2 == 0 && r2 != 0 && r2 % 2 == 0); extension(S390_EXT_KMO, r1 | (r2 << 4)); return "kmo"; @@ -20178,10 +20166,6 @@ s390_irgen_KMO(UChar r1, UChar r2) static const HChar * s390_irgen_KMF(UChar r1, UChar r2) { - if (! s390_host_has_msa4) { - emulation_failure(EmFail_S390X_msa4); - return "kmf"; - } s390_insn_assert("kmf", r1 != 0 && r1 % 2 == 0 && r2 != 0 && r2 % 2 == 0); extension(S390_EXT_KMF, r1 | (r2 << 4)); return "kmf"; diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index da0e2553e..c668a182c 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -952,8 +952,6 @@ extern UInt s390_host_hwcaps; (s390_host_hwcaps & (VEX_HWCAPS_S390X_VXD)) #define s390_host_has_msa \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_MSA)) -#define s390_host_has_msa4 \ - (s390_host_hwcaps & (VEX_HWCAPS_S390X_MSA4)) #define s390_host_has_msa8 \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_MSA8)) #define s390_host_has_msa9 \ diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index 1cdbd1b4b..05937d32f 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -1581,10 +1581,6 @@ const HChar* LibVEX_EmNote_string ( VexEmNote ew ) return "Encountered an instruction that requires the message-security" " assist.\n" " That assist is not available on this host"; - case EmFail_S390X_msa4: - return "Encountered an instruction that requires the" - " message-security-assist extension 4.\n" - " That extension is not available on this host"; case EmFail_S390X_msa8: return "Encountered an instruction that requires the" " message-security-assist extension 8.\n" @@ -1927,7 +1923,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps ) { VEX_HWCAPS_S390X_VXE2, "vxe2" }, { VEX_HWCAPS_S390X_VXD, "vxd" }, { VEX_HWCAPS_S390X_MSA, "msa" }, - { VEX_HWCAPS_S390X_MSA4, "msa4" }, { VEX_HWCAPS_S390X_MSA8, "msa8" }, { VEX_HWCAPS_S390X_MSA9, "msa9" }, }; diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index a1db9dbf6..4ff407c1e 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -179,7 +179,6 @@ typedef #define VEX_HWCAPS_S390X_VXE2 (1<<25) /* Vector-enhancements facility 2 */ #define VEX_HWCAPS_S390X_VXD (1<<26) /* Vector packed-decimal facility */ #define VEX_HWCAPS_S390X_MSA (1<<27) /* Message-security assist */ -#define VEX_HWCAPS_S390X_MSA4 (1<<28) /* Message-security-assist extension 4 */ #define VEX_HWCAPS_S390X_MSA8 (1<<29) /* Message-security-assist extension 8 */ #define VEX_HWCAPS_S390X_MSA9 (1<<30) /* Message-security-assist extension 9 */ @@ -201,7 +200,6 @@ typedef VEX_HWCAPS_S390X_VXE2 | \ VEX_HWCAPS_S390X_VXD | \ VEX_HWCAPS_S390X_MSA | \ - VEX_HWCAPS_S390X_MSA4 | \ VEX_HWCAPS_S390X_MSA8 | \ VEX_HWCAPS_S390X_MSA9) diff --git a/VEX/pub/libvex_emnote.h b/VEX/pub/libvex_emnote.h index 8e0fc1349..3f5821d52 100644 --- a/VEX/pub/libvex_emnote.h +++ b/VEX/pub/libvex_emnote.h @@ -134,10 +134,6 @@ typedef this host */ EmFail_S390X_msa, - /* insn needs message-security-assist extension 4 which is not available - on this host */ - EmFail_S390X_msa4, - /* insn needs message-security-assist extension 8 which is not available on this host */ EmFail_S390X_msa8, diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index 4690163f4..cdb0ca9a9 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1582,7 +1582,6 @@ Bool VG_(machine_get_hwcaps)( void ) { False, 148, VEX_HWCAPS_S390X_VXE2, "VXE2" }, { False, 134, VEX_HWCAPS_S390X_VXD, "VXD" }, { False, 17, VEX_HWCAPS_S390X_MSA, "MSA" }, - { False, 77, VEX_HWCAPS_S390X_MSA4, "MSA4" }, { False, 146, VEX_HWCAPS_S390X_MSA8, "MSA8" }, { False, 155, VEX_HWCAPS_S390X_MSA9, "MSA9" }, };