Skip to content

Commit 265fbfa

Browse files
[AArch64] Add FPAC to apple- processors that have it. (#102072)
We added FPAC recently in d7e8a74 to allow ptrauth codegen to rely on the cpu auth failure checks rather than emitting its own auth failure check/brk sequence. Add it to the Apple processors that do have it: A15, A16, A17, M4. While there, tweak the description to refer to Armv8.3-A rather than v8.3-A, matching the other features.
1 parent 396343f commit 265fbfa

File tree

7 files changed

+28
-17
lines changed

7 files changed

+28
-17
lines changed

clang/test/Driver/print-enabled-extensions/aarch64-apple-a15.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
// CHECK-NEXT: FEAT_FHM Enable FP16 FML instructions
2424
// CHECK-NEXT: FEAT_FP Enable Armv8.0-A Floating Point Extensions
2525
// CHECK-NEXT: FEAT_FP16 Enable half-precision floating-point data processing
26+
// CHECK-NEXT: FEAT_FPAC Enable Armv8.3-A Pointer Authentication Faulting enhancement
2627
// CHECK-NEXT: FEAT_FRINTTS Enable FRInt[32|64][Z|X] instructions that round a floating-point number to an integer (in FP format) forcing it to fit into a 32- or 64-bit int
2728
// CHECK-NEXT: FEAT_FlagM Enable Armv8.4-A Flag Manipulation instructions
2829
// CHECK-NEXT: FEAT_FlagM2 Enable alternative NZCV format for floating point comparisons

clang/test/Driver/print-enabled-extensions/aarch64-apple-a16.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
// CHECK-NEXT: FEAT_FHM Enable FP16 FML instructions
2424
// CHECK-NEXT: FEAT_FP Enable Armv8.0-A Floating Point Extensions
2525
// CHECK-NEXT: FEAT_FP16 Enable half-precision floating-point data processing
26+
// CHECK-NEXT: FEAT_FPAC Enable Armv8.3-A Pointer Authentication Faulting enhancement
2627
// CHECK-NEXT: FEAT_FRINTTS Enable FRInt[32|64][Z|X] instructions that round a floating-point number to an integer (in FP format) forcing it to fit into a 32- or 64-bit int
2728
// CHECK-NEXT: FEAT_FlagM Enable Armv8.4-A Flag Manipulation instructions
2829
// CHECK-NEXT: FEAT_FlagM2 Enable alternative NZCV format for floating point comparisons

clang/test/Driver/print-enabled-extensions/aarch64-apple-a17.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
// CHECK-NEXT: FEAT_FHM Enable FP16 FML instructions
2424
// CHECK-NEXT: FEAT_FP Enable Armv8.0-A Floating Point Extensions
2525
// CHECK-NEXT: FEAT_FP16 Enable half-precision floating-point data processing
26+
// CHECK-NEXT: FEAT_FPAC Enable Armv8.3-A Pointer Authentication Faulting enhancement
2627
// CHECK-NEXT: FEAT_FRINTTS Enable FRInt[32|64][Z|X] instructions that round a floating-point number to an integer (in FP format) forcing it to fit into a 32- or 64-bit int
2728
// CHECK-NEXT: FEAT_FlagM Enable Armv8.4-A Flag Manipulation instructions
2829
// CHECK-NEXT: FEAT_FlagM2 Enable alternative NZCV format for floating point comparisons

clang/test/Driver/print-enabled-extensions/aarch64-apple-m4.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,7 @@
2323
// CHECK-NEXT: FEAT_FHM Enable FP16 FML instructions
2424
// CHECK-NEXT: FEAT_FP Enable Armv8.0-A Floating Point Extensions
2525
// CHECK-NEXT: FEAT_FP16 Enable half-precision floating-point data processing
26+
// CHECK-NEXT: FEAT_FPAC Enable Armv8.3-A Pointer Authentication Faulting enhancement
2627
// CHECK-NEXT: FEAT_FRINTTS Enable FRInt[32|64][Z|X] instructions that round a floating-point number to an integer (in FP format) forcing it to fit into a 32- or 64-bit int
2728
// CHECK-NEXT: FEAT_FlagM Enable Armv8.4-A Flag Manipulation instructions
2829
// CHECK-NEXT: FEAT_FlagM2 Enable alternative NZCV format for floating point comparisons

llvm/lib/Target/AArch64/AArch64Features.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def FeatureJS : ExtensionWithMArch<"jsconv", "JS", "FEAT_JSCVT",
186186
[FeatureFPARMv8]>;
187187

188188
def FeatureFPAC : Extension<"fpac", "FPAC", "FEAT_FPAC",
189-
"Enable v8.3-A Pointer Authentication Faulting enhancement">;
189+
"Enable Armv8.3-A Pointer Authentication Faulting enhancement">;
190190

191191
def FeatureCCIDX : Extension<"ccidx", "CCIDX", "FEAT_CCIDX",
192192
"Enable Armv8.3-A Extend of the CCSIDR number of sets">;

llvm/lib/Target/AArch64/AArch64Processors.td

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -863,31 +863,35 @@ def ProcessorFeatures {
863863
list<SubtargetFeature> AppleA15 = [HasV8_6aOps, FeatureSHA2, FeatureAES, FeatureFPARMv8,
864864
FeatureNEON, FeaturePerfMon, FeatureSHA3,
865865
FeatureFullFP16, FeatureFP16FML,
866-
FeatureComplxNum, FeatureCRC, FeatureJS, FeatureLSE,
867-
FeaturePAuth, FeatureRAS, FeatureRCPC, FeatureRDM,
866+
FeatureComplxNum, FeatureCRC, FeatureJS,
867+
FeatureLSE, FeaturePAuth, FeatureFPAC,
868+
FeatureRAS, FeatureRCPC, FeatureRDM,
868869
FeatureBF16, FeatureDotProd, FeatureMatMulInt8];
869870
list<SubtargetFeature> AppleA16 = [HasV8_6aOps, FeatureSHA2, FeatureAES, FeatureFPARMv8,
870871
FeatureNEON, FeaturePerfMon, FeatureSHA3,
871872
FeatureFullFP16, FeatureFP16FML,
872873
FeatureHCX,
873-
FeatureComplxNum, FeatureCRC, FeatureJS, FeatureLSE,
874-
FeaturePAuth, FeatureRAS, FeatureRCPC, FeatureRDM,
874+
FeatureComplxNum, FeatureCRC, FeatureJS,
875+
FeatureLSE, FeaturePAuth, FeatureFPAC,
876+
FeatureRAS, FeatureRCPC, FeatureRDM,
875877
FeatureBF16, FeatureDotProd, FeatureMatMulInt8];
876878
list<SubtargetFeature> AppleA17 = [HasV8_6aOps, FeatureSHA2, FeatureAES, FeatureFPARMv8,
877879
FeatureNEON, FeaturePerfMon, FeatureSHA3,
878880
FeatureFullFP16, FeatureFP16FML,
879881
FeatureHCX,
880-
FeatureComplxNum, FeatureCRC, FeatureJS, FeatureLSE,
881-
FeaturePAuth, FeatureRAS, FeatureRCPC, FeatureRDM,
882+
FeatureComplxNum, FeatureCRC, FeatureJS,
883+
FeatureLSE, FeaturePAuth, FeatureFPAC,
884+
FeatureRAS, FeatureRCPC, FeatureRDM,
882885
FeatureBF16, FeatureDotProd, FeatureMatMulInt8];
883886
list<SubtargetFeature> AppleM4 = [HasV9_2aOps, FeatureSHA2, FeatureFPARMv8,
884887
FeatureNEON, FeaturePerfMon, FeatureSHA3,
885888
FeatureFullFP16, FeatureFP16FML,
886889
FeatureAES, FeatureBF16,
887890
FeatureSME, FeatureSME2,
888891
FeatureSMEF64F64, FeatureSMEI16I64,
889-
FeatureComplxNum, FeatureCRC, FeatureJS, FeatureLSE,
890-
FeaturePAuth, FeatureRAS, FeatureRCPC, FeatureRDM,
892+
FeatureComplxNum, FeatureCRC, FeatureJS,
893+
FeatureLSE, FeaturePAuth, FeatureFPAC,
894+
FeatureRAS, FeatureRCPC, FeatureRDM,
891895
FeatureDotProd, FeatureMatMulInt8];
892896
list<SubtargetFeature> ExynosM3 = [HasV8_0aOps, FeatureCRC, FeatureSHA2, FeatureAES,
893897
FeaturePerfMon, FeatureNEON, FeatureFPARMv8];

llvm/unittests/TargetParser/TargetParserTest.cpp

Lines changed: 11 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1591,7 +1591,7 @@ INSTANTIATE_TEST_SUITE_P(
15911591
AArch64::AEK_RCPC, AArch64::AEK_DOTPROD, AArch64::AEK_FP16,
15921592
AArch64::AEK_FP16FML, AArch64::AEK_SHA3, AArch64::AEK_BF16,
15931593
AArch64::AEK_I8MM, AArch64::AEK_JSCVT, AArch64::AEK_FCMA,
1594-
AArch64::AEK_PAUTH, AArch64::AEK_PERFMON}),
1594+
AArch64::AEK_PAUTH, AArch64::AEK_FPAC, AArch64::AEK_PERFMON}),
15951595
AArch64CPUTestParams(
15961596
"apple-m2", "armv8.6-a",
15971597
{AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
@@ -1600,7 +1600,7 @@ INSTANTIATE_TEST_SUITE_P(
16001600
AArch64::AEK_RCPC, AArch64::AEK_DOTPROD, AArch64::AEK_FP16,
16011601
AArch64::AEK_FP16FML, AArch64::AEK_SHA3, AArch64::AEK_BF16,
16021602
AArch64::AEK_I8MM, AArch64::AEK_JSCVT, AArch64::AEK_FCMA,
1603-
AArch64::AEK_PAUTH, AArch64::AEK_PERFMON}),
1603+
AArch64::AEK_PAUTH, AArch64::AEK_FPAC, AArch64::AEK_PERFMON}),
16041604
AArch64CPUTestParams(
16051605
"apple-a16", "armv8.6-a",
16061606
{AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
@@ -1609,7 +1609,8 @@ INSTANTIATE_TEST_SUITE_P(
16091609
AArch64::AEK_RCPC, AArch64::AEK_DOTPROD, AArch64::AEK_FP16,
16101610
AArch64::AEK_FP16FML, AArch64::AEK_SHA3, AArch64::AEK_BF16,
16111611
AArch64::AEK_I8MM, AArch64::AEK_JSCVT, AArch64::AEK_FCMA,
1612-
AArch64::AEK_PAUTH, AArch64::AEK_PERFMON, AArch64::AEK_HCX}),
1612+
AArch64::AEK_PAUTH, AArch64::AEK_FPAC, AArch64::AEK_PERFMON,
1613+
AArch64::AEK_HCX}),
16131614
AArch64CPUTestParams(
16141615
"apple-m3", "armv8.6-a",
16151616
{AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
@@ -1618,7 +1619,8 @@ INSTANTIATE_TEST_SUITE_P(
16181619
AArch64::AEK_RCPC, AArch64::AEK_DOTPROD, AArch64::AEK_FP16,
16191620
AArch64::AEK_FP16FML, AArch64::AEK_SHA3, AArch64::AEK_BF16,
16201621
AArch64::AEK_I8MM, AArch64::AEK_JSCVT, AArch64::AEK_FCMA,
1621-
AArch64::AEK_PAUTH, AArch64::AEK_PERFMON, AArch64::AEK_HCX}),
1622+
AArch64::AEK_PAUTH, AArch64::AEK_FPAC, AArch64::AEK_PERFMON,
1623+
AArch64::AEK_HCX}),
16221624
AArch64CPUTestParams(
16231625
"apple-a17", "armv8.6-a",
16241626
{AArch64::AEK_CRC, AArch64::AEK_AES, AArch64::AEK_SHA2,
@@ -1627,7 +1629,8 @@ INSTANTIATE_TEST_SUITE_P(
16271629
AArch64::AEK_RCPC, AArch64::AEK_DOTPROD, AArch64::AEK_FP16,
16281630
AArch64::AEK_FP16FML, AArch64::AEK_SHA3, AArch64::AEK_BF16,
16291631
AArch64::AEK_I8MM, AArch64::AEK_JSCVT, AArch64::AEK_FCMA,
1630-
AArch64::AEK_PAUTH, AArch64::AEK_PERFMON, AArch64::AEK_HCX}),
1632+
AArch64::AEK_PAUTH, AArch64::AEK_FPAC, AArch64::AEK_PERFMON,
1633+
AArch64::AEK_HCX}),
16311634
AArch64CPUTestParams("apple-m4", "armv9.2-a",
16321635
{AArch64::AEK_CRC, AArch64::AEK_AES,
16331636
AArch64::AEK_SHA2, AArch64::AEK_SHA3,
@@ -1637,10 +1640,10 @@ INSTANTIATE_TEST_SUITE_P(
16371640
AArch64::AEK_DOTPROD, AArch64::AEK_FP16,
16381641
AArch64::AEK_FP16FML, AArch64::AEK_BF16,
16391642
AArch64::AEK_I8MM, AArch64::AEK_JSCVT,
1640-
AArch64::AEK_FCMA, AArch64::AEK_PAUTH,
1643+
AArch64::AEK_PAUTH, AArch64::AEK_FPAC,
1644+
AArch64::AEK_FCMA, AArch64::AEK_PERFMON,
16411645
AArch64::AEK_SME, AArch64::AEK_SME2,
1642-
AArch64::AEK_SMEF64F64, AArch64::AEK_SMEI16I64,
1643-
AArch64::AEK_PERFMON}),
1646+
AArch64::AEK_SMEF64F64, AArch64::AEK_SMEI16I64}),
16441647
AArch64CPUTestParams("exynos-m3", "armv8-a",
16451648
{AArch64::AEK_CRC, AArch64::AEK_AES,
16461649
AArch64::AEK_SHA2, AArch64::AEK_FP,

0 commit comments

Comments
 (0)