Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

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>

authored by

Yifan Wu and committed by
Catalin Marinas
74cd4e0e 1f318b96

+2 -1
+2 -1
tools/testing/selftests/arm64/abi/hwcap.c
··· 56 56 57 57 static void cmpbr_sigill(void) 58 58 { 59 - /* Not implemented, too complicated and unreliable anyway */ 59 + asm volatile(".inst 0x74C00040\n" /* CBEQ w0, w0, +8 */ 60 + "udf #0" : : : "cc"); /* UDF #0 */ 60 61 } 61 62 62 63 static void crc32_sigill(void)