Detect NEON and set HWCAP_NEON if present.

Reviewed by:	andrew, ian
MFC after:	2 weeks
Differential Revision:	https://reviews.freebsd.org/D12389
This commit is contained in:
John Baldwin 2017-09-22 17:58:57 +00:00
parent 1e159074cb
commit 64f73a4c67
Notes: svn2git 2020-12-20 02:59:44 +00:00
svn path=/head/; revision=323934
2 changed files with 6 additions and 0 deletions

View File

@ -144,6 +144,11 @@ vfp_init(void)
initial_fpscr;
}
}
if ((tmp & VMVFR1_LS_MASK) >> VMVFR1_LS_OFF == 1 &&
(tmp & VMVFR1_I_MASK) >> VMVFR1_I_OFF == 1 &&
(tmp & VMVFR1_SP_MASK) >> VMVFR1_SP_OFF == 1)
elf_hwcap |= HWCAP_NEON;
}
/* initialize the coprocess 10 and 11 calls

View File

@ -117,6 +117,7 @@ __ElfType(Auxinfo);
/* Flags passed in AT_HWCAP. */
#define HWCAP_VFP 0x00000040
#define HWCAP_NEON 0x00001000
#define HWCAP_VFPv3 0x00002000
#define HWCAP_VFPv3D16 0x00004000
#define HWCAP_VFPD32 0x00080000