]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
s390: load/store-on-condition / high-word facility related cleanups (BZ 509562)
authorFlorian Krohm <flo2030@eich-krohm.de>
Tue, 25 Nov 2025 13:23:52 +0000 (13:23 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Tue, 25 Nov 2025 13:23:52 +0000 (13:23 +0000)
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

VEX/priv/host_s390_defs.c
VEX/priv/host_s390_defs.h
VEX/priv/main_main.c
VEX/pub/libvex.h
coregrind/m_machine.c
none/tests/s390x/high-word.vgtest
tests/s390x_features.c

index 948eb977e9aecad4568a7319becef1a5d3a450a8..94821934250d1b4d85ec816ae31030e08e3c3b51 100644 (file)
@@ -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;
 
index f62244dcfc7be1a4c5ae3a3e59485b53eac05ffd..b660b70776289738f4ba1b409bc13ba13f041301 100644 (file)
@@ -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 \
index ce6f6bd112ca5dee7f56276667352a7bbbc2a1a6..9783d0e3137b490a07fca50a4c56653bd3d183dc 100644 (file)
@@ -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" },
index 90fc9e39d5cd560cfd813a32071c88de4f69f8ab..3fcecd00fdca602d4f3e50432c12dab07bd66bad 100644 (file)
@@ -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   | \
index b25358ba07bd6123a4015112876e7cb25ff30c3b..e285ec3d39055257f0786cd194cdaf973ef0a399 100644 (file)
@@ -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"  },
index 7c4293783acecb803ec1f321cf314e01ee6152bc..ca27517f8919622ddb0c0d970a24a8f50eea13c7 100644 (file)
@@ -1,2 +1 @@
 prog: high-word
-prereq: ../../../tests/s390x_features 's390x-highw'
index fa96ee8f4d075f81ce5e46dcec61ae1dee3bcc60..dc91ab549efc97d464ed66c5ca882e2c9bce3ba2 100644 (file)
@@ -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;