Skip to content
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