diff options
author | Joey Gouly <[email protected]> | 2023-08-04 15:37:46 +0100 |
---|---|---|
committer | Will Deacon <[email protected]> | 2023-08-04 17:32:13 +0100 |
commit | d70175b1470c4bdc8643fd744d722a00c7f0fb17 (patch) | |
tree | dc074c587c9ff28a9e22b3417b3a2691237e5d79 | |
parent | 7f86d128e437990fd08d9e66ae7c1571666cff8a (diff) |
selftests/arm64: add HWCAP2_HBC test
Add a test for the newly added HWCAP2_HBC.
Signed-off-by: Joey Gouly <[email protected]>
Cc: Catalin Marinas <[email protected]>
Cc: Will Deacon <[email protected]>
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Will Deacon <[email protected]>
-rw-r--r-- | tools/testing/selftests/arm64/abi/hwcap.c | 15 |
1 files changed, 15 insertions, 0 deletions
diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c index d4ad813fed10..fabeac9a1b5e 100644 --- a/tools/testing/selftests/arm64/abi/hwcap.c +++ b/tools/testing/selftests/arm64/abi/hwcap.c @@ -208,6 +208,13 @@ static void svebf16_sigill(void) asm volatile(".inst 0x658aa000" : : : "z0"); } +static void hbc_sigill(void) +{ + /* BC.EQ +4 */ + asm volatile("cmp xzr, xzr\n" + ".inst 0x54000030" : : : "cc"); +} + static const struct hwcap_data { const char *name; unsigned long at_hwcap; @@ -386,6 +393,14 @@ static const struct hwcap_data { .hwcap_bit = HWCAP2_SVE_EBF16, .cpuinfo = "sveebf16", }, + { + .name = "HBC", + .at_hwcap = AT_HWCAP2, + .hwcap_bit = HWCAP2_HBC, + .cpuinfo = "hbc", + .sigill_fn = hbc_sigill, + .sigill_reliable = true, + }, }; static bool seen_sigill; |