Adding support for X86Base.CpuId (#40167)
authorTanner Gooding <tagoo@outlook.com>
Wed, 5 Aug 2020 22:16:05 +0000 (15:16 -0700)
committerGitHub <noreply@github.com>
Wed, 5 Aug 2020 22:16:05 +0000 (15:16 -0700)
commit96f178d32b7ba62485917ac46ef1edcfd3c2d10d
tree9ae43c768163717fa041841e026dee72943275e6
parent5c29e1483e0ca803c8be3ea6a0a8cfe899b2a813
Adding support for X86Base.CpuId (#40167)

* Adding support for X86Base.CpuId

* Rename getcpuid and getextcpuid to __cpuid and __cpuidex, respectively

* Removing xchg from the Unix x64 __cpuid implementation

* Add a comment as to why the X86/X86Base/CpuId test limits the checked vendors

* Apply suggestions from code review

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
* Adding back a missing parentheses

* Fixing a typo in the isGenuineIntel check

* Avoid a conflict around cpuInfo

* Avoid an implicit cast when comparing the cpuidInfo

* Separate the __cpuidex qcall into coreclr and mono specific variants

* Add the partial modifier to the X86Base.PlatformNotSupported.cs file

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
27 files changed:
src/coreclr/src/System.Private.CoreLib/System.Private.CoreLib.csproj
src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/X86Base.CoreCLR.cs [new file with mode: 0644]
src/coreclr/src/classlibnative/bcltype/system.cpp
src/coreclr/src/classlibnative/bcltype/system.h
src/coreclr/src/vm/amd64/AsmHelpers.asm
src/coreclr/src/vm/amd64/unixstubs.cpp
src/coreclr/src/vm/cgensys.h
src/coreclr/src/vm/codeman.cpp
src/coreclr/src/vm/ecalllist.h
src/coreclr/src/vm/i386/cgenx86.cpp
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi1.PlatformNotSupported.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi1.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi2.PlatformNotSupported.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Bmi2.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Lzcnt.PlatformNotSupported.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Lzcnt.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse.PlatformNotSupported.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/Sse.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/X86Base.PlatformNotSupported.cs
src/libraries/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/X86Base.cs
src/libraries/System.Runtime.Intrinsics/ref/System.Runtime.Intrinsics.cs
src/mono/netcore/System.Private.CoreLib/System.Private.CoreLib.csproj
src/mono/netcore/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/X86Base.Mono.cs [new file with mode: 0644]
src/tests/JIT/HardwareIntrinsics/X86/X86Base/CpuId.cs [new file with mode: 0644]
src/tests/JIT/HardwareIntrinsics/X86/X86Base/CpuId_r.csproj [new file with mode: 0644]
src/tests/JIT/HardwareIntrinsics/X86/X86Base/CpuId_ro.csproj [new file with mode: 0644]
src/tests/JIT/Regression/JitBlue/Runtime_34587/Runtime_34587.cs