Skip to content

Commit cab20f6

Browse files
committed
[AArch64] Add missing "flagm" feature to the .arch_extension directive.
Depends on D94970 Differential Revision: https://reviews.llvm.org/D94971
1 parent f344c02 commit cab20f6

File tree

4 files changed

+19
-1
lines changed

4 files changed

+19
-1
lines changed

llvm/lib/Target/AArch64/AsmParser/AArch64AsmParser.cpp

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2916,6 +2916,7 @@ static const struct Extension {
29162916
{"ls64", {AArch64::FeatureLS64}},
29172917
{"xs", {AArch64::FeatureXS}},
29182918
{"pauth", {AArch64::FeaturePAuth}},
2919+
{"flagm", {AArch64::FeatureFlagM}},
29192920
// FIXME: Unsupported extensions
29202921
{"pan", {}},
29212922
{"lor", {}},

llvm/test/MC/AArch64/armv8.4a-flagm.s

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+flagm < %s | FileCheck %s
2+
3+
cfinv
4+
5+
// CHECK: .text
6+
cfinv // encoding: [0x1f,0x40,0x00,0xd5]

llvm/test/MC/AArch64/directive-arch_extension-negative.s

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
// RUN: not llvm-mc -triple aarch64 \
2-
// RUN: -mattr=+crc,+sm4,+sha3,+sha2,+aes,+fp,+neon,+ras,+lse,+predres,+ccdp,+mte,+tlb-rmi,+pan-rwv,+ccpp,+rcpc,+ls64 \
2+
// RUN: -mattr=+crc,+sm4,+sha3,+sha2,+aes,+fp,+neon,+ras,+lse,+predres,+ccdp,+mte,+tlb-rmi,+pan-rwv,+ccpp,+rcpc,+ls64,+flagm \
33
// RUN: -filetype asm -o - %s 2>&1 | FileCheck %s
44

55
.arch_extension axp64
@@ -124,3 +124,10 @@ ld64b x0, [x13]
124124
ld64b x0, [x13]
125125
// CHECK: [[@LINE-1]]:1: error: instruction requires: ls64
126126
// CHECK-NEXT: ld64b x0, [x13]
127+
128+
cfinv
129+
// CHECK-NOT: [[@LINE-1]]:1: error: instruction requires: flagm
130+
.arch_extension noflagm
131+
cfinv
132+
// CHECK: [[@LINE-1]]:1: error: instruction requires: flagm
133+
// CHECK-NEXT: cfinv

llvm/test/MC/AArch64/directive-arch_extension.s

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,3 +75,7 @@ ld64b x0, [x13]
7575
.arch_extension pauth
7676
paciasp
7777
// CHECK: paciasp
78+
79+
.arch_extension flagm
80+
cfinv
81+
// CHECK: cfinv

0 commit comments

Comments
 (0)