Tidy up aarch64 feature detection code in armcap.c
authorTom Cosgrove <tom.cosgrove@arm.com>
Sun, 12 Feb 2023 20:26:23 +0000 (20:26 +0000)
committerPauli <pauli@openssl.org>
Thu, 2 Mar 2023 23:28:17 +0000 (10:28 +1100)
commit52a38144b019cfda6b0e5eaa0aca88ae11661a26
treeddc59cc606d0c0bb2045107d3a3771eb5f543d6e
parentdd573a2fc1e8806c67420a5d6df0de175745aaf8
Tidy up aarch64 feature detection code in armcap.c

Make the SIGILL-based code easier to read, and don't use it on Apple Silicon.

Also fix "error: 'HWCAP(2)_*' macro redefined" warnings on FreeBSD.

Fixes #20188

Change-Id: I5618bbe9444cc40cb5705c6ccbdc331c16bab794

Reviewed-by: Tomas Mraz <tomas@openssl.org>
Reviewed-by: Paul Dale <pauli@openssl.org>
(Merged from https://github.com/openssl/openssl/pull/20305)
crypto/armcap.c