arm "neon"

Richard Henderson rth at twiddle.net
Sat Jan 12 20:12:04 CET 2013


On 01/12/2013 10:30 AM, Niels Möller wrote:
>> >Using Neon in a robust way might be a bit tricky, though.  I have no
>> >idea how to determine if a CPU has Neon or not, and ARM has made most
>> >useful meta instructions supervisor-only.
> For a start, I guess it could be a configure time option (with no
> fat-binary things). Either explicit, or automatically based on, e.g.,
> linux' /proc/cpuinfo which lists available cpu extensions.

Recent glibc has <sys/auxv.h> containing getauxval.

   getauxval(AT_HWCAP) & HWCAP_ARM_NEON

gets you exactly the information you want.


r~


More information about the gmp-devel mailing list