]> Git Repo - linux.git/blobdiff - tools/testing/selftests/arm64/abi/hwcap.c
Merge branches 'for-next/gcs', 'for-next/probes', 'for-next/asm-offsets', 'for-next...
[linux.git] / tools / testing / selftests / arm64 / abi / hwcap.c
index f2d6007a2b983eba77a880ec7e614396a6cb1377..0029ed9c5c9aa4451f3d0573ee672eca993fb2f4 100644 (file)
@@ -98,6 +98,17 @@ static void fpmr_sigill(void)
        asm volatile("mrs x0, S3_3_C4_C4_2" : : : "x0");
 }
 
+static void gcs_sigill(void)
+{
+       unsigned long *gcspr;
+
+       asm volatile(
+               "mrs    %0, S3_3_C2_C5_1"
+       : "=r" (gcspr)
+       :
+       : "cc");
+}
+
 static void ilrcpc_sigill(void)
 {
        /* LDAPUR W0, [SP, #8] */
@@ -361,8 +372,8 @@ static void sveaes_sigill(void)
 
 static void sveb16b16_sigill(void)
 {
-       /* BFADD ZA.H[W0, 0], {Z0.H-Z1.H} */
-       asm volatile(".inst 0xC1E41C00" : : : );
+       /* BFADD Z0.H, Z0.H, Z0.H */
+       asm volatile(".inst 0x65000000" : : : );
 }
 
 static void svepmull_sigill(void)
@@ -490,7 +501,7 @@ static const struct hwcap_data {
                .name = "F8DP2",
                .at_hwcap = AT_HWCAP2,
                .hwcap_bit = HWCAP2_F8DP2,
-               .cpuinfo = "f8dp4",
+               .cpuinfo = "f8dp2",
                .sigill_fn = f8dp2_sigill,
        },
        {
@@ -534,6 +545,14 @@ static const struct hwcap_data {
                .sigill_fn = fpmr_sigill,
                .sigill_reliable = true,
        },
+       {
+               .name = "GCS",
+               .at_hwcap = AT_HWCAP,
+               .hwcap_bit = HWCAP_GCS,
+               .cpuinfo = "gcs",
+               .sigill_fn = gcs_sigill,
+               .sigill_reliable = true,
+       },
        {
                .name = "JSCVT",
                .at_hwcap = AT_HWCAP,
This page took 0.025212 seconds and 4 git commands to generate.