Skip to content

Commit eb27c76

Browse files
henryZewilldeacon
authored andcommitted
kselftest/arm64: add float-point feature to hwcap test
Add the FP feature check in the set of hwcap tests. Signed-off-by: Zeng Heng <zengheng4@huawei.com> Reviewed-by: Mark Brown <broonie@kernel.org> Link: https://lore.kernel.org/r/20230808134036.668954-2-zengheng4@huawei.com Signed-off-by: Will Deacon <will@kernel.org>
1 parent 672dbf9 commit eb27c76

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

  • tools/testing/selftests/arm64/abi

tools/testing/selftests/arm64/abi/hwcap.c

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,11 @@ static void cssc_sigill(void)
3939
asm volatile(".inst 0xdac01c00" : : : "x0");
4040
}
4141

42+
static void fp_sigill(void)
43+
{
44+
asm volatile("fmov s0, #1");
45+
}
46+
4247
static void ilrcpc_sigill(void)
4348
{
4449
/* LDAPUR W0, [SP, #8] */
@@ -235,6 +240,13 @@ static const struct hwcap_data {
235240
.cpuinfo = "cssc",
236241
.sigill_fn = cssc_sigill,
237242
},
243+
{
244+
.name = "FP",
245+
.at_hwcap = AT_HWCAP,
246+
.hwcap_bit = HWCAP_FP,
247+
.cpuinfo = "fp",
248+
.sigill_fn = fp_sigill,
249+
},
238250
{
239251
.name = "LRCPC",
240252
.at_hwcap = AT_HWCAP,

0 commit comments

Comments
 (0)