]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
s390: Code cleanup due to availability of STCKF insn. (BZ 509562)
authorFlorian Krohm <flo2030@eich-krohm.de>
Thu, 20 Nov 2025 23:06:31 +0000 (23:06 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Thu, 20 Nov 2025 23:06:31 +0000 (23:06 +0000)
Remove EmFail_S390X_ecag, s390_host_has_stckf, and VEX_HWCAPS_S390X_STCKF.
Update none/tests/s390x/stckf.vgtest and tests/s390x_features.c

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
none/tests/s390x/stckf.vgtest
tests/s390x_features.c

index 7915b2575c9bf73137974e48a733061a32b7fe05..7df56428ee7dc06da0bf206ce90f4e916c6cfd55 100644 (file)
@@ -15792,20 +15792,16 @@ s390_irgen_STCK(IRTemp op2addr)
 static const HChar *
 s390_irgen_STCKF(IRTemp op2addr)
 {
-   if (! s390_host_has_stckf) {
-      emulation_failure(EmFail_S390X_stckf);
-   } else {
-      IRTemp cc = newTemp(Ity_I64);
+   IRTemp cc = newTemp(Ity_I64);
 
-      IRDirty *d = unsafeIRDirty_1_N(cc, 0, "s390x_dirtyhelper_STCKF",
-                                     &s390x_dirtyhelper_STCKF,
-                                     mkIRExprVec_1(mkexpr(op2addr)));
-      d->mFx   = Ifx_Write;
-      d->mAddr = mkexpr(op2addr);
-      d->mSize = 8;
-      stmt(IRStmt_Dirty(d));
-      s390_cc_set(cc);
-   }
+   IRDirty *d = unsafeIRDirty_1_N(cc, 0, "s390x_dirtyhelper_STCKF",
+                                  &s390x_dirtyhelper_STCKF,
+                                  mkIRExprVec_1(mkexpr(op2addr)));
+   d->mFx   = Ifx_Write;
+   d->mAddr = mkexpr(op2addr);
+   d->mSize = 8;
+   stmt(IRStmt_Dirty(d));
+   s390_cc_set(cc);
    return "stckf";
 }
 
index 3de079e838873bb15998afebf674dc05b12737d1..fdcc199c64ba20906247653911595b511cee1759 100644 (file)
@@ -934,8 +934,6 @@ extern UInt s390_host_hwcaps;
                       (s390_host_hwcaps & (VEX_HWCAPS_S390X_STFLE))
 #define s390_host_has_etf3 \
                       (s390_host_hwcaps & (VEX_HWCAPS_S390X_ETF3))
-#define s390_host_has_stckf \
-                      (s390_host_hwcaps & (VEX_HWCAPS_S390X_STCKF))
 #define s390_host_has_fpext \
                       (s390_host_hwcaps & (VEX_HWCAPS_S390X_FPEXT))
 #define s390_host_has_lsc \
index 6098e3c95f4922df1c6ee56daaff0967267c5787..8f3ab89458ca7cbd4cef55a9d4cf889712e5813d 100644 (file)
@@ -1551,8 +1551,6 @@ const HChar* LibVEX_EmNote_string ( VexEmNote ew )
                "  IEEE-invalid-operation exceptions will not be suppressed.";
      case EmFail_S390X_stfle:
         return "Instruction stfle is not supported on this host";
-     case EmFail_S390X_stckf:
-        return "Instruction stckf is not supported on this host";
      case EmFail_S390X_pfpo:
         return "Instruction pfpo is not supported on this host";
      case EmFail_S390X_DFP_insn:
@@ -1933,7 +1931,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps )
       { VEX_HWCAPS_S390X_STFLE, "stfle" },
       { VEX_HWCAPS_S390X_ETF2,  "etf2" },
       { VEX_HWCAPS_S390X_ETF3,  "etf3" },
-      { VEX_HWCAPS_S390X_STCKF, "stckf" },
       { VEX_HWCAPS_S390X_FPEXT, "fpext" },
       { VEX_HWCAPS_S390X_LSC,   "lsc" },
       { VEX_HWCAPS_S390X_PFPO,  "pfpo" },
index 0be6deb824c4bbcd02255783b7ba2f0a01bec240..a1eb48f41404b1fc61e61fa5e33c5e46b0cc658a 100644 (file)
@@ -170,7 +170,6 @@ typedef
 #define VEX_HWCAPS_S390X_ETF2  (1<<11)  /* ETF2-enhancement facility */
 #define VEX_HWCAPS_S390X_STFLE (1<<12)  /* STFLE facility */
 #define VEX_HWCAPS_S390X_ETF3  (1<<13)  /* ETF3-enhancement facility */
-#define VEX_HWCAPS_S390X_STCKF (1<<14)  /* STCKF facility */
 #define VEX_HWCAPS_S390X_FPEXT (1<<15)  /* Floating point extension facility */
 #define VEX_HWCAPS_S390X_LSC   (1<<16)  /* Conditional load/store facility */
 #define VEX_HWCAPS_S390X_PFPO  (1<<17)  /* Perform floating point ops facility */
@@ -195,7 +194,6 @@ typedef
                                 VEX_HWCAPS_S390X_DFP   | \
                                 VEX_HWCAPS_S390X_FGX   | \
                                 VEX_HWCAPS_S390X_STFLE | \
-                                VEX_HWCAPS_S390X_STCKF | \
                                 VEX_HWCAPS_S390X_FPEXT | \
                                 VEX_HWCAPS_S390X_LSC   | \
                                 VEX_HWCAPS_S390X_ETF3  | \
index 9557663faa640043be5486d5ed053ff751d03851..fa6c5bf5c18a3ff2a9f32fad1510871031327dbd 100644 (file)
@@ -102,9 +102,6 @@ typedef
       /* stfle insn is not supported on this host */
       EmFail_S390X_stfle,
 
-      /* stckf insn is not supported on this host */
-      EmFail_S390X_stckf,
-
       /* pfpo insn is not supported on this host */
       EmFail_S390X_pfpo,
 
index 1bb6cd120174af979e0cb47fa8098c43aa946d95..6729e57c6ddd36470926f3eaff959bb1e70f780c 100644 (file)
@@ -1635,7 +1635,6 @@ Bool VG_(machine_get_hwcaps)( void )
         { False,  24,  VEX_HWCAPS_S390X_ETF2,  "ETF2"  },
         { False,   7,  VEX_HWCAPS_S390X_STFLE, "STFLE" },
         { False,  30,  VEX_HWCAPS_S390X_ETF3,  "ETF3"  },
-        { False,  25,  VEX_HWCAPS_S390X_STCKF, "STCKF" },
         { False,  37,  VEX_HWCAPS_S390X_FPEXT, "FPEXT" },
         { False,  45,  VEX_HWCAPS_S390X_LSC,   "LSC"   },
         { False,  44,  VEX_HWCAPS_S390X_PFPO,  "PFPO"  },
index c16fbff19865f1a97e58a224e0543133f8cfb4fb..4d9484182697e65c8783f56e2671e85260f1ce5d 100644 (file)
@@ -1,2 +1 @@
 prog:stckf
-prereq: ../../../tests/s390x_features s390x-stckf
index e0d4de76ce5a1e6764cb515ab790b1d8a429fc2e..625984dbb6b33cf29b959b5d5661a36bda1d406f 100644 (file)
@@ -250,8 +250,6 @@ static int go(char *feature, char *cpu)
       match = (facilities[0] & FAC_BIT(18)) && (facilities[0] & FAC_BIT(19));
    } else if (strcmp(feature, "s390x-eimm") == 0 ) {
       match = facilities[0] & FAC_BIT(21);
-   } else if (strcmp(feature, "s390x-stckf") == 0 ) {
-      match = facilities[0] & FAC_BIT(25);
    } else if (strcmp(feature, "s390x-genins") == 0 ) {
       match = facilities[0] & FAC_BIT(34);
    } else if (strcmp(feature, "s390x-exrl") == 0 ) {