Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix x86 hardware intrinsics #99894

Merged
merged 1 commit into from
Mar 19, 2024
Merged

Fix x86 hardware intrinsics #99894

merged 1 commit into from
Mar 19, 2024

Conversation

MichalStrehovsky
Copy link
Member

GetHardwareIntrinsicId should not handle x64 intrinsics on x86.

However, we were relying on this happening in IsHardwareIntrinsic. So also fixing IsHardwareIntrinsic to work the same as CoreCLR VM.

Cc @dotnet/ilc-contrib

Copy link
Contributor

Tagging subscribers to this area: @agocke, @MichalStrehovsky, @jkotas
See info in area-owners.md if you want to be subscribed.

Comment on lines -83 to -84
if (potentialType.Name == "X64")
potentialType = (MetadataType)potentialType.ContainingType;
Copy link
Member

Choose a reason for hiding this comment

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

Is this "correct"? Should we not just return "" instead to simplify things and ensure that potentialType.Name isn't returned (in this case "X64")?

Copy link
Member Author

Choose a reason for hiding this comment

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

If this is the X64 nested type, we'll take the exit on line 86 and return an empty string. Nested types don't set a namespace so (potentialType.Namespace != "System.Runtime.Intrinsics.X86") is true.

@jkotas jkotas merged commit 6d412f4 into dotnet:main Mar 19, 2024
90 checks passed
@MichalStrehovsky MichalStrehovsky deleted the altfix branch March 19, 2024 23:38
@github-actions github-actions bot locked and limited conversation to collaborators Apr 19, 2024
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.

4 participants