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 GetHardwareIntrinsicId on 32bit platforms #110238

Merged
merged 2 commits into from
Dec 3, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 7 additions & 2 deletions src/coreclr/tools/Common/Compiler/InstructionSetSupport.cs
Original file line number Diff line number Diff line change
Expand Up @@ -71,8 +71,13 @@ public static string GetHardwareIntrinsicId(TargetArchitecture architecture, Typ
return "";

// 64-bit ISA variants are not included in the mapping dictionary, so we use the containing type instead
if ((architecture, potentialType.Name) is (TargetArchitecture.X64, "X64") or (TargetArchitecture.ARM64, "Arm64"))
potentialType = (MetadataType)potentialType.ContainingType;
if (potentialType.Name is "X64" or "Arm64")
{
if (architecture is TargetArchitecture.X64 or TargetArchitecture.ARM64)
potentialType = (MetadataType)potentialType.ContainingType;
else
return "";
}

// We assume that managed names in InstructionSetDesc.txt use an underscore separator for nested classes
string suffix = "";
Expand Down
Loading