This is the mail archive of the
libc-help@sourceware.org
mailing list for the glibc project.
When to use AT_HWCAP or AT_HWCAP2
- From: Jeffrey Walton <noloader at gmail dot com>
- To: libc-help at sourceware dot org
- Date: Mon, 7 Aug 2017 09:06:20 -0400
- Subject: When to use AT_HWCAP or AT_HWCAP2
- Authentication-results: sourceware.org; auth=none
- Reply-to: noloader at gmail dot com
Hi Everyone,
Please forgive my ignorance. The getauxval (3) man page discusses both
AT_HWCAP and AT_HWCAP2. I'm less clear on about when I should use one
or the other?
For example, suppose I'm on an Aarch64 Opteron. Testing shows I need
AT_HWCAP for HWCAP_AES, HWCAP_PMULL, etc. Now suppose I am in a
Aarch32 execution environment on the same machine. Do I check AT_HWCAP
or AT_HWCAP2? How do I know the difference at runtime?
Thanks in advance.
Jeff