@@ -32,6 +32,7 @@ public enum InstructionSet
32
32
ARM64_VectorT128 = InstructionSet_ARM64 . VectorT128 ,
33
33
ARM64_Rcpc2 = InstructionSet_ARM64 . Rcpc2 ,
34
34
ARM64_Sve = InstructionSet_ARM64 . Sve ,
35
+ ARM64_Sve2 = InstructionSet_ARM64 . Sve2 ,
35
36
ARM64_ArmBase_Arm64 = InstructionSet_ARM64 . ArmBase_Arm64 ,
36
37
ARM64_AdvSimd_Arm64 = InstructionSet_ARM64 . AdvSimd_Arm64 ,
37
38
ARM64_Aes_Arm64 = InstructionSet_ARM64 . Aes_Arm64 ,
@@ -41,6 +42,7 @@ public enum InstructionSet
41
42
ARM64_Sha1_Arm64 = InstructionSet_ARM64 . Sha1_Arm64 ,
42
43
ARM64_Sha256_Arm64 = InstructionSet_ARM64 . Sha256_Arm64 ,
43
44
ARM64_Sve_Arm64 = InstructionSet_ARM64 . Sve_Arm64 ,
45
+ ARM64_Sve2_Arm64 = InstructionSet_ARM64 . Sve2_Arm64 ,
44
46
RiscV64_RiscV64Base = InstructionSet_RiscV64 . RiscV64Base ,
45
47
RiscV64_Zba = InstructionSet_RiscV64 . Zba ,
46
48
RiscV64_Zbb = InstructionSet_RiscV64 . Zbb ,
@@ -213,15 +215,17 @@ public enum InstructionSet_ARM64
213
215
VectorT128 = 14 ,
214
216
Rcpc2 = 15 ,
215
217
Sve = 16 ,
216
- ArmBase_Arm64 = 17 ,
217
- AdvSimd_Arm64 = 18 ,
218
- Aes_Arm64 = 19 ,
219
- Crc32_Arm64 = 20 ,
220
- Dp_Arm64 = 21 ,
221
- Rdm_Arm64 = 22 ,
222
- Sha1_Arm64 = 23 ,
223
- Sha256_Arm64 = 24 ,
224
- Sve_Arm64 = 25 ,
218
+ Sve2 = 17 ,
219
+ ArmBase_Arm64 = 18 ,
220
+ AdvSimd_Arm64 = 19 ,
221
+ Aes_Arm64 = 20 ,
222
+ Crc32_Arm64 = 21 ,
223
+ Dp_Arm64 = 22 ,
224
+ Rdm_Arm64 = 23 ,
225
+ Sha1_Arm64 = 24 ,
226
+ Sha256_Arm64 = 25 ,
227
+ Sve_Arm64 = 26 ,
228
+ Sve2_Arm64 = 27 ,
225
229
}
226
230
227
231
public enum InstructionSet_RiscV64
@@ -587,6 +591,10 @@ public static InstructionSetFlags ExpandInstructionSetByImplicationHelper(Target
587
591
resultflags . AddInstructionSet ( InstructionSet . ARM64_Sve_Arm64 ) ;
588
592
if ( resultflags . HasInstructionSet ( InstructionSet . ARM64_Sve_Arm64 ) )
589
593
resultflags . AddInstructionSet ( InstructionSet . ARM64_Sve ) ;
594
+ if ( resultflags . HasInstructionSet ( InstructionSet . ARM64_Sve2 ) )
595
+ resultflags . AddInstructionSet ( InstructionSet . ARM64_Sve2_Arm64 ) ;
596
+ if ( resultflags . HasInstructionSet ( InstructionSet . ARM64_Sve2_Arm64 ) )
597
+ resultflags . AddInstructionSet ( InstructionSet . ARM64_Sve2 ) ;
590
598
if ( resultflags . HasInstructionSet ( InstructionSet . ARM64_AdvSimd ) )
591
599
resultflags . AddInstructionSet ( InstructionSet . ARM64_ArmBase ) ;
592
600
if ( resultflags . HasInstructionSet ( InstructionSet . ARM64_Aes ) )
@@ -609,6 +617,8 @@ public static InstructionSetFlags ExpandInstructionSetByImplicationHelper(Target
609
617
resultflags . AddInstructionSet ( InstructionSet . ARM64_AdvSimd ) ;
610
618
if ( resultflags . HasInstructionSet ( InstructionSet . ARM64_Sve ) )
611
619
resultflags . AddInstructionSet ( InstructionSet . ARM64_AdvSimd ) ;
620
+ if ( resultflags . HasInstructionSet ( InstructionSet . ARM64_Sve2 ) )
621
+ resultflags . AddInstructionSet ( InstructionSet . ARM64_Sve ) ;
612
622
break ;
613
623
614
624
case TargetArchitecture . RiscV64 :
@@ -1027,6 +1037,8 @@ private static InstructionSetFlags ExpandInstructionSetByReverseImplicationHelpe
1027
1037
resultflags . AddInstructionSet ( InstructionSet . ARM64_Sha256 ) ;
1028
1038
if ( resultflags . HasInstructionSet ( InstructionSet . ARM64_Sve_Arm64 ) )
1029
1039
resultflags . AddInstructionSet ( InstructionSet . ARM64_Sve ) ;
1040
+ if ( resultflags . HasInstructionSet ( InstructionSet . ARM64_Sve2_Arm64 ) )
1041
+ resultflags . AddInstructionSet ( InstructionSet . ARM64_Sve2 ) ;
1030
1042
if ( resultflags . HasInstructionSet ( InstructionSet . ARM64_ArmBase ) )
1031
1043
resultflags . AddInstructionSet ( InstructionSet . ARM64_AdvSimd ) ;
1032
1044
if ( resultflags . HasInstructionSet ( InstructionSet . ARM64_ArmBase ) )
@@ -1049,6 +1061,8 @@ private static InstructionSetFlags ExpandInstructionSetByReverseImplicationHelpe
1049
1061
resultflags . AddInstructionSet ( InstructionSet . ARM64_VectorT128 ) ;
1050
1062
if ( resultflags . HasInstructionSet ( InstructionSet . ARM64_AdvSimd ) )
1051
1063
resultflags . AddInstructionSet ( InstructionSet . ARM64_Sve ) ;
1064
+ if ( resultflags . HasInstructionSet ( InstructionSet . ARM64_Sve ) )
1065
+ resultflags . AddInstructionSet ( InstructionSet . ARM64_Sve2 ) ;
1052
1066
break ;
1053
1067
1054
1068
case TargetArchitecture . RiscV64 :
@@ -1443,6 +1457,7 @@ public static IEnumerable<InstructionSetInfo> ArchitectureToValidInstructionSets
1443
1457
yield return new InstructionSetInfo ( "vectort128" , "VectorT128" , InstructionSet . ARM64_VectorT128 , true ) ;
1444
1458
yield return new InstructionSetInfo ( "rcpc2" , "" , InstructionSet . ARM64_Rcpc2 , true ) ;
1445
1459
yield return new InstructionSetInfo ( "sve" , "Sve" , InstructionSet . ARM64_Sve , true ) ;
1460
+ yield return new InstructionSetInfo ( "sve2" , "Sve2" , InstructionSet . ARM64_Sve2 , true ) ;
1446
1461
break ;
1447
1462
1448
1463
case TargetArchitecture . RiscV64 :
@@ -1575,6 +1590,8 @@ public void Set64BitInstructionSetVariants(TargetArchitecture architecture)
1575
1590
AddInstructionSet ( InstructionSet . ARM64_Sha256_Arm64 ) ;
1576
1591
if ( HasInstructionSet ( InstructionSet . ARM64_Sve ) )
1577
1592
AddInstructionSet ( InstructionSet . ARM64_Sve_Arm64 ) ;
1593
+ if ( HasInstructionSet ( InstructionSet . ARM64_Sve2 ) )
1594
+ AddInstructionSet ( InstructionSet . ARM64_Sve2_Arm64 ) ;
1578
1595
break ;
1579
1596
1580
1597
case TargetArchitecture . RiscV64 :
@@ -1659,6 +1676,7 @@ public void Set64BitInstructionSetVariantsUnconditionally(TargetArchitecture arc
1659
1676
AddInstructionSet ( InstructionSet . ARM64_Sha1_Arm64 ) ;
1660
1677
AddInstructionSet ( InstructionSet . ARM64_Sha256_Arm64 ) ;
1661
1678
AddInstructionSet ( InstructionSet . ARM64_Sve_Arm64 ) ;
1679
+ AddInstructionSet ( InstructionSet . ARM64_Sve2_Arm64 ) ;
1662
1680
break ;
1663
1681
1664
1682
case TargetArchitecture . RiscV64 :
@@ -1832,6 +1850,12 @@ public static InstructionSet LookupPlatformIntrinsicInstructionSet(TargetArchite
1832
1850
else
1833
1851
{ return InstructionSet . ARM64_Sve ; }
1834
1852
1853
+ case "Sve2" :
1854
+ if ( nestedTypeName == "Arm64" )
1855
+ { return InstructionSet . ARM64_Sve2_Arm64 ; }
1856
+ else
1857
+ { return InstructionSet . ARM64_Sve2 ; }
1858
+
1835
1859
}
1836
1860
break ;
1837
1861
0 commit comments