-
Notifications
You must be signed in to change notification settings - Fork 4.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
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 <[email protected]> * 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 <[email protected]>
- Loading branch information
1 parent
5c29e14
commit 96f178d
Showing
27 changed files
with
460 additions
and
262 deletions.
There are no files selected for viewing
This file contains 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
14 changes: 14 additions & 0 deletions
14
src/coreclr/src/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/X86Base.CoreCLR.cs
This file contains 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
// Licensed to the .NET Foundation under one or more agreements. | ||
// The .NET Foundation licenses this file to you under the MIT license. | ||
|
||
using System.Runtime.CompilerServices; | ||
using System.Runtime.InteropServices; | ||
|
||
namespace System.Runtime.Intrinsics.X86 | ||
{ | ||
public abstract partial class X86Base | ||
{ | ||
[DllImport(RuntimeHelpers.QCall)] | ||
private static extern unsafe void __cpuidex(int* cpuInfo, int functionId, int subFunctionId); | ||
} | ||
} |
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
This file contains 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
Oops, something went wrong.