]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
s390: ETF2/ETF3-enhancement facilities related cleanups (BZ 509562)
authorFlorian Krohm <flo2030@eich-krohm.de>
Mon, 24 Nov 2025 18:39:39 +0000 (18:39 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Mon, 24 Nov 2025 18:39:39 +0000 (18:39 +0000)
The ETF2/ETF3-enhancement facilities are always present on
the supported machines.
- Remove VEX_HWCAPS_S390X_ETF2 and s390_host_has_etf2
- Remove VEX_HWCAPS_S390X_ETF3 and s390_host_has_etf3
- Update 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
coregrind/m_machine.c
none/tests/s390x/cu12_1.vgtest
none/tests/s390x/cu14_1.vgtest
none/tests/s390x/cu21_1.vgtest
none/tests/s390x/cu24_1.vgtest
tests/s390x_features.c

index fffd375ded2eb8f93519d0b5f4b81c1e9d2097e4..b01849cb67395f18d1841ba4c88d8a441d43ddfd 100644 (file)
@@ -15495,7 +15495,7 @@ s390_irgen_TROO(UChar m3, UChar r1, UChar r2)
                         mkexpr(tab_addr)));
    assign(op1, load(Ity_I8, mkexpr(result)));
 
-   if (! s390_host_has_etf2 || (m3 & 0x1) == 0) {
+   if ((m3 & 0x1) == 0) {
       s390_cc_set_val(1);
       next_insn_if(binop(Iop_CmpEQ8, mkexpr(op1), mkexpr(test_byte)));
    }
@@ -15545,7 +15545,7 @@ s390_irgen_TRTO(UChar m3, UChar r1, UChar r2)
 
    assign(op1, load(Ity_I8, mkexpr(result)));
 
-   if (! s390_host_has_etf2 || (m3 & 0x1) == 0) {
+   if ((m3 & 0x1) == 0) {
       s390_cc_set_val(1);
       next_insn_if(binop(Iop_CmpEQ8, mkexpr(op1), mkexpr(test_byte)));
    }
@@ -15594,7 +15594,7 @@ s390_irgen_TROT(UChar m3, UChar r1, UChar r2)
                         mkexpr(tab_addr)));
    assign(op1, load(Ity_I16, mkexpr(result)));
 
-   if (! s390_host_has_etf2 || (m3 & 0x1) == 0) {
+   if ((m3 & 0x1) == 0) {
       s390_cc_set_val(1);
       next_insn_if(binop(Iop_CmpEQ16, mkexpr(op1), mkexpr(test_byte)));
    }
@@ -15643,7 +15643,7 @@ s390_irgen_TRTT(UChar m3, UChar r1, UChar r2)
                         mkexpr(tab_addr)));
    assign(op1, load(Ity_I16, mkexpr(result)));
 
-   if (! s390_host_has_etf2 || (m3 & 0x1) == 0) {
+   if ((m3 & 0x1) == 0) {
       s390_cc_set_val(1);
       next_insn_if(binop(Iop_CmpEQ16, mkexpr(op1), mkexpr(test_byte)));
    }
@@ -15789,7 +15789,7 @@ s390_irgen_CU21(UChar m3, UChar r1, UChar r2)
 
    /* Before we can test whether the 1st operand is exhausted we need to
       test for an invalid low surrogate. Because cc=2 outranks cc=1. */
-   if (s390_host_has_etf3 && (m3 & 0x1) == 1) {
+   if ((m3 & 0x1) == 1) {
       IRExpr *invalid_low_surrogate =
          binop(Iop_And64, mkexpr(retval), mkU64(0xff));
 
@@ -15920,7 +15920,7 @@ s390_irgen_CU24(UChar m3, UChar r1, UChar r2)
 
    /* Before we can test whether the 1st operand is exhausted we need to
       test for an invalid low surrogate. Because cc=2 outranks cc=1. */
-   if (s390_host_has_etf3 && (m3 & 0x1) == 1) {
+   if ((m3 & 0x1) == 1) {
       IRExpr *invalid_low_surrogate =
          binop(Iop_And64, mkexpr(retval), mkU64(0xff));
 
@@ -16202,7 +16202,7 @@ s390_irgen_cu12_cu14(UChar m3, UChar r1, UChar r2, Bool is_cu12)
    assign(len1, get_gpr_dw0(r1 + 1));
    assign(len2, get_gpr_dw0(r2 + 1));
 
-   UInt extended_checking = s390_host_has_etf3 && (m3 & 0x1) == 1;
+   UInt extended_checking = (m3 & 0x1) == 1;
 
    /* We're processing the 2nd operand 1 byte at a time. Therefore, if
       there is less than 1 byte left, then the 2nd operand is exhausted
index 7a5b6f5522ceaefc5e5c7d811dc6fb47f6d67c5b..9a66b2abc99d39d6ecafbc1f780345599bb0f4cc 100644 (file)
@@ -924,10 +924,6 @@ extern UInt s390_host_hwcaps;
                       (s390_host_hwcaps & (VEX_HWCAPS_S390X_GIE))
 #define s390_host_has_fgx \
                       (s390_host_hwcaps & (VEX_HWCAPS_S390X_FGX))
-#define s390_host_has_etf2 \
-                      (s390_host_hwcaps & (VEX_HWCAPS_S390X_ETF2))
-#define s390_host_has_etf3 \
-                      (s390_host_hwcaps & (VEX_HWCAPS_S390X_ETF3))
 #define s390_host_has_lsc \
                       (s390_host_hwcaps & (VEX_HWCAPS_S390X_LSC))
 #define s390_host_has_pfpo \
index 22eac293ee8436e3a17079c5659b9b16221f4806..ae97ec182c243d2df2ccbd9ceedac49b8215469b 100644 (file)
@@ -1905,8 +1905,6 @@ static const HChar* show_hwcaps_s390x ( UInt hwcaps )
       { VEX_HWCAPS_S390X_EIMM,  "eimm" },
       { VEX_HWCAPS_S390X_GIE,   "gie" },
       { VEX_HWCAPS_S390X_FGX,   "fgx" },
-      { VEX_HWCAPS_S390X_ETF2,  "etf2" },
-      { VEX_HWCAPS_S390X_ETF3,  "etf3" },
       { VEX_HWCAPS_S390X_LSC,   "lsc" },
       { VEX_HWCAPS_S390X_PFPO,  "pfpo" },
       { VEX_HWCAPS_S390X_VX,    "vx" },
index 1d1b3d7ec3890efbfbe5f77b10aa6235f15872b3..710b3bb56470b81a855bfe36b3118888f4b34edf 100644 (file)
@@ -165,8 +165,6 @@ typedef
 #define VEX_HWCAPS_S390X_EIMM  (1<<7)   /* Extended-immediate facility */
 #define VEX_HWCAPS_S390X_GIE   (1<<8)   /* General-instruction-extension facility */
 #define VEX_HWCAPS_S390X_FGX   (1<<10)  /* FPR-GR transfer facility */
-#define VEX_HWCAPS_S390X_ETF2  (1<<11)  /* ETF2-enhancement facility */
-#define VEX_HWCAPS_S390X_ETF3  (1<<13)  /* ETF3-enhancement facility */
 #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 */
@@ -186,8 +184,6 @@ typedef
                                 VEX_HWCAPS_S390X_GIE   | \
                                 VEX_HWCAPS_S390X_FGX   | \
                                 VEX_HWCAPS_S390X_LSC   | \
-                                VEX_HWCAPS_S390X_ETF3  | \
-                                VEX_HWCAPS_S390X_ETF2  | \
                                 VEX_HWCAPS_S390X_PFPO  | \
                                 VEX_HWCAPS_S390X_VX    | \
                                 VEX_HWCAPS_S390X_MSA5  | \
index 45f185d98a46c69d0ace468732dbfe75cede33d0..2c613708aae24127f04044ae2fd34da7b19bc98e 100644 (file)
@@ -1568,8 +1568,6 @@ Bool VG_(machine_get_hwcaps)( void )
         { False,  21,  VEX_HWCAPS_S390X_EIMM,  "EIMM"  },
         { False,  34,  VEX_HWCAPS_S390X_GIE,   "GIE"   },
         { False,  41,  VEX_HWCAPS_S390X_FGX,   "FGX"   },
-        { False,  24,  VEX_HWCAPS_S390X_ETF2,  "ETF2"  },
-        { False,  30,  VEX_HWCAPS_S390X_ETF3,  "ETF3"  },
         { False,  45,  VEX_HWCAPS_S390X_LSC,   "LSC"   },
         { False,  44,  VEX_HWCAPS_S390X_PFPO,  "PFPO"  },
         { False, 129,  VEX_HWCAPS_S390X_VX,    "VX"    },
index f7124829329ea9401e7e197b11721797e76013fc..6b224d3c214b9bdedb5f1e787ca2f551aa4df1b4 100644 (file)
@@ -1,2 +1 @@
-prereq: ../../../tests/s390x_features s390x-etf3
 prog: cu12_1
index 330a2cf7a763594224b69606a5a1e22a2700b2f6..b722c3ab9aca73346be3271ba45d45e5636974b4 100644 (file)
@@ -1,2 +1 @@
-prereq: ../../../tests/s390x_features s390x-etf3
 prog: cu14_1
index 153c7a4ee7d69c90930cbd9dec4140190b5912dd..92f3ede249119ab4170a58a3dddeaa5d09db13f6 100644 (file)
@@ -1,2 +1 @@
-prereq: ../../../tests/s390x_features s390x-etf3
 prog: cu21_1
index 992ccdce234d851d9732f1c512eb7258139b4de2..84372fb08c9068f5d640add219bc85e12883c7ac 100644 (file)
@@ -1,2 +1 @@
-prereq: ../../../tests/s390x_features s390x-etf3
 prog: cu24_1
index 1a5b4f5f786b4a6c5b010e274e92542ffd5b5b0a..592b5487c8aa6400478296ff23d4d00b163ee5ae 100644 (file)
@@ -235,8 +235,6 @@ static int go(char *feature, char *cpu)
       match = facilities[0] & FAC_BIT(34);
    } else if (strcmp(feature, "s390x-exrl") == 0 ) {
       match = facilities[0] & FAC_BIT(35);
-   } else if (strcmp(feature, "s390x-etf3") == 0 ) {
-      match = facilities[0] & FAC_BIT(30);
    } else if (strcmp(feature, "s390x-pfpo") == 0 ) {
       match = facilities[0] & FAC_BIT(44);
    } else if (strcmp(feature, "s390x-highw") == 0 ) {