Uh oh!
There was an error while loading. Please reload this page.
[API Implementation]: Support for Intel SHA extensions - #62999
[API Implementation]: Support for Intel SHA extensions#62999deeprobin wants to merge 53 commits into
Conversation
ghost
commented
Dec 19, 2021
Note regarding the This serves as a reminder for when your PR is modifying a ref *.cs file and adding/modifying public APIs, to please make sure the API implementation in the src *.cs file is documented with triple slash comments, so the PR reviewers can sign off that change. |
ghost
commented
Dec 19, 2021
I couldn't figure out the best area label to add to this PR. If you have write-permissions please help me learn by adding exactly one area label. |
ghost
commented
Dec 19, 2021
Tagging subscribers to this area: @dotnet/area-system-runtime-intrinsics Issue DetailsProposal implementation of #256 (closes #256) ProposalnamespaceSystem.Runtime.Intrinsics.X86{publicclassSha1{publicstaticboolIsSupported{get;}publicstaticVector128<byte>MessageSchedule1(Vector128<byte>a,Vector128<byte>b);publicstaticVector128<byte>MessageSchedule2(Vector128<byte>a,Vector128<byte>b);publicstaticVector128<byte>NextE(Vector128<byte>a,Vector128<byte>b);publicstaticVector128<byte>FourRounds(Vector128<byte>a,Vector128<byte>b,bytefunc);}publicclassSha256{publicstaticboolIsSupported{get;}publicstaticVector128<byte>MessageSchedule1(Vector128<byte>a,Vector128<byte>b);publicstaticVector128<byte>MessageSchedule2(Vector128<byte>a,Vector128<byte>b);publicstaticVector128<byte>TwoRounds(Vector128<byte>a,Vector128<byte>b,Vector128<byte>k);}}Current state of implementation
Used intrinsics
TestsI think including tests for this is not relevant, since we trust the processor to execute the intrinsics correctly (there are only vector tests in System.Runtime.Intrinsics anyway). /cc @tannergooding
|
I'm working on the JIT implementation for these intrinsics (see deeprobin#3). Happy to review 😄 |
tannergooding
commented
Jan 3, 2022
Please let us know if you need any assistance here. There are a number of steps required to support new ISAs and you'll need to touch code in both the JIT and VM. |
Yes, I need some assistance. Thats my current JIT change: deeprobin#3 |
* JIT implementation for SHA instructions * Fix flags * Add `cpuid` check for SHA (29th bit) * Add EnableSHA config value * Add incomplete CodeGen method called `genSHAIntrinsic`
Uh oh!
There was an error while loading. Please reload this page.
Co-authored-by: Tanner Gooding <tagoo@outlook.com>
Uh oh!
There was an error while loading. Please reload this page.
This reverts commit 98a22f2.
ghost
commented
Mar 15, 2022
Draft Pull Request was automatically closed for inactivity. Please let us know if you'd like to reopen it. |
deeprobin
commented
Mar 16, 2022
@tannergooding This was auto-closed. As soon as you have time to look at the bug in the wrong SHA encoding, feel free to reopen the PR :) |
Proposal implementation of #256 (closes#256)
Proposal
Current state of implementation
Used intrinsics
__m128i _mm_sha1msg1_epu32 (__m128i a, __m128i b)__m128i _mm_sha1msg2_epu32 (__m128i a, __m128i b)__m128i _mm_sha1nexte_epu32 (__m128i a, __m128i b)__m128i _mm_sha1rnds4_epu32 (__m128i a, __m128i b, const int func)__m128i _mm_sha256msg1_epu32 (__m128i a, __m128i b)__m128i _mm_sha256msg2_epu32 (__m128i a, __m128i b)__m128i _mm_sha256rnds2_epu32 (__m128i a, __m128i b, __m128i k)/cc @tannergooding