[mono] Add `X86Base` support. (#40861)
authorimhameed <imhameed@microsoft.com>
Mon, 17 Aug 2020 22:21:31 +0000 (15:21 -0700)
committerGitHub <noreply@github.com>
Mon, 17 Aug 2020 22:21:31 +0000 (15:21 -0700)
commit1fb34e7445f98aa2e27fb7c3a43777be2669137b
tree5b5513de619cace43e0ee3751dd66dc4de904b7b
parent8a2315dd6248d02d3e8f819cae44d82246557ad1
[mono] Add `X86Base` support. (#40861)

Implement `BitScanForward` and `BitScanReverse` as intrinsics.

Implement `__cpuidex` as a netcore-only icall. Rename `cpuid` (in
mono-hwcap-x86.c) to `mono_cpuidex`, give it extern linkage, and add
support for extended CPUID.

Related: https://github.com/dotnet/runtime/pull/40167

Co-authored-by: imhameed <imhameed@users.noreply.github.com>
src/mono/mono/metadata/icall-decl.h
src/mono/mono/metadata/icall-def-netcore.h
src/mono/mono/mini/mini-llvm.c
src/mono/mono/mini/mini-ops.h
src/mono/mono/mini/simd-intrinsics-netcore.c
src/mono/mono/mini/simd-methods-netcore.h
src/mono/mono/utils/mono-hwcap-x86.c
src/mono/netcore/System.Private.CoreLib/src/System/Runtime/Intrinsics/X86/X86Base.Mono.cs