diff options
| author | Yifan Wu <wuyifan50@huawei.com> | 2026-03-05 04:36:38 +0300 |
|---|---|---|
| committer | Catalin Marinas <catalin.marinas@arm.com> | 2026-03-14 19:58:16 +0300 |
| commit | 74cd4e0e5399480e3fab2cd6a6cbdb17f673c335 (patch) | |
| tree | c82da5d65bda40d0b6223823e346b9ab19595018 /tools | |
| parent | 1f318b96cc84d7c2ab792fcc0bfd42a7ca890681 (diff) | |
| download | linux-74cd4e0e5399480e3fab2cd6a6cbdb17f673c335.tar.xz | |
selftests/arm64: Implement cmpbr_sigill() to hwcap test
The function executes a CBEQ instruction which is valid if the CPU
supports the CMPBR extension. The CBEQ branches to skip the following
UDF instruction, and no SIGILL is generated. Otherwise, it will
generate a SIGILL.
Signed-off-by: Yifan Wu <wuyifan50@huawei.com>
Reviewed-by: Mark Brown <broonie@kernel.org>
Signed-off-by: Catalin Marinas <catalin.marinas@arm.com>
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/testing/selftests/arm64/abi/hwcap.c | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/tools/testing/selftests/arm64/abi/hwcap.c b/tools/testing/selftests/arm64/abi/hwcap.c index c2661a312fc9..e22703d6b97c 100644 --- a/tools/testing/selftests/arm64/abi/hwcap.c +++ b/tools/testing/selftests/arm64/abi/hwcap.c @@ -56,7 +56,8 @@ static void atomics_sigill(void) static void cmpbr_sigill(void) { - /* Not implemented, too complicated and unreliable anyway */ + asm volatile(".inst 0x74C00040\n" /* CBEQ w0, w0, +8 */ + "udf #0" : : : "cc"); /* UDF #0 */ } static void crc32_sigill(void) |
