|
From: Florian K. <fk...@so...> - 2025-11-25 13:24:25
|
https://sourceware.org/cgit/valgrind/commit/?id=ccbd64548f15918f04ee5ac852de6ad5fa87b6b6 commit ccbd64548f15918f04ee5ac852de6ad5fa87b6b6 Author: Florian Krohm <fl...@ei...> Date: Tue Nov 25 13:23:52 2025 +0000 s390: load/store-on-condition / high-word facility related cleanups (BZ 509562) The load/store-on-condition / high-word facility is always present on the supported machines. - Remove VEX_HWCAPS_S390X_LSC and s390_host_has_lsc - Update tests/s390x_features.c and none/tests/s390x/high-word Part of fixing https://bugs.kde.org/show_bug.cgi?id=509562 Diff: --- VEX/priv/host_s390_defs.c | 3 +-- VEX/priv/host_s390_defs.h | 2 -- VEX/priv/main_main.c | 1 - VEX/pub/libvex.h | 4 +--- coregrind/m_machine.c | 1 - none/tests/s390x/high-word.vgtest | 1 - tests/s390x_features.c | 2 -- 7 files changed, 2 insertions(+), 12 deletions(-) diff --git a/VEX/priv/host_s390_defs.c b/VEX/priv/host_s390_defs.c index 948eb977e9..9482193425 100644 --- a/VEX/priv/host_s390_defs.c +++ b/VEX/priv/host_s390_defs.c @@ -4950,7 +4950,6 @@ s390_emit_SRXT(UChar *p, UChar r3, UChar r1, UChar r2) static UChar * s390_emit_LOCGR(UChar *p, UChar m3, UChar r1, UChar r2) { - vassert(s390_host_has_lsc); if (UNLIKELY(vex_traceflags & VEX_TRACE_ASM)) S390_DISASM(XMNM("locgr", cls_disasm), GPR(r1), GPR(r2), MASK(m3)); @@ -9614,7 +9613,7 @@ s390_insn_cond_move_emit(UChar *buf, const s390_insn *insn) p = buf; - if (s390_host_has_lsc && hregClass(dst) == HRcInt64) { + if (hregClass(dst) == HRcInt64) { /* LOCx is not the preferred way to implement an unconditional load. */ if (cond == S390_CC_ALWAYS) goto use_branch_insn; diff --git a/VEX/priv/host_s390_defs.h b/VEX/priv/host_s390_defs.h index f62244dcfc..b660b70776 100644 --- a/VEX/priv/host_s390_defs.h +++ b/VEX/priv/host_s390_defs.h @@ -918,8 +918,6 @@ VexInvalRange patchProfInc_S390(VexEndness endness_host, extern UInt s390_host_hwcaps; /* Convenience macros to test installed facilities */ -#define s390_host_has_lsc \ - (s390_host_hwcaps & (VEX_HWCAPS_S390X_LSC)) #define s390_host_has_pfpo \ (s390_host_hwcaps & (VEX_HWCAPS_S390X_PFPO)) #define s390_host_has_vx \ diff --git a/VEX/priv/main_main.c b/VEX/priv/main_main.c index ce6f6bd112..9783d0e313 100644 --- a/VEX/priv/main_main.c +++ b/VEX/priv/main_main.c @@ -1902,7 +1902,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps ) UInt hwcaps_bit; HChar name[6]; } hwcaps_list[] = { - { VEX_HWCAPS_S390X_LSC, "lsc" }, { VEX_HWCAPS_S390X_PFPO, "pfpo" }, { VEX_HWCAPS_S390X_VX, "vx" }, { VEX_HWCAPS_S390X_MSA5, "msa5" }, diff --git a/VEX/pub/libvex.h b/VEX/pub/libvex.h index 90fc9e39d5..3fcecd00fd 100644 --- a/VEX/pub/libvex.h +++ b/VEX/pub/libvex.h @@ -162,7 +162,6 @@ typedef #define VEX_S390X_MODEL_UNKNOWN 19 /* always last in list */ #define VEX_S390X_MODEL_MASK 0x3F -#define VEX_HWCAPS_S390X_LSC (1<<16) /* Conditional load/store facility */ #define VEX_HWCAPS_S390X_PFPO (1<<17) /* Perform floating point ops facility */ #define VEX_HWCAPS_S390X_VX (1<<18) /* Vector facility */ #define VEX_HWCAPS_S390X_MSA5 (1<<19) /* Message-security-assistance facility 5 */ @@ -177,8 +176,7 @@ typedef #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_LSC | \ - VEX_HWCAPS_S390X_PFPO | \ +#define VEX_HWCAPS_S390X_ALL (VEX_HWCAPS_S390X_PFPO | \ VEX_HWCAPS_S390X_VX | \ VEX_HWCAPS_S390X_MSA5 | \ VEX_HWCAPS_S390X_MI2 | \ diff --git a/coregrind/m_machine.c b/coregrind/m_machine.c index b25358ba07..e285ec3d39 100644 --- a/coregrind/m_machine.c +++ b/coregrind/m_machine.c @@ -1565,7 +1565,6 @@ Bool VG_(machine_get_hwcaps)( void ) UInt hwcaps_bit; const HChar name[6]; // may need adjustment for new facility names } fac_hwcaps[] = { - { False, 45, VEX_HWCAPS_S390X_LSC, "LSC" }, { False, 44, VEX_HWCAPS_S390X_PFPO, "PFPO" }, { False, 129, VEX_HWCAPS_S390X_VX, "VX" }, { False, 57, VEX_HWCAPS_S390X_MSA5, "MSA5" }, diff --git a/none/tests/s390x/high-word.vgtest b/none/tests/s390x/high-word.vgtest index 7c4293783a..ca27517f89 100644 --- a/none/tests/s390x/high-word.vgtest +++ b/none/tests/s390x/high-word.vgtest @@ -1,2 +1 @@ prog: high-word -prereq: ../../../tests/s390x_features 's390x-highw' diff --git a/tests/s390x_features.c b/tests/s390x_features.c index fa96ee8f4d..dc91ab549e 100644 --- a/tests/s390x_features.c +++ b/tests/s390x_features.c @@ -233,8 +233,6 @@ static int go(char *feature, char *cpu) match = facilities[0] & FAC_BIT(35); } else if (strcmp(feature, "s390x-pfpo") == 0 ) { match = facilities[0] & FAC_BIT(44); - } else if (strcmp(feature, "s390x-highw") == 0 ) { - match = facilities[0] & FAC_BIT(45); } else if (strcmp(feature, "s390x-vx") == 0 ) { /* VX needs kernel support; thus check the appropriate HWCAP bit. */ match = GET_HWCAP() & 0x800; |