Page MenuHomeFreeBSD

Add accelerated arm64 sha512 to libmd
ClosedPublic

Authored by andrew on Dec 10 2021, 1:42 PM.
Tags
None
Referenced Files
Unknown Object (File)
Dec 19 2022, 6:25 PM
Unknown Object (File)
Dec 14 2022, 4:03 AM
Unknown Object (File)
Dec 12 2022, 1:54 AM
Subscribers

Details

Summary

As with sha256 add support for accelerated sha512 support to libmd on
arm64. This depends on clang 13+ to build as this is the first release
with the needed intrinsics. Gcc should also support them, however from
a currently unknown release.

Diff Detail

Repository
rG FreeBSD src repository
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

Lgtm. I didn’t attempt to verify the asm implementation.

lib/libmd/Makefile
140

Is sha3 the right extension for sha2-512? The sha3 feature bit seems unrelated to sha2 and I am unable to find documentation for the march flag.

This revision is now accepted and ready to land.Dec 11 2021, 5:40 PM
lib/libmd/Makefile
140

Yes, I checked on both clang and llvm. The compiler developers seem to have grouped sha512 and sha3 together because they were both added in armv8.2.

This revision was automatically updated to reflect the committed changes.