Skip to content

Commit 0969435

Browse files
committed
[AArch64][llvm] Remove FeatureMPAM guards for parity with gcc
Remove `AArch64::FeatureMPAM` guards from some MPAM system registers, since these system registers are not any under feature guard for gcc.
1 parent 7ed20c8 commit 0969435

File tree

3 files changed

+18
-80
lines changed

3 files changed

+18
-80
lines changed

llvm/lib/Target/AArch64/AArch64SystemOperands.td

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1885,7 +1885,6 @@ def : ROSysReg<"ERXPFGF_EL1", 0b11, 0b000, 0b0101, 0b0100, 0b100>;
18851885

18861886
// v8.4a MPAM registers
18871887
// Op0 Op1 CRn CRm Op2
1888-
let Requires = [{ {AArch64::FeatureMPAM} }] in {
18891888
def : RWSysReg<"MPAMVPMV_EL2", 0b11, 0b100, 0b1010, 0b0100, 0b001>;
18901889
def : RWSysReg<"MPAMVPM0_EL2", 0b11, 0b100, 0b1010, 0b0110, 0b000>;
18911890
def : RWSysReg<"MPAMVPM1_EL2", 0b11, 0b100, 0b1010, 0b0110, 0b001>;
@@ -1895,7 +1894,6 @@ def : RWSysReg<"MPAMVPM4_EL2", 0b11, 0b100, 0b1010, 0b0110, 0b100>;
18951894
def : RWSysReg<"MPAMVPM5_EL2", 0b11, 0b100, 0b1010, 0b0110, 0b101>;
18961895
def : RWSysReg<"MPAMVPM6_EL2", 0b11, 0b100, 0b1010, 0b0110, 0b110>;
18971896
def : RWSysReg<"MPAMVPM7_EL2", 0b11, 0b100, 0b1010, 0b0110, 0b111>;
1898-
} //FeatureMPAM
18991897

19001898
// v8.4a Activity Monitor registers
19011899
// Op0 Op1 CRn CRm Op2

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

Lines changed: 0 additions & 57 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+v8.4a < %s 2> %t | FileCheck %s --check-prefix=CHECK
2-
// RUN: not llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=-v8.4a < %s 2>&1 | FileCheck %s --check-prefix=CHECK-ERROR
32

43
//------------------------------------------------------------------------------
54
// ARMV8.4-A MPAM Extensions
@@ -74,59 +73,3 @@ mrs x0, MPAMIDR_EL1
7473
//CHECK: mrs x0, MPAMIDR_EL1 // encoding: [0x80,0xa4,0x38,0xd5]
7574

7675

77-
//CHECK-ERROR: error: expected writable system register or pstate
78-
//CHECK-ERROR: msr MPAMVPMV_EL2, x0
79-
//CHECK-ERROR: ^
80-
//CHECK-ERROR: error: expected writable system register or pstate
81-
//CHECK-ERROR: msr MPAMVPM0_EL2, x0
82-
//CHECK-ERROR: ^
83-
//CHECK-ERROR: error: expected writable system register or pstate
84-
//CHECK-ERROR: msr MPAMVPM1_EL2, x0
85-
//CHECK-ERROR: ^
86-
//CHECK-ERROR: error: expected writable system register or pstate
87-
//CHECK-ERROR: msr MPAMVPM2_EL2, x0
88-
//CHECK-ERROR: ^
89-
//CHECK-ERROR: error: expected writable system register or pstate
90-
//CHECK-ERROR: msr MPAMVPM3_EL2, x0
91-
//CHECK-ERROR: ^
92-
//CHECK-ERROR: error: expected writable system register or pstate
93-
//CHECK-ERROR: msr MPAMVPM4_EL2, x0
94-
//CHECK-ERROR: ^
95-
//CHECK-ERROR: error: expected writable system register or pstate
96-
//CHECK-ERROR: msr MPAMVPM5_EL2, x0
97-
//CHECK-ERROR: ^
98-
//CHECK-ERROR: error: expected writable system register or pstate
99-
//CHECK-ERROR: msr MPAMVPM6_EL2, x0
100-
//CHECK-ERROR: ^
101-
//CHECK-ERROR: error: expected writable system register or pstate
102-
//CHECK-ERROR: msr MPAMVPM7_EL2, x0
103-
//CHECK-ERROR: ^
104-
105-
106-
//CHECK-ERROR: error: expected readable system register
107-
//CHECK-ERROR: mrs x0, MPAMVPMV_EL2
108-
//CHECK-ERROR: ^
109-
//CHECK-ERROR: error: expected readable system register
110-
//CHECK-ERROR: mrs x0, MPAMVPM0_EL2
111-
//CHECK-ERROR: ^
112-
//CHECK-ERROR: error: expected readable system register
113-
//CHECK-ERROR: mrs x0, MPAMVPM1_EL2
114-
//CHECK-ERROR: ^
115-
//CHECK-ERROR: error: expected readable system register
116-
//CHECK-ERROR: mrs x0, MPAMVPM2_EL2
117-
//CHECK-ERROR: ^
118-
//CHECK-ERROR: error: expected readable system register
119-
//CHECK-ERROR: mrs x0, MPAMVPM3_EL2
120-
//CHECK-ERROR: ^
121-
//CHECK-ERROR: error: expected readable system register
122-
//CHECK-ERROR: mrs x0, MPAMVPM4_EL2
123-
//CHECK-ERROR: ^
124-
//CHECK-ERROR: error: expected readable system register
125-
//CHECK-ERROR: mrs x0, MPAMVPM5_EL2
126-
//CHECK-ERROR: ^
127-
//CHECK-ERROR: error: expected readable system register
128-
//CHECK-ERROR: mrs x0, MPAMVPM6_EL2
129-
//CHECK-ERROR: ^
130-
//CHECK-ERROR: error: expected readable system register
131-
//CHECK-ERROR: mrs x0, MPAMVPM7_EL2
132-
//CHECK-ERROR: ^

llvm/test/MC/Disassembler/AArch64/armv8.4a-mpam.txt

Lines changed: 18 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -73,15 +73,15 @@
7373
#CHECK-NOV84: msr MPAM1_EL12, x0
7474
#CHECK-NOV84: msr MPAMHCR_EL2, x0
7575

76-
#CHECK-NOV84: msr S3_4_C10_C4_1, x0
77-
#CHECK-NOV84: msr S3_4_C10_C6_0, x0
78-
#CHECK-NOV84: msr S3_4_C10_C6_1, x0
79-
#CHECK-NOV84: msr S3_4_C10_C6_2, x0
80-
#CHECK-NOV84: msr S3_4_C10_C6_3, x0
81-
#CHECK-NOV84: msr S3_4_C10_C6_4, x0
82-
#CHECK-NOV84: msr S3_4_C10_C6_5, x0
83-
#CHECK-NOV84: msr S3_4_C10_C6_6, x0
84-
#CHECK-NOV84: msr S3_4_C10_C6_7, x0
76+
#CHECK-NOV84: msr MPAMVPMV_EL2, x0
77+
#CHECK-NOV84: msr MPAMVPM0_EL2, x0
78+
#CHECK-NOV84: msr MPAMVPM1_EL2, x0
79+
#CHECK-NOV84: msr MPAMVPM2_EL2, x0
80+
#CHECK-NOV84: msr MPAMVPM3_EL2, x0
81+
#CHECK-NOV84: msr MPAMVPM4_EL2, x0
82+
#CHECK-NOV84: msr MPAMVPM5_EL2, x0
83+
#CHECK-NOV84: msr MPAMVPM6_EL2, x0
84+
#CHECK-NOV84: msr MPAMVPM7_EL2, x0
8585

8686
// Available outside MPAM from Armv9.7
8787
#CHECK-NOV84: mrs x0, MPAM0_EL1
@@ -91,16 +91,13 @@
9191
#CHECK-NOV84: mrs x0, MPAM1_EL12
9292
#CHECK-NOV84: mrs x0, MPAMHCR_EL2
9393

94-
#CHECK-NOV84: mrs x0, S3_4_C10_C4_1
95-
#CHECK-NOV84: mrs x0, S3_4_C10_C6_0
96-
#CHECK-NOV84: mrs x0, S3_4_C10_C6_1
97-
#CHECK-NOV84: mrs x0, S3_4_C10_C6_2
98-
#CHECK-NOV84: mrs x0, S3_4_C10_C6_3
99-
#CHECK-NOV84: mrs x0, S3_4_C10_C6_4
100-
#CHECK-NOV84: mrs x0, S3_4_C10_C6_5
101-
#CHECK-NOV84: mrs x0, S3_4_C10_C6_6
102-
#CHECK-NOV84: mrs x0, S3_4_C10_C6_7
103-
104-
// Available outside MPAM from Armv9.7
94+
#CHECK-NOV84: mrs x0, MPAMVPMV_EL2
95+
#CHECK-NOV84: mrs x0, MPAMVPM0_EL2
96+
#CHECK-NOV84: mrs x0, MPAMVPM1_EL2
97+
#CHECK-NOV84: mrs x0, MPAMVPM2_EL2
98+
#CHECK-NOV84: mrs x0, MPAMVPM3_EL2
99+
#CHECK-NOV84: mrs x0, MPAMVPM4_EL2
100+
#CHECK-NOV84: mrs x0, MPAMVPM5_EL2
101+
#CHECK-NOV84: mrs x0, MPAMVPM6_EL2
102+
#CHECK-NOV84: mrs x0, MPAMVPM7_EL2
105103
#CHECK-NOV84: mrs x0, MPAMIDR_EL1
106-

0 commit comments

Comments
 (0)