]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
s390: MSA4 facility related cleanups (BZ 509562)
authorFlorian Krohm <flo2030@eich-krohm.de>
Mon, 24 Nov 2025 17:56:44 +0000 (17:56 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Mon, 24 Nov 2025 17:56:44 +0000 (17:56 +0000)
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

VEX/priv/guest_s390_toIR.c
VEX/priv/host_s390_defs.h
VEX/priv/main_main.c
VEX/pub/libvex.h
VEX/pub/libvex_emnote.h
coregrind/m_machine.c

index 463f389dfecd89baaf16f5e7b910a3329eeb009c..58656966ff19221b3589edd259826df15fc23449 100644 (file)
@@ -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";
index da0e2553e3a5b22d5e36b90146a0ac9c462d10dc..c668a182cab68b4227329e980a62365b8050a02e 100644 (file)
@@ -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 \
index 1cdbd1b4b16f22e14aefd71cede621e14d965ef6..05937d32fa82a2deca37e3ff01a75c1e3f857d19 100644 (file)
@@ -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" },
    };
index a1db9dbf6f826238d65deed3a6459cc5a54c6e4e..4ff407c1e280dd77f2d44e884fcdf4bb1c25f6ad 100644 (file)
@@ -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)
 
index 8e0fc1349cb55650bb15f554e976805eb789a495..3f5821d523ee328d894405099b4746e212f01e0b 100644 (file)
@@ -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,
index 4690163f4c319572a84659d4a327f927bed73061..cdb0ca9a947c18ac182432a8770bd900325955ec 100644 (file)
@@ -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"  },
      };