Skip to content

Commit fcb0b51

Browse files
henryZewilldeacon
authored andcommitted
kselftest/arm64: add jscvt feature to hwcap test
Add the jscvt feature check in the set of hwcap tests. Due to the requirement of jscvt feature, a compiler configuration of v8.3 or above is needed to support assembly. Therefore, hand encode is used here instead. 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 2c3ce0e commit fcb0b51

File tree

1 file changed

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

1 file changed

+13
-0
lines changed

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

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,12 @@ static void ilrcpc_sigill(void)
6868
asm volatile(".inst 0x994083e0" : : : );
6969
}
7070

71+
static void jscvt_sigill(void)
72+
{
73+
/* FJCVTZS W0, D0 */
74+
asm volatile(".inst 0x1e7e0000" : : : );
75+
}
76+
7177
static void lrcpc_sigill(void)
7278
{
7379
/* LDAPR W0, [SP, #0] */
@@ -313,6 +319,13 @@ static const struct hwcap_data {
313319
.cpuinfo = "fp",
314320
.sigill_fn = fp_sigill,
315321
},
322+
{
323+
.name = "JSCVT",
324+
.at_hwcap = AT_HWCAP,
325+
.hwcap_bit = HWCAP_JSCVT,
326+
.cpuinfo = "jscvt",
327+
.sigill_fn = jscvt_sigill,
328+
},
316329
{
317330
.name = "LRCPC",
318331
.at_hwcap = AT_HWCAP,

0 commit comments

Comments
 (0)