Uh oh!
There was an error while loading. Please reload this page.
Add Sm4 and SVE Sm4 APIs - #130039
Conversation
There was a problem hiding this comment.
Pull request overview
This PR adds new Arm64 hardware intrinsic APIs for SM4 (FEAT_SM4) and SVE SM4 (FEAT_SVE_SM4), wires them up through the JIT hardware intrinsic tables/codegen, and adds corresponding JIT HardwareIntrinsics test coverage (including generator input updates and shared helper validation code).
Changes:
- Introduces new public intrinsics surface for
System.Runtime.Intrinsics.Arm.Sm4andSystem.Runtime.Intrinsics.Arm.SveSm4(ref + CoreLib) and updates linker substitutions. - Adds JIT intrinsic definitions for Sm4/SveSm4 and updates Arm64 codegen/emitter handling.
- Adds/updates JIT HWIntrinsic tests and generator inputs for Sm4/SveSm4.
Reviewed changes
Copilot reviewed 23 out of 23 changed files in this pull request and generated 7 comments.
Show a summary per file
| File | Description |
|---|---|
| src/tests/JIT/HardwareIntrinsics/Arm/SveSm4/SveSm4_ro.csproj | New optimized (ro) test project for SveSm4 |
| src/tests/JIT/HardwareIntrinsics/Arm/SveSm4/SveSm4_r.csproj | New non-optimized (r) test project for SveSm4 |
| src/tests/JIT/HardwareIntrinsics/Arm/SveSm4/Program.SveSm4.cs | Test harness partial Program for SveSm4 |
| src/tests/JIT/HardwareIntrinsics/Arm/Sm4/Sm4_ro.csproj | New optimized (ro) test project for Sm4 |
| src/tests/JIT/HardwareIntrinsics/Arm/Sm4/Sm4_r.csproj | New non-optimized (r) test project for Sm4 |
| src/tests/JIT/HardwareIntrinsics/Arm/Sm4/Program.Sm4.cs | Test harness partial Program for Sm4 |
| src/tests/JIT/HardwareIntrinsics/Arm/Shared/Program.cs | Prints Sha3, Sm4, and SveSm4 support in test output |
| src/tests/JIT/HardwareIntrinsics/Arm/Shared/Helpers.cs | Adds SM4 reference helpers for result validation in tests |
| src/tests/Common/GenerateHWIntrinsicTests/GenerateHWIntrinsicTests_Arm.cs | Adds Sm4/SveSm4 generator input groups to processing |
| src/tests/Common/GenerateHWIntrinsicTests/Arm/SveTests.cs | Adds SveSm4Inputs generator definitions |
| src/tests/Common/GenerateHWIntrinsicTests/Arm/AdvSimdTests.cs | Adds Sm4Inputs generator definitions |
| src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs | Adds new public ref surface for Sm4 and SveSm4 |
| src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sm4.cs | CoreLib implementation stub for Sm4 intrinsics |
| src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/Sm4.PlatformNotSupported.cs | PlatformNotSupported implementation for Sm4 |
| src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/SveSm4.cs | CoreLib implementation stub for SveSm4 intrinsics |
| src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/Arm/SveSm4.PlatformNotSupported.cs | PlatformNotSupported implementation for SveSm4 |
| src/libraries/System.Private.CoreLib/src/System.Private.CoreLib.Shared.projitems | Adds Sm4/SveSm4 compile items (and reorders nearby entries) |
| src/libraries/System.Private.CoreLib/src/ILLink/ILLink.Substitutions.NoArmIntrinsics.xml | Stubs IsSupported for Sm4/SveSm4 when Arm intrinsics are excluded |
| src/coreclr/jit/hwintrinsiclistarm64sve.h | Adds SveSm4 intrinsics (Encode/KeyUpdate) |
| src/coreclr/jit/hwintrinsiclistarm64.h | Adds Sm4 intrinsics (Encode/KeyUpdate) |
| src/coreclr/jit/hwintrinsiccodegenarm64.cpp | Updates Arm64 HWIntrinsic emission logic for RMW 2-operand intrinsics |
| src/coreclr/jit/hwintrinsic.cpp | Enables ISA ranges for Sm4 and SveSm4 |
| src/coreclr/jit/emitarm64.cpp | Adds INS_sm4e to RMW emission handling in the 3-reg emitter helper |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Change-Id: Icd79648d7bfb6efb2c1695ade6920e95b13fa51e
a74nh
commented
Jul 1, 2026
@dhartglassMSFT : Next set is ready for review |
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Fixes#94426
Fixes#98696