arm "neon"

Michael Mohr mohr at linuxcertified.com
Mon Jan 14 21:10:30 CET 2013


At least for Android this may not be an option.  It provides a 
"cpufeatures" library for use at runtime.  I suggest using a configure 
option which explicitly enables this, and disable it otherwise.

On 01/12/2013 11:12 AM, Richard Henderson wrote:
> 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~
> _______________________________________________
> gmp-devel mailing list
> gmp-devel at gmplib.org
> https://gmplib.org/mailman/listinfo/gmp-devel


More information about the gmp-devel mailing list