Add instruction set detection for SVE_AES, SVE_SHA3, SVE_SM4, SHA3, SM4#124637
Open
a74nh wants to merge 9 commits intodotnet:mainfrom
Open
Add instruction set detection for SVE_AES, SVE_SHA3, SVE_SM4, SHA3, SM4#124637a74nh wants to merge 9 commits intodotnet:mainfrom
a74nh wants to merge 9 commits intodotnet:mainfrom
Conversation
Mostly a copy/paste of dotnet#115117
Contributor
|
Tagging subscribers to this area: @JulieLeeMSFT, @jakobbotsch |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds end-to-end ARM64 instruction set detection and plumbing for SHA3/SM4 and SVE crypto extensions so the runtime/JIT/R2R toolchain can recognize and gate these features consistently across platforms.
Changes:
- Extend
minipal_getcpufeaturesto detect SHA3/SM4 and SVE AES/SHA3/SM4 (Linux hwcaps, Applesysctlbyname, WindowsIsProcessorFeaturePresent). - Add new ARM64 instruction sets (including R2R IDs/implications) and propagate them through CoreCLR instruction-set enums and helpers.
- Gate JIT enablement via new CLRConfig/JitConfig switches and wire feature bits into EE JIT compile flags.
Reviewed changes
Copilot reviewed 15 out of 15 changed files in this pull request and generated 2 comments.
Show a summary per file
| File | Description |
|---|---|
| src/native/minipal/cpufeatures.h | Adds new ARM64 feature-bit constants for SHA3/SM4 and SVE crypto extensions. |
| src/native/minipal/cpufeatures.c | Detects new ARM64 capabilities via HWCAP/HWCAP2, sysctl, and Windows PF_* flags. |
| src/coreclr/vm/codeman.cpp | Sets CPU compile flags for new instruction sets, gated by CLRConfig switches. |
| src/coreclr/tools/Common/JitInterface/ThunkGenerator/InstructionSetDesc.txt | Registers new ARM64 instruction sets, R2R bits, and ISA implications. |
| src/coreclr/tools/Common/JitInterface/CorInfoInstructionSet.cs | Updates managed instruction-set enums and implication handling for new ARM64 ISAs. |
| src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSetHelper.cs | Maps new ARM64 instruction sets to R2R instruction set IDs. |
| src/coreclr/tools/Common/Internal/Runtime/ReadyToRunInstructionSet.cs | Adds new R2R instruction set enum values for ARM64 SHA3/SM4 and SVE crypto. |
| src/coreclr/jit/jitconfigvalues.h | Introduces JIT config toggles for enabling/disabling the new ARM64 ISAs. |
| src/coreclr/jit/hwintrinsicarm64.cpp | Adds name-to-instruction-set and Arm64-variant mapping for new ISAs. |
| src/coreclr/jit/hwintrinsic.cpp | Extends ISA range table to include the new ARM64 instruction sets. |
| src/coreclr/jit/compiler.cpp | Enables new ARM64 instruction sets in “enable available ISAs” flow based on JitConfig. |
| src/coreclr/inc/readytoruninstructionset.h | Adds new R2R instruction set IDs on the native side. |
| src/coreclr/inc/jiteeversionguid.h | Bumps JIT/EE version GUID due to instruction-set enum changes. |
| src/coreclr/inc/corinfoinstructionset.h | Extends CORINFO instruction-set enums/validation/mappings for new ARM64 ISAs. |
| src/coreclr/inc/clrconfigvalues.h | Adds CLRConfig switches to gate the new ARM64 ISAs. |
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Co-authored-by: Copilot <[email protected]>
Contributor
Author
|
@dotnet/arm64-contrib |
This was referenced Feb 20, 2026
Open
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Mostly a copy/paste of #115117