]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
s390: message-security-assist facility related cleanups (BZ 509562)
authorFlorian Krohm <flo2030@eich-krohm.de>
Mon, 24 Nov 2025 18:16:22 +0000 (18:16 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Mon, 24 Nov 2025 18:16:22 +0000 (18:16 +0000)
The message-security-assist facility is always present on
the supported machines.
- Remove VEX_HWCAPS_S390X_MSA and s390_host_has_msa
- Remove EmFail_S390X_msa

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 58656966ff19221b3589edd259826df15fc23449..fffd375ded2eb8f93519d0b5f4b81c1e9d2097e4 100644 (file)
@@ -20079,10 +20079,6 @@ s390_irgen_NNPA(void)
 static const HChar *
 s390_irgen_KM(UChar r1, UChar r2)
 {
-   if (! s390_host_has_msa) {
-      emulation_failure(EmFail_S390X_msa);
-      return "km";
-   }
    s390_insn_assert("km", r1 != 0 && r1 % 2 == 0 && r2 != 0 && r2 % 2 == 0);
    extension(S390_EXT_KM, r1 | (r2 << 4));
    return "km";
@@ -20091,10 +20087,6 @@ s390_irgen_KM(UChar r1, UChar r2)
 static const HChar *
 s390_irgen_KMC(UChar r1, UChar r2)
 {
-   if (! s390_host_has_msa) {
-      emulation_failure(EmFail_S390X_msa);
-      return "kmc";
-   }
    s390_insn_assert("kmc", r1 != 0 && r1 % 2 == 0 && r2 != 0 && r2 % 2 == 0);
    extension(S390_EXT_KMC, r1 | (r2 << 4));
    return "kmc";
@@ -20103,10 +20095,6 @@ s390_irgen_KMC(UChar r1, UChar r2)
 static const HChar *
 s390_irgen_KIMD(UChar r1, UChar r2)
 {
-   if (! s390_host_has_msa) {
-      emulation_failure(EmFail_S390X_msa);
-      return "kimd";
-   }
    /* r1 is reserved */
    s390_insn_assert("kimd", r2 != 0 && r2 % 2 == 0);
    extension(S390_EXT_KIMD, r1 | (r2 << 4));
@@ -20116,10 +20104,6 @@ s390_irgen_KIMD(UChar r1, UChar r2)
 static const HChar *
 s390_irgen_KLMD(UChar r1, UChar r2)
 {
-   if (! s390_host_has_msa) {
-      emulation_failure(EmFail_S390X_msa);
-      return "klmd";
-   }
    /* r1 is only used by some functions */
    s390_insn_assert("klmd", r2 != 0 && r2 % 2 == 0);
    extension(S390_EXT_KLMD, r1 | (r2 << 4));
@@ -20129,10 +20113,6 @@ s390_irgen_KLMD(UChar r1, UChar r2)
 static const HChar *
 s390_irgen_KMAC(UChar r1, UChar r2)
 {
-   if (! s390_host_has_msa) {
-      emulation_failure(EmFail_S390X_msa);
-      return "kmac";
-   }
    /* r1 is ignored */
    s390_insn_assert("kmac", r2 != 0 && r2 % 2 == 0);
    extension(S390_EXT_KMAC, r1 | (r2 << 4));
index c668a182cab68b4227329e980a62365b8050a02e..7a5b6f5522ceaefc5e5c7d811dc6fb47f6d67c5b 100644 (file)
@@ -950,8 +950,6 @@ extern UInt s390_host_hwcaps;
                       (s390_host_hwcaps & (VEX_HWCAPS_S390X_VXE2))
 #define s390_host_has_vxd \
                       (s390_host_hwcaps & (VEX_HWCAPS_S390X_VXD))
-#define s390_host_has_msa \
-                      (s390_host_hwcaps & (VEX_HWCAPS_S390X_MSA))
 #define s390_host_has_msa8 \
                       (s390_host_hwcaps & (VEX_HWCAPS_S390X_MSA8))
 #define s390_host_has_msa9 \
index 05937d32fa82a2deca37e3ff01a75c1e3f857d19..22eac293ee8436e3a17079c5659b9b16221f4806 100644 (file)
@@ -1577,10 +1577,6 @@ const HChar* LibVEX_EmNote_string ( VexEmNote ew )
         return "Encountered an instruction that requires the vector-packed-decimal\n"
                " facility.\n"
                "  That facility is not available on this host";
-     case EmFail_S390X_msa:
-        return "Encountered an instruction that requires the message-security"
-               " assist.\n"
-               "  That assist is not available on this host";
      case EmFail_S390X_msa8:
         return "Encountered an instruction that requires the"
                " message-security-assist extension 8.\n"
@@ -1922,7 +1918,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps )
       { VEX_HWCAPS_S390X_DFLT,  "dflt" },
       { VEX_HWCAPS_S390X_VXE2,  "vxe2" },
       { VEX_HWCAPS_S390X_VXD,   "vxd" },
-      { VEX_HWCAPS_S390X_MSA,   "msa" },
       { VEX_HWCAPS_S390X_MSA8,  "msa8" },
       { VEX_HWCAPS_S390X_MSA9,  "msa9" },
    };
index 4ff407c1e280dd77f2d44e884fcdf4bb1c25f6ad..1d1b3d7ec3890efbfbe5f77b10aa6235f15872b3 100644 (file)
@@ -178,7 +178,6 @@ typedef
 #define VEX_HWCAPS_S390X_DFLT  (1<<24)  /* Deflate-conversion facility */
 #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_MSA8  (1<<29)  /* Message-security-assist extension 8 */
 #define VEX_HWCAPS_S390X_MSA9  (1<<30)  /* Message-security-assist extension 9 */
 
@@ -199,7 +198,6 @@ typedef
                                 VEX_HWCAPS_S390X_DFLT  | \
                                 VEX_HWCAPS_S390X_VXE2  | \
                                 VEX_HWCAPS_S390X_VXD   | \
-                                VEX_HWCAPS_S390X_MSA   | \
                                 VEX_HWCAPS_S390X_MSA8  | \
                                 VEX_HWCAPS_S390X_MSA9)
 
index 3f5821d523ee328d894405099b4746e212f01e0b..432decb2b775e216664dfb263261f10e8be9f1b3 100644 (file)
@@ -130,10 +130,6 @@ typedef
          this host */
       EmFail_S390X_vxd,
 
-      /* insn needs message-security assist which is not available on
-         this host */
-      EmFail_S390X_msa,
-
       /* insn needs message-security-assist extension 8 which is not available
          on this host */
       EmFail_S390X_msa8,
index cdb0ca9a947c18ac182432a8770bd900325955ec..45f185d98a46c69d0ace468732dbfe75cede33d0 100644 (file)
@@ -1581,7 +1581,6 @@ Bool VG_(machine_get_hwcaps)( void )
         { False, 165,  VEX_HWCAPS_S390X_NNPA,  "NNPA"  },
         { False, 148,  VEX_HWCAPS_S390X_VXE2,  "VXE2"  },
         { False, 134,  VEX_HWCAPS_S390X_VXD,   "VXD"   },
-        { False,  17,  VEX_HWCAPS_S390X_MSA,   "MSA"   },
         { False, 146,  VEX_HWCAPS_S390X_MSA8,  "MSA8"  },
         { False, 155,  VEX_HWCAPS_S390X_MSA9,  "MSA9"  },
      };