SHA256 implementations based on Intel SHA Extensions
Summary:
- [Refactor] CPU feature detection logic for SHA256
- Add SHA256 implementation using using Intel SHA intrinsics
- Use immintrin.h everywhere for intrinsics
- Use __cpuid_count for gnu C to avoid gitian build fail.
This is a backport of Core PR13386 and PR13611
Depends on D1850
Test Plan:
make check
Reviewers: #bitcoin_abc, schancel
Reviewed By: #bitcoin_abc, schancel
Subscribers: teamcity
Differential Revision: https://reviews.bitcoinabc.org/D1851