Skip to content

Conversation

@imhameed
Copy link
Contributor

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: #40167

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: dotnet#40167
@ghost
Copy link

ghost commented Aug 15, 2020

Tagging subscribers to this area: @CoffeeFlux
See info in area-owners.md if you want to be subscribed.

Address feedback: remove the size from some local array definitions, and
hide ves_icall_System_Runtime_Intrinsics_X86_X86Base___cpuidex behind
TARGET_AMD64.
@imhameed imhameed force-pushed the x86base-intrinsics branch from 29ae3b9 to d5a9b09 Compare August 17, 2020 06:42
@imhameed imhameed merged commit 1fb34e7 into dotnet:master Aug 17, 2020
@akoeplinger
Copy link
Member

@imhameed this causes a new warning during the build:

  /Users/alexander/dev/runtime2/src/mono/mono/utils/mono-hwcap-x86.c:33:1: warning: no previous prototype for function 'mono_cpuidex' [-Wmissing-prototypes]
  mono_cpuidex (int id, int sub_id, int *p_eax, int *p_ebx, int *p_ecx, int *p_edx)
  ^
  /Users/alexander/dev/runtime2/src/mono/mono/utils/mono-hwcap-x86.c:32:1: note: declare 'static' if the function is not intended to be used outside of this translation unit
  gboolean
  ^
  static
  1 warning generated.

@imhameed
Copy link
Contributor Author

Whoops. I'll take care of it.

@ghost ghost locked as resolved and limited conversation to collaborators Dec 7, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants