]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
s390x_features.c cleanup
authorFlorian Krohm <flo2030@eich-krohm.de>
Wed, 26 Nov 2025 16:50:42 +0000 (16:50 +0000)
committerFlorian Krohm <flo2030@eich-krohm.de>
Wed, 26 Nov 2025 16:51:49 +0000 (16:51 +0000)
Remove detection of unneeded facilities: zarch, n3, exrl, mi3
Rename s390x-vx2 --> s390x-vxe2 to be consistent with VEX_HWCAPS_S390X_VXE2
Change vec2_float.vgtest accordingly

none/tests/s390x/vec2_float.vgtest
tests/s390x_features.c

index 1f92d59ece1d775815a9b166e0657d499f3e7fea..59cbe54ba9a31baed0de8c9560a61722a01e81a5 100644 (file)
@@ -1,2 +1,2 @@
 prog: vec2_float
-prereq: test -e vec2_float && ../../../tests/s390x_features s390x-vx2
+prereq: test -e vec2_float && ../../../tests/s390x_features s390x-vxe2
index f9aa9664048dec35f8a4a81650bafc6c839513fb..2b6af79f8a4ad36cb0e1909b3b765c54e0349dbc 100644 (file)
@@ -225,22 +225,14 @@ static int go(char *feature, char *cpu)
    clear_facilities(facilities);
    stfle(facilities);
 
-   if        (strcmp(feature, "s390x-zarch") == 0 ) {
-      match = (facilities[0] & FAC_BIT(1)) && (facilities[0] & FAC_BIT(2));
-   } else if (strcmp(feature, "s390x-n3") == 0 ) {
-      match = facilities[0] & FAC_BIT(0);
-   } else if (strcmp(feature, "s390x-exrl") == 0 ) {
-      match = facilities[0] & FAC_BIT(35);
-   } else if (strcmp(feature, "s390x-vx") == 0 ) {
+   if (strcmp(feature, "s390x-vx") == 0 ) {
       /* VX needs kernel support; thus check the appropriate HWCAP bit. */
-      match = GET_HWCAP() & 0x800;
+      match = (GET_HWCAP() & 0x800) && (facilities[2] & FAC_BIT(1));
    } else if (strcmp(feature, "s390x-msa5") == 0 ) {
       match = facilities[0] & FAC_BIT(57); /* message security assist 5 facility */
    } else if (strcmp(feature, "s390x-mi2") == 0 ) {
       match = facilities[0] & FAC_BIT(58);
-   } else if (strcmp(feature, "s390x-mi3") == 0 ) {
-      match = facilities[0] & FAC_BIT(61);
-   } else if (strcmp(feature, "s390x-vx2") == 0 ) {
+   } else if (strcmp(feature, "s390x-vxe2") == 0 ) {
       match = (GET_HWCAP() & 0x800) && (facilities[2] & FAC_BIT(20));
    } else {
       return 2;          // Unrecognised feature.