dotnet / runtime

.NET is a cross-platform runtime for cloud, mobile, desktop, and IoT apps.
https://docs.microsoft.com/dotnet/core/
MIT License
15.36k stars 4.74k forks source link

[win-arm64] Update EEJitManager::SetCpuInfo in codeman.cpp to support ARMv8.1-RDMA and ARMv8.2-DotProd #39094

Open echesakov opened 4 years ago

echesakov commented 4 years ago

38957 adds JIT implementation for the intrinsics from ARMv8.1-RDMA and ARMv8.2-DotProd architectural extensions.

Linux can check for support of these with arm64 ELF hwcaps and #38957 updates PAL_GetJitCpuCapabilityFlags() to enable that.

On Windows this check was traditionally done with IsProcessorFeaturePresent() that at the moment doesn't have the corresponding PF-enum values.

The issue is track the future work for updating EEJitManager::SetCpuInfo() when IsProcessorFeaturePresent() is extended.

category:implementation theme:hardware-intrinsics skill-level:beginner cost:small

saucecontrol commented 11 months ago

I spent something like 4 hours trying to figure out why Rdm.IsSupported was returning false on my Windows Arm Dev Kit 2023 despite the documentation for the processor indicating the instructions were supported. Turned out to be only disabled in Windows, due to this issue. Since it's been 3 years and IsProcessorFeaturePresent still doesn't support this, is there some other way to detect/enable it in Windows?