Skip to content

Commit

Permalink
[llvm][AArch64] apple-m4 is armv9.2-a (llvm#98267)
Browse files Browse the repository at this point in the history
But since SVE and friends have been added to the default extensions
list, and every CPU was opted into those extensions by default, we
couldn't correctly announce its architecutral version to the backend.
Additionally, we FEAT_MEC from llvm's "required" list for v9.0 to the
optional list for v9.2, as the spec considers it optional, and M4 does
not implement it. Similarly, fixes up several bugs w.r.t. FEAT_RME.

As a drive-by, I noticed that saphira did not have an
AArch64CPUTestParams entry, and thus added one.
  • Loading branch information
jroelofs authored Jul 11, 2024
1 parent dffa28f commit c66e1d6
Show file tree
Hide file tree
Showing 26 changed files with 159 additions and 107 deletions.
2 changes: 0 additions & 2 deletions clang/test/Driver/print-enabled-extensions/aarch64-armv9-a.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,15 +27,13 @@
// CHECK-NEXT: FEAT_LRCPC2 Enable v8.4-A RCPC instructions with Immediate Offsets
// CHECK-NEXT: FEAT_LSE Enable ARMv8.1 Large System Extension (LSE) atomic instructions
// CHECK-NEXT: FEAT_LSE2 Enable ARMv8.4 Large System Extension 2 (LSE2) atomicity rules
// CHECK-NEXT: FEAT_MEC Enable Memory Encryption Contexts Extension
// CHECK-NEXT: FEAT_MPAM Enable v8.4-A Memory system Partitioning and Monitoring extension
// CHECK-NEXT: FEAT_NV, FEAT_NV2 Enable v8.4-A Nested Virtualization Enchancement
// CHECK-NEXT: FEAT_PAN Enables ARM v8.1 Privileged Access-Never extension
// CHECK-NEXT: FEAT_PAN2 Enable v8.2 PAN s1e1R and s1e1W Variants
// CHECK-NEXT: FEAT_PAuth Enable v8.3-A Pointer Authentication extension
// CHECK-NEXT: FEAT_RAS, FEAT_RASv1p1 Enable ARMv8 Reliability, Availability and Serviceability Extensions
// CHECK-NEXT: FEAT_RDM Enable ARMv8.1 Rounding Double Multiply Add/Subtract instructions
// CHECK-NEXT: FEAT_RME Enable Realm Management Extension
// CHECK-NEXT: FEAT_SB Enable v8.5 Speculation Barrier
// CHECK-NEXT: FEAT_SEL2 Enable v8.4-A Secure Exception Level 2 extension
// CHECK-NEXT: FEAT_SPECRES Enable v8.5a execution and data prediction invalidation instructions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
// CHECK-NEXT: FEAT_LRCPC2 Enable v8.4-A RCPC instructions with Immediate Offsets
// CHECK-NEXT: FEAT_LSE Enable ARMv8.1 Large System Extension (LSE) atomic instructions
// CHECK-NEXT: FEAT_LSE2 Enable ARMv8.4 Large System Extension 2 (LSE2) atomicity rules
// CHECK-NEXT: FEAT_MEC Enable Memory Encryption Contexts Extension
// CHECK-NEXT: FEAT_MPAM Enable v8.4-A Memory system Partitioning and Monitoring extension
// CHECK-NEXT: FEAT_NV, FEAT_NV2 Enable v8.4-A Nested Virtualization Enchancement
// CHECK-NEXT: FEAT_PAN Enables ARM v8.1 Privileged Access-Never extension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
// CHECK-NEXT: FEAT_LRCPC2 Enable v8.4-A RCPC instructions with Immediate Offsets
// CHECK-NEXT: FEAT_LSE Enable ARMv8.1 Large System Extension (LSE) atomic instructions
// CHECK-NEXT: FEAT_LSE2 Enable ARMv8.4 Large System Extension 2 (LSE2) atomicity rules
// CHECK-NEXT: FEAT_MEC Enable Memory Encryption Contexts Extension
// CHECK-NEXT: FEAT_MPAM Enable v8.4-A Memory system Partitioning and Monitoring extension
// CHECK-NEXT: FEAT_MTE, FEAT_MTE2 Enable Memory Tagging Extension
// CHECK-NEXT: FEAT_NV, FEAT_NV2 Enable v8.4-A Nested Virtualization Enchancement
Expand All @@ -40,7 +39,6 @@
// CHECK-NEXT: FEAT_PMUv3 Enable Code Generation for ARMv8 PMUv3 Performance Monitors extension
// CHECK-NEXT: FEAT_RAS, FEAT_RASv1p1 Enable ARMv8 Reliability, Availability and Serviceability Extensions
// CHECK-NEXT: FEAT_RDM Enable ARMv8.1 Rounding Double Multiply Add/Subtract instructions
// CHECK-NEXT: FEAT_RME Enable Realm Management Extension
// CHECK-NEXT: FEAT_SB Enable v8.5 Speculation Barrier
// CHECK-NEXT: FEAT_SEL2 Enable v8.4-A Secure Exception Level 2 extension
// CHECK-NEXT: FEAT_SPECRES Enable v8.5a execution and data prediction invalidation instructions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
// CHECK-NEXT: FEAT_LRCPC2 Enable v8.4-A RCPC instructions with Immediate Offsets
// CHECK-NEXT: FEAT_LSE Enable ARMv8.1 Large System Extension (LSE) atomic instructions
// CHECK-NEXT: FEAT_LSE2 Enable ARMv8.4 Large System Extension 2 (LSE2) atomicity rules
// CHECK-NEXT: FEAT_MEC Enable Memory Encryption Contexts Extension
// CHECK-NEXT: FEAT_MPAM Enable v8.4-A Memory system Partitioning and Monitoring extension
// CHECK-NEXT: FEAT_MTE, FEAT_MTE2 Enable Memory Tagging Extension
// CHECK-NEXT: FEAT_NV, FEAT_NV2 Enable v8.4-A Nested Virtualization Enchancement
Expand All @@ -44,7 +43,6 @@
// CHECK-NEXT: FEAT_PMUv3 Enable Code Generation for ARMv8 PMUv3 Performance Monitors extension
// CHECK-NEXT: FEAT_RAS, FEAT_RASv1p1 Enable ARMv8 Reliability, Availability and Serviceability Extensions
// CHECK-NEXT: FEAT_RDM Enable ARMv8.1 Rounding Double Multiply Add/Subtract instructions
// CHECK-NEXT: FEAT_RME Enable Realm Management Extension
// CHECK-NEXT: FEAT_SB Enable v8.5 Speculation Barrier
// CHECK-NEXT: FEAT_SEL2 Enable v8.4-A Secure Exception Level 2 extension
// CHECK-NEXT: FEAT_SPECRES Enable v8.5a execution and data prediction invalidation instructions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
// CHECK-NEXT: FEAT_LRCPC2 Enable v8.4-A RCPC instructions with Immediate Offsets
// CHECK-NEXT: FEAT_LSE Enable ARMv8.1 Large System Extension (LSE) atomic instructions
// CHECK-NEXT: FEAT_LSE2 Enable ARMv8.4 Large System Extension 2 (LSE2) atomicity rules
// CHECK-NEXT: FEAT_MEC Enable Memory Encryption Contexts Extension
// CHECK-NEXT: FEAT_MPAM Enable v8.4-A Memory system Partitioning and Monitoring extension
// CHECK-NEXT: FEAT_MTE, FEAT_MTE2 Enable Memory Tagging Extension
// CHECK-NEXT: FEAT_NV, FEAT_NV2 Enable v8.4-A Nested Virtualization Enchancement
Expand All @@ -44,7 +43,6 @@
// CHECK-NEXT: FEAT_PMUv3 Enable Code Generation for ARMv8 PMUv3 Performance Monitors extension
// CHECK-NEXT: FEAT_RAS, FEAT_RASv1p1 Enable ARMv8 Reliability, Availability and Serviceability Extensions
// CHECK-NEXT: FEAT_RDM Enable ARMv8.1 Rounding Double Multiply Add/Subtract instructions
// CHECK-NEXT: FEAT_RME Enable Realm Management Extension
// CHECK-NEXT: FEAT_SB Enable v8.5 Speculation Barrier
// CHECK-NEXT: FEAT_SEL2 Enable v8.4-A Secure Exception Level 2 extension
// CHECK-NEXT: FEAT_SPECRES Enable v8.5a execution and data prediction invalidation instructions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
// CHECK-NEXT: FEAT_LRCPC2 Enable v8.4-A RCPC instructions with Immediate Offsets
// CHECK-NEXT: FEAT_LSE Enable ARMv8.1 Large System Extension (LSE) atomic instructions
// CHECK-NEXT: FEAT_LSE2 Enable ARMv8.4 Large System Extension 2 (LSE2) atomicity rules
// CHECK-NEXT: FEAT_MEC Enable Memory Encryption Contexts Extension
// CHECK-NEXT: FEAT_MPAM Enable v8.4-A Memory system Partitioning and Monitoring extension
// CHECK-NEXT: FEAT_MTE, FEAT_MTE2 Enable Memory Tagging Extension
// CHECK-NEXT: FEAT_NV, FEAT_NV2 Enable v8.4-A Nested Virtualization Enchancement
Expand All @@ -40,7 +39,6 @@
// CHECK-NEXT: FEAT_PMUv3 Enable Code Generation for ARMv8 PMUv3 Performance Monitors extension
// CHECK-NEXT: FEAT_RAS, FEAT_RASv1p1 Enable ARMv8 Reliability, Availability and Serviceability Extensions
// CHECK-NEXT: FEAT_RDM Enable ARMv8.1 Rounding Double Multiply Add/Subtract instructions
// CHECK-NEXT: FEAT_RME Enable Realm Management Extension
// CHECK-NEXT: FEAT_SB Enable v8.5 Speculation Barrier
// CHECK-NEXT: FEAT_SEL2 Enable v8.4-A Secure Exception Level 2 extension
// CHECK-NEXT: FEAT_SPECRES Enable v8.5a execution and data prediction invalidation instructions
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
// CHECK-NEXT: FEAT_LRCPC2 Enable v8.4-A RCPC instructions with Immediate Offsets
// CHECK-NEXT: FEAT_LSE Enable ARMv8.1 Large System Extension (LSE) atomic instructions
// CHECK-NEXT: FEAT_LSE2 Enable ARMv8.4 Large System Extension 2 (LSE2) atomicity rules
// CHECK-NEXT: FEAT_MEC Enable Memory Encryption Contexts Extension
// CHECK-NEXT: FEAT_MPAM Enable v8.4-A Memory system Partitioning and Monitoring extension
// CHECK-NEXT: FEAT_MTE, FEAT_MTE2 Enable Memory Tagging Extension
// CHECK-NEXT: FEAT_NV, FEAT_NV2 Enable v8.4-A Nested Virtualization Enchancement
Expand All @@ -40,7 +39,6 @@
// CHECK-NEXT: FEAT_PMUv3 Enable Code Generation for ARMv8 PMUv3 Performance Monitors extension
// CHECK-NEXT: FEAT_RAS, FEAT_RASv1p1 Enable ARMv8 Reliability, Availability and Serviceability Extensions
// CHECK-NEXT: FEAT_RDM Enable ARMv8.1 Rounding Double Multiply Add/Subtract instructions
// CHECK-NEXT: FEAT_RME Enable Realm Management Extension
// CHECK-NEXT: FEAT_SB Enable v8.5 Speculation Barrier
// CHECK-NEXT: FEAT_SEL2 Enable v8.4-A Secure Exception Level 2 extension
// CHECK-NEXT: FEAT_SPE Enable Statistical Profiling extension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
// CHECK-NEXT: FEAT_LRCPC2 Enable v8.4-A RCPC instructions with Immediate Offsets
// CHECK-NEXT: FEAT_LSE Enable ARMv8.1 Large System Extension (LSE) atomic instructions
// CHECK-NEXT: FEAT_LSE2 Enable ARMv8.4 Large System Extension 2 (LSE2) atomicity rules
// CHECK-NEXT: FEAT_MEC Enable Memory Encryption Contexts Extension
// CHECK-NEXT: FEAT_MPAM Enable v8.4-A Memory system Partitioning and Monitoring extension
// CHECK-NEXT: FEAT_MTE, FEAT_MTE2 Enable Memory Tagging Extension
// CHECK-NEXT: FEAT_NV, FEAT_NV2 Enable v8.4-A Nested Virtualization Enchancement
Expand All @@ -44,7 +43,6 @@
// CHECK-NEXT: FEAT_PMUv3 Enable Code Generation for ARMv8 PMUv3 Performance Monitors extension
// CHECK-NEXT: FEAT_RAS, FEAT_RASv1p1 Enable ARMv8 Reliability, Availability and Serviceability Extensions
// CHECK-NEXT: FEAT_RDM Enable ARMv8.1 Rounding Double Multiply Add/Subtract instructions
// CHECK-NEXT: FEAT_RME Enable Realm Management Extension
// CHECK-NEXT: FEAT_SB Enable v8.5 Speculation Barrier
// CHECK-NEXT: FEAT_SEL2 Enable v8.4-A Secure Exception Level 2 extension
// CHECK-NEXT: FEAT_SPE Enable Statistical Profiling extension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
// CHECK-NEXT: FEAT_LRCPC2 Enable v8.4-A RCPC instructions with Immediate Offsets
// CHECK-NEXT: FEAT_LSE Enable ARMv8.1 Large System Extension (LSE) atomic instructions
// CHECK-NEXT: FEAT_LSE2 Enable ARMv8.4 Large System Extension 2 (LSE2) atomicity rules
// CHECK-NEXT: FEAT_MEC Enable Memory Encryption Contexts Extension
// CHECK-NEXT: FEAT_MPAM Enable v8.4-A Memory system Partitioning and Monitoring extension
// CHECK-NEXT: FEAT_MTE, FEAT_MTE2 Enable Memory Tagging Extension
// CHECK-NEXT: FEAT_NV, FEAT_NV2 Enable v8.4-A Nested Virtualization Enchancement
Expand All @@ -44,7 +43,6 @@
// CHECK-NEXT: FEAT_PMUv3 Enable Code Generation for ARMv8 PMUv3 Performance Monitors extension
// CHECK-NEXT: FEAT_RAS, FEAT_RASv1p1 Enable ARMv8 Reliability, Availability and Serviceability Extensions
// CHECK-NEXT: FEAT_RDM Enable ARMv8.1 Rounding Double Multiply Add/Subtract instructions
// CHECK-NEXT: FEAT_RME Enable Realm Management Extension
// CHECK-NEXT: FEAT_SB Enable v8.5 Speculation Barrier
// CHECK-NEXT: FEAT_SEL2 Enable v8.4-A Secure Exception Level 2 extension
// CHECK-NEXT: FEAT_SPE Enable Statistical Profiling extension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@
// CHECK-NEXT: FEAT_LRCPC2 Enable v8.4-A RCPC instructions with Immediate Offsets
// CHECK-NEXT: FEAT_LSE Enable ARMv8.1 Large System Extension (LSE) atomic instructions
// CHECK-NEXT: FEAT_LSE2 Enable ARMv8.4 Large System Extension 2 (LSE2) atomicity rules
// CHECK-NEXT: FEAT_MEC Enable Memory Encryption Contexts Extension
// CHECK-NEXT: FEAT_MPAM Enable v8.4-A Memory system Partitioning and Monitoring extension
// CHECK-NEXT: FEAT_MTE, FEAT_MTE2 Enable Memory Tagging Extension
// CHECK-NEXT: FEAT_NV, FEAT_NV2 Enable v8.4-A Nested Virtualization Enchancement
Expand All @@ -44,7 +43,6 @@
// CHECK-NEXT: FEAT_PMUv3 Enable Code Generation for ARMv8 PMUv3 Performance Monitors extension
// CHECK-NEXT: FEAT_RAS, FEAT_RASv1p1 Enable ARMv8 Reliability, Availability and Serviceability Extensions
// CHECK-NEXT: FEAT_RDM Enable ARMv8.1 Rounding Double Multiply Add/Subtract instructions
// CHECK-NEXT: FEAT_RME Enable Realm Management Extension
// CHECK-NEXT: FEAT_SB Enable v8.5 Speculation Barrier
// CHECK-NEXT: FEAT_SEL2 Enable v8.4-A Secure Exception Level 2 extension
// CHECK-NEXT: FEAT_SPE Enable Statistical Profiling extension
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
// CHECK-NEXT: FEAT_LRCPC2 Enable v8.4-A RCPC instructions with Immediate Offsets
// CHECK-NEXT: FEAT_LSE Enable ARMv8.1 Large System Extension (LSE) atomic instructions
// CHECK-NEXT: FEAT_LSE2 Enable ARMv8.4 Large System Extension 2 (LSE2) atomicity rules
// CHECK-NEXT: FEAT_MEC Enable Memory Encryption Contexts Extension
// CHECK-NEXT: FEAT_MPAM Enable v8.4-A Memory system Partitioning and Monitoring extension
// CHECK-NEXT: FEAT_MTE, FEAT_MTE2 Enable Memory Tagging Extension
// CHECK-NEXT: FEAT_NV, FEAT_NV2 Enable v8.4-A Nested Virtualization Enchancement
Expand All @@ -40,7 +39,6 @@
// CHECK-NEXT: FEAT_PMUv3 Enable Code Generation for ARMv8 PMUv3 Performance Monitors extension
// CHECK-NEXT: FEAT_RAS, FEAT_RASv1p1 Enable ARMv8 Reliability, Availability and Serviceability Extensions
// CHECK-NEXT: FEAT_RDM Enable ARMv8.1 Rounding Double Multiply Add/Subtract instructions
// CHECK-NEXT: FEAT_RME Enable Realm Management Extension
// CHECK-NEXT: FEAT_SB Enable v8.5 Speculation Barrier
// CHECK-NEXT: FEAT_SEL2 Enable v8.4-A Secure Exception Level 2 extension
// CHECK-NEXT: FEAT_SPECRES Enable v8.5a execution and data prediction invalidation instructions
Expand Down
Loading

0 comments on commit c66e1d6

Please sign in to comment.