Skip to content

Commit 19c516c

Browse files
authored
[AArch64] Add DC CIGDPAPA and DC CIPAPA instructions (#122718)
Add `DC CIGDPAPA` and `DC CIPAPA` instructions, for the RME extension, which was added as part of Armv9.1-A, but these instructions were missed.
1 parent e4e85e0 commit 19c516c

File tree

3 files changed

+17
-0
lines changed

3 files changed

+17
-0
lines changed

llvm/lib/Target/AArch64/AArch64SystemOperands.td

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -246,6 +246,11 @@ def : DC<"CIPAE", 0b100, 0b0111, 0b1110, 0b000>;
246246
def : DC<"CIGDPAE", 0b100, 0b0111, 0b1110, 0b111>;
247247
}
248248

249+
let Requires = [{ {AArch64::FeatureRME} }] in {
250+
def : DC<"CIGDPAPA", 0b110, 0b0111, 0b1110, 0b101>;
251+
def : DC<"CIPAPA", 0b110, 0b0111, 0b1110, 0b001>;
252+
}
253+
249254
let Requires = [{ {AArch64::FeatureOCCMO} }] in {
250255
// Outer cacheable CMO (FEAT_OCCMO)
251256
def : DC<"CIVAOC", 0b011, 0b0111, 0b1111, 0b000>;

llvm/test/MC/AArch64/armv9.1a-rme.s

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,8 @@ sys #6, c8, c7, #4
6868
// CHECK-NO-RME: sys #6, c8, c4, #7
6969
// CHECK-NO-RME: sys #6, c8, c1, #4
7070
// CHECK-NO-RME: sys #6, c8, c7, #4
71+
72+
dc cigdpapa, x0
73+
dc cipapa, x0
74+
// CHECK: dc cigdpapa, x0 // encoding: [0xa0,0x7e,0x0e,0xd5]
75+
// CHECK: dc cipapa, x0 // encoding: [0x20,0x7e,0x0e,0xd5]

llvm/test/MC/Disassembler/AArch64/armv9a-rme.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,10 @@
2323
# CHECK-NO-RME: sys #6, c8, c4, #7
2424
# CHECK-NO-RME: sys #6, c8, c1, #4
2525
# CHECK-NO-RME: sys #6, c8, c7, #4
26+
27+
[0xa0,0x7e,0x0e,0xd5]
28+
[0x20,0x7e,0x0e,0xd5]
29+
# CHECK: dc cigdpapa, x0
30+
# CHECK: dc cipapa, x0
31+
# CHECK-NO-RME: sys #6, c7, c14, #5, x0
32+
# CHECK-NO-RME: sys #6, c7, c14, #1, x0

0 commit comments

Comments
 (0)