@@ -1020,10 +1020,10 @@ public static IEnumerable<InstructionSetInfo> ArchitectureToValidInstructionSets
10201020 break ;
10211021
10221022 case TargetArchitecture . RiscV64 :
1023- yield return new InstructionSetInfo ( "base" , "RiscV64Base " , InstructionSet . RiscV64_RiscV64Base , true ) ;
1024- yield return new InstructionSetInfo ( "zba" , "Zba " , InstructionSet . RiscV64_Zba , true ) ;
1025- yield return new InstructionSetInfo ( "zbb" , "Zbb " , InstructionSet . RiscV64_Zbb , true ) ;
1026- yield return new InstructionSetInfo ( "zbs" , "Zbs " , InstructionSet . RiscV64_Zbs , true ) ;
1023+ yield return new InstructionSetInfo ( "base" , "" , InstructionSet . RiscV64_RiscV64Base , true ) ;
1024+ yield return new InstructionSetInfo ( "zba" , "" , InstructionSet . RiscV64_Zba , true ) ;
1025+ yield return new InstructionSetInfo ( "zbb" , "" , InstructionSet . RiscV64_Zbb , true ) ;
1026+ yield return new InstructionSetInfo ( "zbs" , "" , InstructionSet . RiscV64_Zbs , true ) ;
10271027 break ;
10281028
10291029 case TargetArchitecture . X64 :
@@ -1335,6 +1335,9 @@ public static InstructionSet LookupPlatformIntrinsicInstructionSet(TargetArchite
13351335 break ;
13361336
13371337 case TargetArchitecture . X64 :
1338+ platformIntrinsicNamespace = "System.Runtime.Intrinsics.X86" ;
1339+ break ;
1340+
13381341 case TargetArchitecture . X86 :
13391342 platformIntrinsicNamespace = "System.Runtime.Intrinsics.X86" ;
13401343 break ;
@@ -1413,28 +1416,16 @@ public static InstructionSet LookupPlatformIntrinsicInstructionSet(TargetArchite
14131416 else
14141417 { return InstructionSet . ARM64_Sve2 ; }
14151418
1419+ default :
1420+ return InstructionSet . ILLEGAL ;
14161421 }
1417- break ;
1418-
14191422 case TargetArchitecture . RiscV64 :
14201423 switch ( typeName )
14211424 {
14221425
1423- case "RiscV64Base" :
1424- { return InstructionSet . RiscV64_RiscV64Base ; }
1425-
1426- case "Zba" :
1427- { return InstructionSet . RiscV64_Zba ; }
1428-
1429- case "Zbb" :
1430- { return InstructionSet . RiscV64_Zbb ; }
1431-
1432- case "Zbs" :
1433- { return InstructionSet . RiscV64_Zbs ; }
1434-
1426+ default :
1427+ return InstructionSet . ILLEGAL ;
14351428 }
1436- break ;
1437-
14381429 case TargetArchitecture . X64 :
14391430 switch ( typeName )
14401431 {
@@ -1763,9 +1754,9 @@ public static InstructionSet LookupPlatformIntrinsicInstructionSet(TargetArchite
17631754 else
17641755 { return InstructionSet . X64_AVXVNNIINT ; }
17651756
1757+ default :
1758+ return InstructionSet . ILLEGAL ;
17661759 }
1767- break ;
1768-
17691760 case TargetArchitecture . X86 :
17701761 switch ( typeName )
17711762 {
@@ -1947,9 +1938,9 @@ public static InstructionSet LookupPlatformIntrinsicInstructionSet(TargetArchite
19471938 else
19481939 { return InstructionSet . X86_AVXVNNIINT ; }
19491940
1941+ default :
1942+ return InstructionSet . ILLEGAL ;
19501943 }
1951- break ;
1952-
19531944 }
19541945 return InstructionSet . ILLEGAL ;
19551946 }
@@ -1961,7 +1952,7 @@ public static IEnumerable<MetadataType> LookupPlatformIntrinsicTypes(TypeSystemC
19611952 case ( InstructionSet . ARM64_ArmBase , TargetArchitecture . ARM64 ) :
19621953 case ( InstructionSet . ARM64_ArmBase_Arm64 , TargetArchitecture . ARM64 ) :
19631954 {
1964- var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm64 "u8 , "ArmBase"u8 , true ) ;
1955+ var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm "u8 , "ArmBase"u8 , true ) ;
19651956 yield return type ;
19661957 if ( instructionSet == InstructionSet . ARM64_ArmBase_Arm64 )
19671958 {
@@ -1973,7 +1964,7 @@ public static IEnumerable<MetadataType> LookupPlatformIntrinsicTypes(TypeSystemC
19731964 case ( InstructionSet . ARM64_AdvSimd , TargetArchitecture . ARM64 ) :
19741965 case ( InstructionSet . ARM64_AdvSimd_Arm64 , TargetArchitecture . ARM64 ) :
19751966 {
1976- var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm64 "u8 , "AdvSimd"u8 , true ) ;
1967+ var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm "u8 , "AdvSimd"u8 , true ) ;
19771968 yield return type ;
19781969 if ( instructionSet == InstructionSet . ARM64_AdvSimd_Arm64 )
19791970 {
@@ -1985,7 +1976,7 @@ public static IEnumerable<MetadataType> LookupPlatformIntrinsicTypes(TypeSystemC
19851976 case ( InstructionSet . ARM64_Aes , TargetArchitecture . ARM64 ) :
19861977 case ( InstructionSet . ARM64_Aes_Arm64 , TargetArchitecture . ARM64 ) :
19871978 {
1988- var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm64 "u8 , "Aes"u8 , true ) ;
1979+ var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm "u8 , "Aes"u8 , true ) ;
19891980 yield return type ;
19901981 if ( instructionSet == InstructionSet . ARM64_Aes_Arm64 )
19911982 {
@@ -1997,7 +1988,7 @@ public static IEnumerable<MetadataType> LookupPlatformIntrinsicTypes(TypeSystemC
19971988 case ( InstructionSet . ARM64_Crc32 , TargetArchitecture . ARM64 ) :
19981989 case ( InstructionSet . ARM64_Crc32_Arm64 , TargetArchitecture . ARM64 ) :
19991990 {
2000- var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm64 "u8 , "Crc32"u8 , true ) ;
1991+ var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm "u8 , "Crc32"u8 , true ) ;
20011992 yield return type ;
20021993 if ( instructionSet == InstructionSet . ARM64_Crc32_Arm64 )
20031994 {
@@ -2009,7 +2000,7 @@ public static IEnumerable<MetadataType> LookupPlatformIntrinsicTypes(TypeSystemC
20092000 case ( InstructionSet . ARM64_Dp , TargetArchitecture . ARM64 ) :
20102001 case ( InstructionSet . ARM64_Dp_Arm64 , TargetArchitecture . ARM64 ) :
20112002 {
2012- var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm64 "u8 , "Dp"u8 , true ) ;
2003+ var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm "u8 , "Dp"u8 , true ) ;
20132004 yield return type ;
20142005 if ( instructionSet == InstructionSet . ARM64_Dp_Arm64 )
20152006 {
@@ -2021,7 +2012,7 @@ public static IEnumerable<MetadataType> LookupPlatformIntrinsicTypes(TypeSystemC
20212012 case ( InstructionSet . ARM64_Rdm , TargetArchitecture . ARM64 ) :
20222013 case ( InstructionSet . ARM64_Rdm_Arm64 , TargetArchitecture . ARM64 ) :
20232014 {
2024- var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm64 "u8 , "Rdm"u8 , true ) ;
2015+ var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm "u8 , "Rdm"u8 , true ) ;
20252016 yield return type ;
20262017 if ( instructionSet == InstructionSet . ARM64_Rdm_Arm64 )
20272018 {
@@ -2033,7 +2024,7 @@ public static IEnumerable<MetadataType> LookupPlatformIntrinsicTypes(TypeSystemC
20332024 case ( InstructionSet . ARM64_Sha1 , TargetArchitecture . ARM64 ) :
20342025 case ( InstructionSet . ARM64_Sha1_Arm64 , TargetArchitecture . ARM64 ) :
20352026 {
2036- var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm64 "u8 , "Sha1"u8 , true ) ;
2027+ var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm "u8 , "Sha1"u8 , true ) ;
20372028 yield return type ;
20382029 if ( instructionSet == InstructionSet . ARM64_Sha1_Arm64 )
20392030 {
@@ -2045,7 +2036,7 @@ public static IEnumerable<MetadataType> LookupPlatformIntrinsicTypes(TypeSystemC
20452036 case ( InstructionSet . ARM64_Sha256 , TargetArchitecture . ARM64 ) :
20462037 case ( InstructionSet . ARM64_Sha256_Arm64 , TargetArchitecture . ARM64 ) :
20472038 {
2048- var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm64 "u8 , "Sha256"u8 , true ) ;
2039+ var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm "u8 , "Sha256"u8 , true ) ;
20492040 yield return type ;
20502041 if ( instructionSet == InstructionSet . ARM64_Sha256_Arm64 )
20512042 {
@@ -2057,7 +2048,7 @@ public static IEnumerable<MetadataType> LookupPlatformIntrinsicTypes(TypeSystemC
20572048 case ( InstructionSet . ARM64_Sve , TargetArchitecture . ARM64 ) :
20582049 case ( InstructionSet . ARM64_Sve_Arm64 , TargetArchitecture . ARM64 ) :
20592050 {
2060- var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm64 "u8 , "Sve"u8 , true ) ;
2051+ var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm "u8 , "Sve"u8 , true ) ;
20612052 yield return type ;
20622053 if ( instructionSet == InstructionSet . ARM64_Sve_Arm64 )
20632054 {
@@ -2069,7 +2060,7 @@ public static IEnumerable<MetadataType> LookupPlatformIntrinsicTypes(TypeSystemC
20692060 case ( InstructionSet . ARM64_Sve2 , TargetArchitecture . ARM64 ) :
20702061 case ( InstructionSet . ARM64_Sve2_Arm64 , TargetArchitecture . ARM64 ) :
20712062 {
2072- var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm64 "u8 , "Sve2"u8 , true ) ;
2063+ var type = context . SystemModule . GetType ( "System.Runtime.Intrinsics.Arm "u8 , "Sve2"u8 , true ) ;
20732064 yield return type ;
20742065 if ( instructionSet == InstructionSet . ARM64_Sve2_Arm64 )
20752066 {
0 commit comments