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 <[email protected]> Reviewed-by: Mark Brown <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Will Deacon <[email protected]>
1 parent 672dbf9 commit eb27c76

File tree

1 file changed

+12
-0
lines changed
  • tools/testing/selftests/arm64/abi

1 file changed

+12
-0
lines changed

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)