Apple M1 updates

81 views
Skip to first unread message

Jeffrey Walton

unread,
Mar 5, 2021, 12:34:04 AM3/5/21
to Crypto++ Users List
Hi Everyone,

We got our hands on an Apple Mac-mini M1,
https://www.amazon.com/gp/product/B08N5PHB83.

The M1 in the Mac-mini include CRC32, SHA-3 and SHA-512:

% sysctl -a | grep -E 'arm|crc|aes|pmull|crypto|sha1|sha2|sha3|sha512'
hw.optional.armv8_1_atomics: 1
hw.optional.armv8_crc32: 1
hw.optional.armv8_2_fhm: 1
hw.optional.armv8_2_sha512: 1
hw.optional.armv8_2_sha3: 1
hw.optional.arm64: 1

We fixed the makefile so -DCRYPTOPP_DISABLE_ASM is no longer present.

We also adjusted cpu.cpp. It detects the M1 and enables CRC32, PMULL,
SHA3 and SHA512. We already had CRC32 and PMULL. But Clang does not
make SHA3 and SHA512 intrinsics available, so we are left high and dry
again.

What we are not sure about is, are all M1's at least ARMv8.2-a. If
they are all at least ARMv8.2-a, then everything is OK. If they are
not, then we will see a SIGILL on earlier versions of the M1.

If anyone comes across a SIGILL on an M1, please start a thread or
open a bug report.

Jeff
Reply all
Reply to author
Forward
0 new messages