Skip to content

Unify hardware feature detection between CoreCLR JIT and AOT - #89342

Merged
jkotas merged 2 commits into
dotnet:mainfrom
jkotas:intrinsic-detection
Jul 23, 2023
Merged

Unify hardware feature detection between CoreCLR JIT and AOT#89342
jkotas merged 2 commits into
dotnet:mainfrom
jkotas:intrinsic-detection

Conversation

@jkotas

Copy link
Copy Markdown
Member

Follow up on #87865

@ghostghost added the area-PAL-coreclr only for closed issues label Jul 22, 2023
@ghostghost assigned jkotasJul 22, 2023

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

DWORD64 FeatureMask = GetEnabledXStateFeatures();
links to GetEnabledXStateFeatures directly, so it is safe to delete the dynamic linking here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's worth noting that the original reason for the dynamic linking was to support Windows 7 prior to SP1.

With Win7 support having been dropped and us just not regressing Win 7 SP1 and later, this is fine.

Copy link
Copy Markdown
MemberAuthor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have noticed these unused files thanks to IsProcessorFeaturePresent call.

@jkotasjkotas changed the title Unity hardware feature detection between CoreCLR JIT and AOTUnify hardware feature detection between CoreCLR JIT and AOTJul 22, 2023
@am11

am11 commented Jul 22, 2023

Copy link
Copy Markdown
Member

cc @gbalykov, if we ever added RISC-V support in src/native/minipal/cpufeatures.c, I think we can make it return the features per-hart (as each hardware thread in RISC-V can technically have different features, e.g. virtual memory range sizes; for which GC can be fine-tuned).

@jkotas
jkotasforce-pushed the intrinsic-detection branch from e3227d8 to 539b8e5CompareJuly 22, 2023 14:26
Comment threadsrc/coreclr/vm/codeman.cpp Outdated
@jkotas
jkotas merged commit 66556c4 into dotnet:mainJul 23, 2023
@jkotas
jkotas deleted the intrinsic-detection branch July 23, 2023 04:13
@ghostghost locked as resolved and limited conversation to collaborators Aug 22, 2023
Sign up for freeto subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

area-PAL-coreclronly for closed issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

@jkotas@am11@tannergooding