Run DCE after a LoopFlatten test to reduce spurious output [nfc]
[llvm-project.git] / llvm / test / MC / AArch64 / SME / system-regs.s
blob093b64a70fb9316f47b09d40dfb5fe9bf5293466
1 // RUN: llvm-mc -triple=aarch64 -show-encoding -mattr=+sme < %s \
2 // RUN: | FileCheck %s --check-prefixes=CHECK-ENCODING,CHECK-INST
3 // RUN: not llvm-mc -triple=aarch64 -show-encoding < %s 2>&1 \
4 // RUN: | FileCheck %s --check-prefix=CHECK-ERROR
5 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme < %s \
6 // RUN: | llvm-objdump -d --mattr=+sme - | FileCheck %s --check-prefix=CHECK-INST
7 // RUN: llvm-mc -triple=aarch64 -filetype=obj -mattr=+sme < %s \
8 // RUN: | llvm-objdump -d --mattr=-sme - | FileCheck %s --check-prefix=CHECK-UNKNOWN
10 // --------------------------------------------------------------------------//
11 // read
13 mrs x3, ID_AA64SMFR0_EL1
14 // CHECK-INST: mrs x3, ID_AA64SMFR0_EL1
15 // CHECK-ENCODING: [0xa3,0x04,0x38,0xd5]
16 // CHECK-ERROR: expected readable system register
17 // CHECK-UNKNOWN: d53804a3 mrs x3, S3_0_C0_C4_5
19 mrs x3, SMCR_EL1
20 // CHECK-INST: mrs x3, SMCR_EL1
21 // CHECK-ENCODING: [0xc3,0x12,0x38,0xd5]
22 // CHECK-ERROR: expected readable system register
23 // CHECK-UNKNOWN: d53812c3 mrs x3, S3_0_C1_C2_6
25 mrs x3, SMCR_EL2
26 // CHECK-INST: mrs x3, SMCR_EL2
27 // CHECK-ENCODING: [0xc3,0x12,0x3c,0xd5]
28 // CHECK-ERROR: expected readable system register
29 // CHECK-UNKNOWN: d53c12c3 mrs x3, S3_4_C1_C2_6
31 mrs x3, SMCR_EL3
32 // CHECK-INST: mrs x3, SMCR_EL3
33 // CHECK-ENCODING: [0xc3,0x12,0x3e,0xd5]
34 // CHECK-ERROR: expected readable system register
35 // CHECK-UNKNOWN: d53e12c3 mrs x3, S3_6_C1_C2_6
37 mrs x3, SMCR_EL12
38 // CHECK-INST: mrs x3, SMCR_EL12
39 // CHECK-ENCODING: [0xc3,0x12,0x3d,0xd5]
40 // CHECK-ERROR: expected readable system register
41 // CHECK-UNKNOWN: d53d12c3 mrs x3, S3_5_C1_C2_6
43 mrs x3, SVCR
44 // CHECK-INST: mrs x3, SVCR
45 // CHECK-ENCODING: [0x43,0x42,0x3b,0xd5]
46 // CHECK-ERROR: expected readable system register
47 // CHECK-UNKNOWN: d53b4243 mrs x3, S3_3_C4_C2_2
49 mrs x3, SMPRI_EL1
50 // CHECK-INST: mrs x3, SMPRI_EL1
51 // CHECK-ENCODING: [0x83,0x12,0x38,0xd5]
52 // CHECK-ERROR: expected readable system register
53 // CHECK-UNKNOWN: d5381283 mrs x3, S3_0_C1_C2_4
55 mrs x3, SMPRIMAP_EL2
56 // CHECK-INST: mrs x3, SMPRIMAP_EL2
57 // CHECK-ENCODING: [0xa3,0x12,0x3c,0xd5]
58 // CHECK-ERROR: expected readable system register
59 // CHECK-UNKNOWN: d53c12a3 mrs x3, S3_4_C1_C2_5
61 mrs x3, SMIDR_EL1
62 // CHECK-INST: mrs x3, SMIDR_EL1
63 // CHECK-ENCODING: [0xc3,0x00,0x39,0xd5]
64 // CHECK-ERROR: expected readable system register
65 // CHECK-UNKNOWN: d53900c3 mrs x3, S3_1_C0_C0_6
67 mrs x3, TPIDR2_EL0
68 // CHECK-INST: mrs x3, TPIDR2_EL0
69 // CHECK-ENCODING: [0xa3,0xd0,0x3b,0xd5]
70 // CHECK-ERROR: expected readable system register
71 // CHECK-UNKNOWN: d53bd0a3 mrs x3, S3_3_C13_C0_5
73 // --------------------------------------------------------------------------//
74 // write
76 msr SMCR_EL1, x3
77 // CHECK-INST: msr SMCR_EL1, x3
78 // CHECK-ENCODING: [0xc3,0x12,0x18,0xd5]
79 // CHECK-ERROR: expected writable system register or pstate
80 // CHECK-UNKNOWN: d51812c3 msr S3_0_C1_C2_6, x3
82 msr SMCR_EL2, x3
83 // CHECK-INST: msr SMCR_EL2, x3
84 // CHECK-ENCODING: [0xc3,0x12,0x1c,0xd5]
85 // CHECK-ERROR: expected writable system register or pstate
86 // CHECK-UNKNOWN: d51c12c3 msr S3_4_C1_C2_6, x3
88 msr SMCR_EL3, x3
89 // CHECK-INST: msr SMCR_EL3, x3
90 // CHECK-ENCODING: [0xc3,0x12,0x1e,0xd5]
91 // CHECK-ERROR: expected writable system register or pstate
92 // CHECK-UNKNOWN: d51e12c3 msr S3_6_C1_C2_6, x3
94 msr SMCR_EL12, x3
95 // CHECK-INST: msr SMCR_EL12, x3
96 // CHECK-ENCODING: [0xc3,0x12,0x1d,0xd5]
97 // CHECK-ERROR: expected writable system register or pstate
98 // CHECK-UNKNOWN: d51d12c3 msr S3_5_C1_C2_6, x3
100 msr SVCR, x3
101 // CHECK-INST: msr SVCR, x3
102 // CHECK-ENCODING: [0x43,0x42,0x1b,0xd5]
103 // CHECK-ERROR: expected writable system register or pstate
104 // CHECK-UNKNOWN: d51b4243 msr S3_3_C4_C2_2, x3
106 msr SMPRI_EL1, x3
107 // CHECK-INST: msr SMPRI_EL1, x3
108 // CHECK-ENCODING: [0x83,0x12,0x18,0xd5]
109 // CHECK-ERROR: expected writable system register or pstate
110 // CHECK-UNKNOWN: d5181283 msr S3_0_C1_C2_4, x3
112 msr SMPRIMAP_EL2, x3
113 // CHECK-INST: msr SMPRIMAP_EL2, x3
114 // CHECK-ENCODING: [0xa3,0x12,0x1c,0xd5]
115 // CHECK-ERROR: expected writable system register or pstate
116 // CHECK-UNKNOWN: d51c12a3 msr S3_4_C1_C2_5, x3
118 msr SVCRSM, #0
119 // CHECK-INST: smstop sm
120 // CHECK-ENCODING: [0x7f,0x42,0x03,0xd5]
121 // CHECK-ERROR: expected writable system register or pstate
122 // CHECK-UNKNOWN: d503427f smstop sm
124 msr SVCRSM, #1
125 // CHECK-INST: smstart
126 // CHECK-ENCODING: [0x7f,0x43,0x03,0xd5]
127 // CHECK-ERROR: expected writable system register or pstate
128 // CHECK-UNKNOWN: d503437f smstart
130 msr SVCRZA, #0
131 // CHECK-INST: smstop za
132 // CHECK-ENCODING: [0x7f,0x44,0x03,0xd5]
133 // CHECK-ERROR: expected writable system register or pstate
134 // CHECK-UNKNOWN: d503447f smstop za
136 msr SVCRZA, #1
137 // CHECK-INST: smstart za
138 // CHECK-ENCODING: [0x7f,0x45,0x03,0xd5]
139 // CHECK-ERROR: expected writable system register or pstate
140 // CHECK-UNKNOWN: d503457f smstart za
142 msr SVCRSMZA, #0
143 // CHECK-INST: smstop
144 // CHECK-ENCODING: [0x7f,0x46,0x03,0xd5]
145 // CHECK-ERROR: expected writable system register or pstate
146 // CHECK-UNKNOWN: d503467f smstop
148 msr SVCRSMZA, #1
149 // CHECK-INST: smstart
150 // CHECK-ENCODING: [0x7f,0x47,0x03,0xd5]
151 // CHECK-ERROR: expected writable system register or pstate
152 // CHECK-UNKNOWN: d503477f smstart
154 msr TPIDR2_EL0, x3
155 // CHECK-INST: msr TPIDR2_EL0, x3
156 // CHECK-ENCODING: [0xa3,0xd0,0x1b,0xd5]
157 // CHECK-ERROR: expected writable system register or pstate
158 // CHECK-UNKNOWN: d51bd0a3 msr S3_3_C13_C0_5, x3