1// RUN: llvm-mc -triple aarch64-none-linux-gnu -show-encoding -mattr=+fp-armv8 < %s | FileCheck %s
2  .globl _func
3
4// Check that the assembler can handle the documented syntax from the ARM ARM.
5// For complex constructs like shifter operands, check more thoroughly for them
6// once then spot check that following instructions accept the form generally.
7// This gives us good coverage while keeping the overall size of the test
8// more reasonable.
9
10
11_func:
12// CHECK: _func
13
14//------------------------------------------------------------------------------
15// Add/sub (extended register)
16//------------------------------------------------------------------------------
17        // Basic extends 64-bit ops
18        add x2, x4, w5, uxtb
19        add x20, sp, w19, uxth
20        add x12, x1, w20, uxtw
21        add x20, x3, x13, uxtx
22        add x17, x25, w20, sxtb
23        add x18, x13, w19, sxth
24        add sp, x2, w3, sxtw
25        add x3, x5, x9, sxtx
26// CHECK: add      x2, x4, w5, uxtb           // encoding: [0x82,0x00,0x25,0x8b]
27// CHECK: add      x20, sp, w19, uxth         // encoding: [0xf4,0x23,0x33,0x8b]
28// CHECK: add      x12, x1, w20, uxtw         // encoding: [0x2c,0x40,0x34,0x8b]
29// CHECK: add      x20, x3, x13, uxtx         // encoding: [0x74,0x60,0x2d,0x8b]
30// CHECK: add      x17, x25, w20, sxtb        // encoding: [0x31,0x83,0x34,0x8b]
31// CHECK: add      x18, x13, w19, sxth        // encoding: [0xb2,0xa1,0x33,0x8b]
32// CHECK: add      sp, x2, w3, sxtw           // encoding: [0x5f,0xc0,0x23,0x8b]
33// CHECK: add      x3, x5, x9, sxtx           // encoding: [0xa3,0xe0,0x29,0x8b]
34
35        // Basic extends, 32-bit ops
36        add w2, w5, w7, uxtb
37        add w21, w15, w17, uxth
38        add w30, w29, wzr, uxtw
39        add w19, w17, w1, uxtx  // Goodness knows what this means
40        add w2, w5, w1, sxtb
41        add w26, w17, w19, sxth
42        add w0, w2, w3, sxtw
43        add w2, w3, w5, sxtx
44// CHECK: add      w2, w5, w7, uxtb           // encoding: [0xa2,0x00,0x27,0x0b]
45// CHECK: add      w21, w15, w17, uxth        // encoding: [0xf5,0x21,0x31,0x0b]
46// CHECK: add      w30, w29, wzr, uxtw        // encoding: [0xbe,0x43,0x3f,0x0b]
47// CHECK: add      w19, w17, w1, uxtx         // encoding: [0x33,0x62,0x21,0x0b]
48// CHECK: add      w2, w5, w1, sxtb           // encoding: [0xa2,0x80,0x21,0x0b]
49// CHECK: add      w26, w17, w19, sxth        // encoding: [0x3a,0xa2,0x33,0x0b]
50// CHECK: add      w0, w2, w3, sxtw           // encoding: [0x40,0xc0,0x23,0x0b]
51// CHECK: add      w2, w3, w5, sxtx           // encoding: [0x62,0xe0,0x25,0x0b]
52
53        // Nonzero shift amounts
54        add x2, x3, w5, sxtb #0
55        add x7, x11, w13, uxth #4
56        add w17, w19, w23, uxtw #2
57        add w29, w23, w17, uxtx #1
58// CHECK: add      x2, x3, w5, sxtb           // encoding: [0x62,0x80,0x25,0x8b]
59// CHECK: add      x7, x11, w13, uxth #4      // encoding: [0x67,0x31,0x2d,0x8b]
60// CHECK: add      w17, w19, w23, uxtw #2     // encoding: [0x71,0x4a,0x37,0x0b]
61// CHECK: add      w29, w23, w17, uxtx #1     // encoding: [0xfd,0x66,0x31,0x0b]
62
63        // Sub
64        sub x2, x4, w5, uxtb #2
65        sub x20, sp, w19, uxth #4
66        sub x12, x1, w20, uxtw
67        sub x20, x3, x13, uxtx #0
68        sub x17, x25, w20, sxtb
69        sub x18, x13, w19, sxth
70        sub sp, x2, w3, sxtw
71        sub x3, x5, x9, sxtx
72// CHECK: sub      x2, x4, w5, uxtb #2        // encoding: [0x82,0x08,0x25,0xcb]
73// CHECK: sub      x20, sp, w19, uxth #4      // encoding: [0xf4,0x33,0x33,0xcb]
74// CHECK: sub      x12, x1, w20, uxtw         // encoding: [0x2c,0x40,0x34,0xcb]
75// CHECK: sub      x20, x3, x13, uxtx         // encoding: [0x74,0x60,0x2d,0xcb]
76// CHECK: sub      x17, x25, w20, sxtb        // encoding: [0x31,0x83,0x34,0xcb]
77// CHECK: sub      x18, x13, w19, sxth        // encoding: [0xb2,0xa1,0x33,0xcb]
78// CHECK: sub      sp, x2, w3, sxtw           // encoding: [0x5f,0xc0,0x23,0xcb]
79// CHECK: sub      x3, x5, x9, sxtx           // encoding: [0xa3,0xe0,0x29,0xcb]
80
81        sub w2, w5, w7, uxtb
82        sub w21, w15, w17, uxth
83        sub w30, w29, wzr, uxtw
84        sub w19, w17, w1, uxtx  // Goodness knows what this means
85        sub w2, w5, w1, sxtb
86        sub w26, wsp, w19, sxth
87        sub wsp, w2, w3, sxtw
88        sub w2, w3, w5, sxtx
89// CHECK: sub      w2, w5, w7, uxtb           // encoding: [0xa2,0x00,0x27,0x4b]
90// CHECK: sub      w21, w15, w17, uxth        // encoding: [0xf5,0x21,0x31,0x4b]
91// CHECK: sub      w30, w29, wzr, uxtw        // encoding: [0xbe,0x43,0x3f,0x4b]
92// CHECK: sub      w19, w17, w1, uxtx         // encoding: [0x33,0x62,0x21,0x4b]
93// CHECK: sub      w2, w5, w1, sxtb           // encoding: [0xa2,0x80,0x21,0x4b]
94// CHECK: sub      w26, wsp, w19, sxth        // encoding: [0xfa,0xa3,0x33,0x4b]
95// CHECK: sub      wsp, w2, w3, sxtw          // encoding: [0x5f,0xc0,0x23,0x4b]
96// CHECK: sub      w2, w3, w5, sxtx           // encoding: [0x62,0xe0,0x25,0x4b]
97
98        // Adds
99        adds x2, x4, w5, uxtb #2
100        adds x20, sp, w19, uxth #4
101        adds x12, x1, w20, uxtw
102        adds x20, x3, x13, uxtx #0
103        adds xzr, x25, w20, sxtb #3
104        adds x18, sp, w19, sxth
105        adds xzr, x2, w3, sxtw
106        adds x3, x5, x9, sxtx #2
107// CHECK: adds     x2, x4, w5, uxtb #2        // encoding: [0x82,0x08,0x25,0xab]
108// CHECK: adds     x20, sp, w19, uxth #4      // encoding: [0xf4,0x33,0x33,0xab]
109// CHECK: adds     x12, x1, w20, uxtw         // encoding: [0x2c,0x40,0x34,0xab]
110// CHECK: adds     x20, x3, x13, uxtx         // encoding: [0x74,0x60,0x2d,0xab]
111// CHECK: {{adds xzr,|cmn}} x25, w20, sxtb #3     // encoding: [0x3f,0x8f,0x34,0xab]
112// CHECK: adds     x18, sp, w19, sxth         // encoding: [0xf2,0xa3,0x33,0xab]
113// CHECK: {{adds xzr,|cmn}} x2, w3, sxtw          // encoding: [0x5f,0xc0,0x23,0xab]
114// CHECK: adds     x3, x5, x9, sxtx #2        // encoding: [0xa3,0xe8,0x29,0xab]
115
116        adds w2, w5, w7, uxtb
117        adds w21, w15, w17, uxth
118        adds w30, w29, wzr, uxtw
119        adds w19, w17, w1, uxtx  // Goodness knows what this means
120        adds w2, w5, w1, sxtb #1
121        adds w26, wsp, w19, sxth
122        adds wzr, w2, w3, sxtw
123        adds w2, w3, w5, sxtx
124// CHECK: adds     w2, w5, w7, uxtb           // encoding: [0xa2,0x00,0x27,0x2b]
125// CHECK: adds     w21, w15, w17, uxth        // encoding: [0xf5,0x21,0x31,0x2b]
126// CHECK: adds     w30, w29, wzr, uxtw        // encoding: [0xbe,0x43,0x3f,0x2b]
127// CHECK: adds     w19, w17, w1, uxtx         // encoding: [0x33,0x62,0x21,0x2b]
128// CHECK: adds     w2, w5, w1, sxtb #1        // encoding: [0xa2,0x84,0x21,0x2b]
129// CHECK: adds     w26, wsp, w19, sxth        // encoding: [0xfa,0xa3,0x33,0x2b]
130// CHECK: cmn w2, w3, sxtw          // encoding: [0x5f,0xc0,0x23,0x2b]
131// CHECK: adds     w2, w3, w5, sxtx           // encoding: [0x62,0xe0,0x25,0x2b]
132
133        // subs
134        subs x2, x4, w5, uxtb #2
135        subs x20, sp, w19, uxth #4
136        subs x12, x1, w20, uxtw
137        subs x20, x3, x13, uxtx #0
138        subs xzr, x25, w20, sxtb #3
139        subs x18, sp, w19, sxth
140        subs xzr, x2, w3, sxtw
141        subs x3, x5, x9, sxtx #2
142// CHECK: subs     x2, x4, w5, uxtb #2        // encoding: [0x82,0x08,0x25,0xeb]
143// CHECK: subs     x20, sp, w19, uxth #4      // encoding: [0xf4,0x33,0x33,0xeb]
144// CHECK: subs     x12, x1, w20, uxtw         // encoding: [0x2c,0x40,0x34,0xeb]
145// CHECK: subs     x20, x3, x13, uxtx         // encoding: [0x74,0x60,0x2d,0xeb]
146// CHECK: {{subs xzr,|cmp}} x25, w20, sxtb #3     // encoding: [0x3f,0x8f,0x34,0xeb]
147// CHECK: subs     x18, sp, w19, sxth         // encoding: [0xf2,0xa3,0x33,0xeb]
148// CHECK: {{subs xzr,|cmp}} x2, w3, sxtw          // encoding: [0x5f,0xc0,0x23,0xeb]
149// CHECK: subs     x3, x5, x9, sxtx #2        // encoding: [0xa3,0xe8,0x29,0xeb]
150
151        subs w2, w5, w7, uxtb
152        subs w21, w15, w17, uxth
153        subs w30, w29, wzr, uxtw
154        subs w19, w17, w1, uxtx  // Goodness knows what this means
155        subs w2, w5, w1, sxtb #1
156        subs w26, wsp, w19, sxth
157        subs wzr, w2, w3, sxtw
158        subs w2, w3, w5, sxtx
159// CHECK: subs     w2, w5, w7, uxtb           // encoding: [0xa2,0x00,0x27,0x6b]
160// CHECK: subs     w21, w15, w17, uxth        // encoding: [0xf5,0x21,0x31,0x6b]
161// CHECK: subs     w30, w29, wzr, uxtw        // encoding: [0xbe,0x43,0x3f,0x6b]
162// CHECK: subs     w19, w17, w1, uxtx         // encoding: [0x33,0x62,0x21,0x6b]
163// CHECK: subs     w2, w5, w1, sxtb #1        // encoding: [0xa2,0x84,0x21,0x6b]
164// CHECK: subs     w26, wsp, w19, sxth        // encoding: [0xfa,0xa3,0x33,0x6b]
165// CHECK: {{subs wzr,|cmp}} w2, w3, sxtw          // encoding: [0x5f,0xc0,0x23,0x6b]
166// CHECK: subs     w2, w3, w5, sxtx           // encoding: [0x62,0xe0,0x25,0x6b]
167
168        // cmp
169        cmp x4, w5, uxtb #2
170        cmp sp, w19, uxth #4
171        cmp x1, w20, uxtw
172        cmp x3, x13, uxtx #0
173        cmp x25, w20, sxtb #3
174        cmp sp, w19, sxth
175        cmp x2, w3, sxtw
176        cmp x5, x9, sxtx #2
177// CHECK: cmp      x4, w5, uxtb #2            // encoding: [0x9f,0x08,0x25,0xeb]
178// CHECK: cmp      sp, w19, uxth #4           // encoding: [0xff,0x33,0x33,0xeb]
179// CHECK: cmp      x1, w20, uxtw              // encoding: [0x3f,0x40,0x34,0xeb]
180// CHECK: cmp      x3, x13, uxtx              // encoding: [0x7f,0x60,0x2d,0xeb]
181// CHECK: cmp      x25, w20, sxtb #3          // encoding: [0x3f,0x8f,0x34,0xeb]
182// CHECK: cmp      sp, w19, sxth              // encoding: [0xff,0xa3,0x33,0xeb]
183// CHECK: cmp      x2, w3, sxtw               // encoding: [0x5f,0xc0,0x23,0xeb]
184// CHECK: cmp      x5, x9, sxtx #2            // encoding: [0xbf,0xe8,0x29,0xeb]
185
186        cmp w5, w7, uxtb
187        cmp w15, w17, uxth
188        cmp w29, wzr, uxtw
189        cmp w17, w1, uxtx  // Goodness knows what this means
190        cmp w5, w1, sxtb #1
191        cmp wsp, w19, sxth
192        cmp w2, w3, sxtw
193        cmp w3, w5, sxtx
194// CHECK: cmp      w5, w7, uxtb               // encoding: [0xbf,0x00,0x27,0x6b]
195// CHECK: cmp      w15, w17, uxth             // encoding: [0xff,0x21,0x31,0x6b]
196// CHECK: cmp      w29, wzr, uxtw             // encoding: [0xbf,0x43,0x3f,0x6b]
197// CHECK: cmp      w17, w1, uxtx              // encoding: [0x3f,0x62,0x21,0x6b]
198// CHECK: cmp      w5, w1, sxtb #1            // encoding: [0xbf,0x84,0x21,0x6b]
199// CHECK: cmp      wsp, w19, sxth             // encoding: [0xff,0xa3,0x33,0x6b]
200// CHECK: cmp      w2, w3, sxtw               // encoding: [0x5f,0xc0,0x23,0x6b]
201// CHECK: cmp      w3, w5, sxtx               // encoding: [0x7f,0xe0,0x25,0x6b]
202
203
204        // cmn
205        cmn x4, w5, uxtb #2
206        cmn sp, w19, uxth #4
207        cmn x1, w20, uxtw
208        cmn x3, x13, uxtx #0
209        cmn x25, w20, sxtb #3
210        cmn sp, w19, sxth
211        cmn x2, w3, sxtw
212        cmn x5, x9, sxtx #2
213// CHECK: cmn      x4, w5, uxtb #2            // encoding: [0x9f,0x08,0x25,0xab]
214// CHECK: cmn      sp, w19, uxth #4           // encoding: [0xff,0x33,0x33,0xab]
215// CHECK: cmn      x1, w20, uxtw              // encoding: [0x3f,0x40,0x34,0xab]
216// CHECK: cmn      x3, x13, uxtx              // encoding: [0x7f,0x60,0x2d,0xab]
217// CHECK: cmn      x25, w20, sxtb #3          // encoding: [0x3f,0x8f,0x34,0xab]
218// CHECK: cmn      sp, w19, sxth              // encoding: [0xff,0xa3,0x33,0xab]
219// CHECK: cmn      x2, w3, sxtw               // encoding: [0x5f,0xc0,0x23,0xab]
220// CHECK: cmn      x5, x9, sxtx #2            // encoding: [0xbf,0xe8,0x29,0xab]
221
222        cmn w5, w7, uxtb
223        cmn w15, w17, uxth
224        cmn w29, wzr, uxtw
225        cmn w17, w1, uxtx  // Goodness knows what this means
226        cmn w5, w1, sxtb #1
227        cmn wsp, w19, sxth
228        cmn w2, w3, sxtw
229        cmn w3, w5, sxtx
230// CHECK: {{cmn|adds wzr,}}      w5, w7, uxtb               // encoding: [0xbf,0x00,0x27,0x2b]
231// CHECK: {{cmn|adds wzr,}}      w15, w17, uxth             // encoding: [0xff,0x21,0x31,0x2b]
232// CHECK: {{cmn|adds wzr,}}      w29, wzr, uxtw             // encoding: [0xbf,0x43,0x3f,0x2b]
233// CHECK: {{cmn|adds wzr,}}      w17, w1, uxtx              // encoding: [0x3f,0x62,0x21,0x2b]
234// CHECK: {{cmn|adds wzr,}}      w5, w1, sxtb #1            // encoding: [0xbf,0x84,0x21,0x2b]
235// CHECK: {{cmn|adds wzr,}}      wsp, w19, sxth             // encoding: [0xff,0xa3,0x33,0x2b]
236// CHECK: {{cmn|adds wzr,}}      w2, w3, sxtw               // encoding: [0x5f,0xc0,0x23,0x2b]
237// CHECK: {{cmn|adds wzr,}}      w3, w5, sxtx               // encoding: [0x7f,0xe0,0x25,0x2b]
238
239        // operands for cmp
240        cmp x20, w29, uxtb #3
241        cmp x12, x13, uxtx #4
242        cmp wsp, w1, uxtb
243        cmn wsp, wzr, sxtw
244// CHECK: cmp      x20, w29, uxtb #3          // encoding: [0x9f,0x0e,0x3d,0xeb]
245// CHECK: cmp      x12, x13, uxtx #4          // encoding: [0x9f,0x71,0x2d,0xeb]
246// CHECK: cmp      wsp, w1, uxtb              // encoding: [0xff,0x03,0x21,0x6b]
247// CHECK: {{cmn|adds wzr,}}      wsp, wzr, sxtw             // encoding: [0xff,0xc3,0x3f,0x2b]
248
249        // LSL variant if sp involved
250        sub sp, x3, x7, lsl #4
251        add w2, wsp, w3, lsl #1
252        cmp wsp, w9, lsl #0
253        adds wzr, wsp, w3, lsl #4
254        subs x3, sp, x9, lsl #2
255// CHECK: sub      sp, x3, x7, lsl #4         // encoding: [0x7f,0x70,0x27,0xcb]
256// CHECK: add      w2, wsp, w3, lsl #1        // encoding: [0xe2,0x47,0x23,0x0b]
257// CHECK: cmp      wsp, w9                    // encoding: [0xff,0x43,0x29,0x6b]
258// CHECK: cmn wsp, w3, lsl #4       // encoding: [0xff,0x53,0x23,0x2b]
259// CHECK: subs     x3, sp, x9, lsl #2         // encoding: [0xe3,0x6b,0x29,0xeb]
260
261//------------------------------------------------------------------------------
262// Add/sub (immediate)
263//------------------------------------------------------------------------------
264
265// Check basic immediate values: an unsigned 12-bit immediate, optionally
266// shifted left by 12 bits.
267        add w4, w5, #0x0
268        add w2, w3, #4095
269        add w30, w29, #1, lsl #12
270        add w13, w5, #4095, lsl #12
271        add x5, x7, #1638
272// CHECK: add      w4, w5, #0                 // encoding: [0xa4,0x00,0x00,0x11]
273// CHECK: add      w2, w3, #4095              // encoding: [0x62,0xfc,0x3f,0x11]
274// CHECK: add      w30, w29, #1, lsl #12      // encoding: [0xbe,0x07,0x40,0x11]
275// CHECK: add      w13, w5, #4095, lsl #12    // encoding: [0xad,0xfc,0x7f,0x11]
276// CHECK: add      x5, x7, #1638              // encoding: [0xe5,0x98,0x19,0x91]
277
278// All registers involved in the non-S variants have 31 encoding sp rather than zr
279        add w20, wsp, #801, lsl #0
280        add wsp, wsp, #1104
281        add wsp, w30, #4084
282// CHECK: add      w20, wsp, #801             // encoding: [0xf4,0x87,0x0c,0x11]
283// CHECK: add      wsp, wsp, #1104            // encoding: [0xff,0x43,0x11,0x11]
284// CHECK: add      wsp, w30, #4084            // encoding: [0xdf,0xd3,0x3f,0x11]
285
286// A few checks on the sanity of 64-bit versions
287        add x0, x24, #291
288        add x3, x24, #4095, lsl #12
289        add x8, sp, #1074
290        add sp, x29, #3816
291// CHECK: add      x0, x24, #291              // encoding: [0x00,0x8f,0x04,0x91]
292// CHECK: add      x3, x24, #4095, lsl #12    // encoding: [0x03,0xff,0x7f,0x91]
293// CHECK: add      x8, sp, #1074              // encoding: [0xe8,0xcb,0x10,0x91]
294// CHECK: add      sp, x29, #3816             // encoding: [0xbf,0xa3,0x3b,0x91]
295
296// And on sub
297        sub w0, wsp, #4077
298        sub w4, w20, #546, lsl #12
299        sub sp, sp, #288
300        sub wsp, w19, #16
301// CHECK: sub      w0, wsp, #4077             // encoding: [0xe0,0xb7,0x3f,0x51]
302// CHECK: sub      w4, w20, #546, lsl #12     // encoding: [0x84,0x8a,0x48,0x51]
303// CHECK: sub      sp, sp, #288               // encoding: [0xff,0x83,0x04,0xd1]
304// CHECK: sub      wsp, w19, #16              // encoding: [0x7f,0x42,0x00,0x51]
305
306// ADDS/SUBS accept zr in the Rd position but sp in the Rn position
307        adds w13, w23, #291, lsl #12
308        adds wzr, w2, #4095                  // FIXME: canonically should be cmn
309        adds w20, wsp, #0x0
310        adds xzr, x3, #0x1, lsl #12          // FIXME: canonically should be cmn
311// CHECK: adds     w13, w23, #291, lsl #12    // encoding: [0xed,0x8e,0x44,0x31]
312// CHECK: {{adds wzr,|cmn}} w2, #4095         // encoding: [0x5f,0xfc,0x3f,0x31]
313// CHECK: adds     w20, wsp, #0               // encoding: [0xf4,0x03,0x00,0x31]
314// CHECK: {{adds xzr,|cmn}} x3, #1, lsl #12   // encoding: [0x7f,0x04,0x40,0xb1]
315
316// Checks for subs
317        subs xzr, sp, #20, lsl #12           // FIXME: canonically should be cmp
318        subs xzr, x30, #4095, lsl #0         // FIXME: canonically should be cmp
319        subs x4, sp, #3822
320// CHECK: {{subs xzr,|cmp}} sp, #20, lsl #12  // encoding: [0xff,0x53,0x40,0xf1]
321// CHECK: {{subs xzr,|cmp}} x30, #4095        // encoding: [0xdf,0xff,0x3f,0xf1]
322// CHECK: subs     x4, sp, #3822              // encoding: [0xe4,0xbb,0x3b,0xf1]
323
324// cmn is an alias for adds zr, ...
325        cmn w3, #291, lsl #12
326        cmn wsp, #1365, lsl #0
327        cmn sp, #1092, lsl #12
328// CHECK: cmn      w3, #291, lsl #12          // encoding: [0x7f,0x8c,0x44,0x31]
329// CHECK: cmn      wsp, #1365                 // encoding: [0xff,0x57,0x15,0x31]
330// CHECK: cmn      sp, #1092, lsl #12         // encoding: [0xff,0x13,0x51,0xb1]
331
332// cmp is an alias for subs zr, ... (FIXME: should always disassemble as such too).
333        cmp x4, #300, lsl #12
334        cmp wsp, #500
335        cmp sp, #200, lsl #0
336// CHECK: cmp      x4, #300, lsl #12          // encoding: [0x9f,0xb0,0x44,0xf1]
337// CHECK: cmp      wsp, #500                  // encoding: [0xff,0xd3,0x07,0x71]
338// CHECK: cmp      sp, #200                   // encoding: [0xff,0x23,0x03,0xf1]
339
340// A "MOV" involving sp is encoded in this manner: add Reg, Reg, #0
341        mov sp, x30
342        mov wsp, w20
343        mov x11, sp
344        mov w24, wsp
345// CHECK: mov      sp, x30                    // encoding: [0xdf,0x03,0x00,0x91]
346// CHECK: mov      wsp, w20                   // encoding: [0x9f,0x02,0x00,0x11]
347// CHECK: mov      x11, sp                    // encoding: [0xeb,0x03,0x00,0x91]
348// CHECK: mov      w24, wsp                   // encoding: [0xf8,0x03,0x00,0x11]
349
350// A relocation check (default to lo12, which is the only sane relocation anyway really)
351        add x0, x4, #:lo12:var
352// CHECK: add x0, x4, :lo12:var       // encoding: [0x80,0bAAAAAA00,0b00AAAAAA,0x91]
353// CHECK:                             // fixup A - offset: 0, value: :lo12:var, kind: fixup_aarch64_add_imm12
354
355//------------------------------------------------------------------------------
356// Add-sub (shifted register)
357//------------------------------------------------------------------------------
358
359// As usual, we don't print the canonical forms of many instructions.
360
361        add w3, w5, w7
362        add wzr, w3, w5
363        add w20, wzr, w4
364        add w4, w6, wzr
365// CHECK: add      w3, w5, w7                 // encoding: [0xa3,0x00,0x07,0x0b]
366// CHECK: add      wzr, w3, w5                // encoding: [0x7f,0x00,0x05,0x0b]
367// CHECK: add      w20, wzr, w4               // encoding: [0xf4,0x03,0x04,0x0b]
368// CHECK: add      w4, w6, wzr                // encoding: [0xc4,0x00,0x1f,0x0b]
369
370        add w11, w13, w15, lsl #0
371        add w9, w3, wzr, lsl #10
372        add w17, w29, w20, lsl #31
373        add w17, w29, w20, lsl #(31-2)
374// CHECK: add      w11, w13, w15              // encoding: [0xab,0x01,0x0f,0x0b]
375// CHECK: add      w9, w3, wzr, lsl #10       // encoding: [0x69,0x28,0x1f,0x0b]
376// CHECK: add      w17, w29, w20, lsl #31     // encoding: [0xb1,0x7f,0x14,0x0b]
377// CHECK: add      w17, w29, w20, lsl #29     // encoding: [0xb1,0x77,0x14,0x0b]
378
379        add w21, w22, w23, lsr #0
380        add w24, w25, w26, lsr #18
381        add w27, w28, w29, lsr #31
382        add w27, w28, w29, lsr #(31-2)
383// CHECK: add      w21, w22, w23, lsr #0      // encoding: [0xd5,0x02,0x57,0x0b]
384// CHECK: add      w24, w25, w26, lsr #18     // encoding: [0x38,0x4b,0x5a,0x0b]
385// CHECK: add      w27, w28, w29, lsr #31     // encoding: [0x9b,0x7f,0x5d,0x0b]
386// CHECK: add      w27, w28, w29, lsr #29     // encoding: [0x9b,0x77,0x5d,0x0b]
387
388        add w2, w3, w4, asr #0
389        add w5, w6, w7, asr #21
390        add w8, w9, w10, asr #31
391        add w8, w9, w10, asr #(31-2)
392// CHECK: add      w2, w3, w4, asr #0         // encoding: [0x62,0x00,0x84,0x0b]
393// CHECK: add      w5, w6, w7, asr #21        // encoding: [0xc5,0x54,0x87,0x0b]
394// CHECK: add      w8, w9, w10, asr #31       // encoding: [0x28,0x7d,0x8a,0x0b]
395// CHECK: add      w8, w9, w10, asr #29       // encoding: [0x28,0x75,0x8a,0x0b]
396
397        add x3, x5, x7
398        add xzr, x3, x5
399        add x20, xzr, x4
400        add x4, x6, xzr
401// CHECK: add      x3, x5, x7                 // encoding: [0xa3,0x00,0x07,0x8b]
402// CHECK: add      xzr, x3, x5                // encoding: [0x7f,0x00,0x05,0x8b]
403// CHECK: add      x20, xzr, x4               // encoding: [0xf4,0x03,0x04,0x8b]
404// CHECK: add      x4, x6, xzr                // encoding: [0xc4,0x00,0x1f,0x8b]
405
406        add x11, x13, x15, lsl #0
407        add x9, x3, xzr, lsl #10
408        add x17, x29, x20, lsl #63
409        add x17, x29, x20, lsl #(63-5)
410// CHECK: add      x11, x13, x15              // encoding: [0xab,0x01,0x0f,0x8b]
411// CHECK: add      x9, x3, xzr, lsl #10       // encoding: [0x69,0x28,0x1f,0x8b]
412// CHECK: add      x17, x29, x20, lsl #63     // encoding: [0xb1,0xff,0x14,0x8b]
413// CHECK: add	   x17, x29, x20, lsl #58     // encoding: [0xb1,0xeb,0x14,0x8b]
414
415        add x21, x22, x23, lsr #0
416        add x24, x25, x26, lsr #18
417        add x27, x28, x29, lsr #63
418        add x17, x29, x20, lsr #(63-5)
419// CHECK: add      x21, x22, x23, lsr #0      // encoding: [0xd5,0x02,0x57,0x8b]
420// CHECK: add      x24, x25, x26, lsr #18     // encoding: [0x38,0x4b,0x5a,0x8b]
421// CHECK: add      x27, x28, x29, lsr #63     // encoding: [0x9b,0xff,0x5d,0x8b]
422// CHECK: add	   x17, x29, x20, lsr #58     // encoding: [0xb1,0xeb,0x54,0x8b]
423
424        add x2, x3, x4, asr #0
425        add x5, x6, x7, asr #21
426        add x8, x9, x10, asr #63
427        add x17, x29, x20, asr #(63-5)
428// CHECK: add      x2, x3, x4, asr #0         // encoding: [0x62,0x00,0x84,0x8b]
429// CHECK: add      x5, x6, x7, asr #21        // encoding: [0xc5,0x54,0x87,0x8b]
430// CHECK: add      x8, x9, x10, asr #63       // encoding: [0x28,0xfd,0x8a,0x8b]
431// CHECK: add	   x17, x29, x20, asr #58     // encoding: [0xb1,0xeb,0x94,0x8b]
432
433        adds w3, w5, w7
434        adds wzr, w3, w5
435        adds w20, wzr, w4
436        adds w4, w6, wzr
437// CHECK: adds     w3, w5, w7                 // encoding: [0xa3,0x00,0x07,0x2b]
438// CHECK: {{adds wzr,|cmn}} w3, w5                // encoding: [0x7f,0x00,0x05,0x2b]
439// CHECK: adds     w20, wzr, w4               // encoding: [0xf4,0x03,0x04,0x2b]
440// CHECK: adds     w4, w6, wzr                // encoding: [0xc4,0x00,0x1f,0x2b]
441
442        adds w11, w13, w15, lsl #0
443        adds w9, w3, wzr, lsl #10
444        adds w17, w29, w20, lsl #31
445// CHECK: adds     w11, w13, w15              // encoding: [0xab,0x01,0x0f,0x2b]
446// CHECK: adds     w9, w3, wzr, lsl #10       // encoding: [0x69,0x28,0x1f,0x2b]
447// CHECK: adds     w17, w29, w20, lsl #31     // encoding: [0xb1,0x7f,0x14,0x2b]
448
449        adds w21, w22, w23, lsr #0
450        adds w24, w25, w26, lsr #18
451        adds w27, w28, w29, lsr #31
452// CHECK: adds     w21, w22, w23, lsr #0      // encoding: [0xd5,0x02,0x57,0x2b]
453// CHECK: adds     w24, w25, w26, lsr #18     // encoding: [0x38,0x4b,0x5a,0x2b]
454// CHECK: adds     w27, w28, w29, lsr #31     // encoding: [0x9b,0x7f,0x5d,0x2b]
455
456        adds w2, w3, w4, asr #0
457        adds w5, w6, w7, asr #21
458        adds w8, w9, w10, asr #31
459// CHECK: adds     w2, w3, w4, asr #0         // encoding: [0x62,0x00,0x84,0x2b]
460// CHECK: adds     w5, w6, w7, asr #21        // encoding: [0xc5,0x54,0x87,0x2b]
461// CHECK: adds     w8, w9, w10, asr #31       // encoding: [0x28,0x7d,0x8a,0x2b]
462
463        adds x3, x5, x7
464        adds xzr, x3, x5
465        adds x20, xzr, x4
466        adds x4, x6, xzr
467// CHECK: adds     x3, x5, x7                 // encoding: [0xa3,0x00,0x07,0xab]
468// CHECK: {{adds xzr,|cmn}} x3, x5                // encoding: [0x7f,0x00,0x05,0xab]
469// CHECK: adds     x20, xzr, x4               // encoding: [0xf4,0x03,0x04,0xab]
470// CHECK: adds     x4, x6, xzr                // encoding: [0xc4,0x00,0x1f,0xab]
471
472        adds x11, x13, x15, lsl #0
473        adds x9, x3, xzr, lsl #10
474        adds x17, x29, x20, lsl #63
475// CHECK: adds     x11, x13, x15              // encoding: [0xab,0x01,0x0f,0xab]
476// CHECK: adds     x9, x3, xzr, lsl #10       // encoding: [0x69,0x28,0x1f,0xab]
477// CHECK: adds     x17, x29, x20, lsl #63     // encoding: [0xb1,0xff,0x14,0xab]
478
479        adds x21, x22, x23, lsr #0
480        adds x24, x25, x26, lsr #18
481        adds x27, x28, x29, lsr #63
482// CHECK: adds     x21, x22, x23, lsr #0      // encoding: [0xd5,0x02,0x57,0xab]
483// CHECK: adds     x24, x25, x26, lsr #18     // encoding: [0x38,0x4b,0x5a,0xab]
484// CHECK: adds     x27, x28, x29, lsr #63     // encoding: [0x9b,0xff,0x5d,0xab]
485
486        adds x2, x3, x4, asr #0
487        adds x5, x6, x7, asr #21
488        adds x8, x9, x10, asr #63
489// CHECK: adds     x2, x3, x4, asr #0         // encoding: [0x62,0x00,0x84,0xab]
490// CHECK: adds     x5, x6, x7, asr #21        // encoding: [0xc5,0x54,0x87,0xab]
491// CHECK: adds     x8, x9, x10, asr #63       // encoding: [0x28,0xfd,0x8a,0xab]
492
493        sub w3, w5, w7
494        sub wzr, w3, w5
495        sub w20, wzr, w4
496        sub w4, w6, wzr
497// CHECK: sub      w3, w5, w7                 // encoding: [0xa3,0x00,0x07,0x4b]
498// CHECK: sub      wzr, w3, w5                // encoding: [0x7f,0x00,0x05,0x4b]
499// CHECK: neg      w20, w4              // encoding: [0xf4,0x03,0x04,0x4b]
500// CHECK: sub      w4, w6, wzr                // encoding: [0xc4,0x00,0x1f,0x4b]
501
502        sub w11, w13, w15, lsl #0
503        sub w9, w3, wzr, lsl #10
504        sub w17, w29, w20, lsl #31
505// CHECK: sub      w11, w13, w15              // encoding: [0xab,0x01,0x0f,0x4b]
506// CHECK: sub      w9, w3, wzr, lsl #10       // encoding: [0x69,0x28,0x1f,0x4b]
507// CHECK: sub      w17, w29, w20, lsl #31     // encoding: [0xb1,0x7f,0x14,0x4b]
508
509        sub w21, w22, w23, lsr #0
510        sub w24, w25, w26, lsr #18
511        sub w27, w28, w29, lsr #31
512// CHECK: sub      w21, w22, w23, lsr #0      // encoding: [0xd5,0x02,0x57,0x4b]
513// CHECK: sub      w24, w25, w26, lsr #18     // encoding: [0x38,0x4b,0x5a,0x4b]
514// CHECK: sub      w27, w28, w29, lsr #31     // encoding: [0x9b,0x7f,0x5d,0x4b]
515
516        sub w2, w3, w4, asr #0
517        sub w5, w6, w7, asr #21
518        sub w8, w9, w10, asr #31
519// CHECK: sub      w2, w3, w4, asr #0         // encoding: [0x62,0x00,0x84,0x4b]
520// CHECK: sub      w5, w6, w7, asr #21        // encoding: [0xc5,0x54,0x87,0x4b]
521// CHECK: sub      w8, w9, w10, asr #31       // encoding: [0x28,0x7d,0x8a,0x4b]
522
523        sub x3, x5, x7
524        sub xzr, x3, x5
525        sub x20, xzr, x4
526        sub x4, x6, xzr
527// CHECK: sub      x3, x5, x7                 // encoding: [0xa3,0x00,0x07,0xcb]
528// CHECK: sub      xzr, x3, x5                // encoding: [0x7f,0x00,0x05,0xcb]
529// CHECK: neg      x20, x4              // encoding: [0xf4,0x03,0x04,0xcb]
530// CHECK: sub      x4, x6, xzr                // encoding: [0xc4,0x00,0x1f,0xcb]
531
532        sub x11, x13, x15, lsl #0
533        sub x9, x3, xzr, lsl #10
534        sub x17, x29, x20, lsl #63
535// CHECK: sub      x11, x13, x15              // encoding: [0xab,0x01,0x0f,0xcb]
536// CHECK: sub      x9, x3, xzr, lsl #10       // encoding: [0x69,0x28,0x1f,0xcb]
537// CHECK: sub      x17, x29, x20, lsl #63     // encoding: [0xb1,0xff,0x14,0xcb]
538
539        sub x21, x22, x23, lsr #0
540        sub x24, x25, x26, lsr #18
541        sub x27, x28, x29, lsr #63
542// CHECK: sub      x21, x22, x23, lsr #0      // encoding: [0xd5,0x02,0x57,0xcb]
543// CHECK: sub      x24, x25, x26, lsr #18     // encoding: [0x38,0x4b,0x5a,0xcb]
544// CHECK: sub      x27, x28, x29, lsr #63     // encoding: [0x9b,0xff,0x5d,0xcb]
545
546        sub x2, x3, x4, asr #0
547        sub x5, x6, x7, asr #21
548        sub x8, x9, x10, asr #63
549// CHECK: sub      x2, x3, x4, asr #0         // encoding: [0x62,0x00,0x84,0xcb]
550// CHECK: sub      x5, x6, x7, asr #21        // encoding: [0xc5,0x54,0x87,0xcb]
551// CHECK: sub      x8, x9, x10, asr #63       // encoding: [0x28,0xfd,0x8a,0xcb]
552
553        subs w3, w5, w7
554        subs wzr, w3, w5
555        subs w20, wzr, w4
556        subs w4, w6, wzr
557// CHECK: subs     w3, w5, w7                 // encoding: [0xa3,0x00,0x07,0x6b]
558// CHECK: {{subs wzr,|cmp}} w3, w5            // encoding: [0x7f,0x00,0x05,0x6b]
559// CHECK: negs     w20, w4              // encoding: [0xf4,0x03,0x04,0x6b]
560// CHECK: subs     w4, w6, wzr                // encoding: [0xc4,0x00,0x1f,0x6b]
561
562        subs w11, w13, w15, lsl #0
563        subs w9, w3, wzr, lsl #10
564        subs w17, w29, w20, lsl #31
565// CHECK: subs     w11, w13, w15              // encoding: [0xab,0x01,0x0f,0x6b]
566// CHECK: subs     w9, w3, wzr, lsl #10       // encoding: [0x69,0x28,0x1f,0x6b]
567// CHECK: subs     w17, w29, w20, lsl #31     // encoding: [0xb1,0x7f,0x14,0x6b]
568
569        subs w21, w22, w23, lsr #0
570        subs w24, w25, w26, lsr #18
571        subs w27, w28, w29, lsr #31
572// CHECK: subs     w21, w22, w23, lsr #0      // encoding: [0xd5,0x02,0x57,0x6b]
573// CHECK: subs     w24, w25, w26, lsr #18     // encoding: [0x38,0x4b,0x5a,0x6b]
574// CHECK: subs     w27, w28, w29, lsr #31     // encoding: [0x9b,0x7f,0x5d,0x6b]
575
576        subs w2, w3, w4, asr #0
577        subs w5, w6, w7, asr #21
578        subs w8, w9, w10, asr #31
579// CHECK: subs     w2, w3, w4, asr #0         // encoding: [0x62,0x00,0x84,0x6b]
580// CHECK: subs     w5, w6, w7, asr #21        // encoding: [0xc5,0x54,0x87,0x6b]
581// CHECK: subs     w8, w9, w10, asr #31       // encoding: [0x28,0x7d,0x8a,0x6b]
582
583        subs x3, x5, x7
584        subs xzr, x3, x5
585        subs x20, xzr, x4
586        subs x4, x6, xzr
587// CHECK: subs     x3, x5, x7                 // encoding: [0xa3,0x00,0x07,0xeb]
588// CHECK: {{subs xzr,|cmp}} x3, x5            // encoding: [0x7f,0x00,0x05,0xeb]
589// CHECK: negs     x20, x4              // encoding: [0xf4,0x03,0x04,0xeb]
590// CHECK: subs     x4, x6, xzr                // encoding: [0xc4,0x00,0x1f,0xeb]
591
592        subs x11, x13, x15, lsl #0
593        subs x9, x3, xzr, lsl #10
594        subs x17, x29, x20, lsl #63
595// CHECK: subs     x11, x13, x15              // encoding: [0xab,0x01,0x0f,0xeb]
596// CHECK: subs     x9, x3, xzr, lsl #10       // encoding: [0x69,0x28,0x1f,0xeb]
597// CHECK: subs     x17, x29, x20, lsl #63     // encoding: [0xb1,0xff,0x14,0xeb]
598
599        subs x21, x22, x23, lsr #0
600        subs x24, x25, x26, lsr #18
601        subs x27, x28, x29, lsr #63
602// CHECK: subs     x21, x22, x23, lsr #0      // encoding: [0xd5,0x02,0x57,0xeb]
603// CHECK: subs     x24, x25, x26, lsr #18     // encoding: [0x38,0x4b,0x5a,0xeb]
604// CHECK: subs     x27, x28, x29, lsr #63     // encoding: [0x9b,0xff,0x5d,0xeb]
605
606        subs x2, x3, x4, asr #0
607        subs x5, x6, x7, asr #21
608        subs x8, x9, x10, asr #63
609// CHECK: subs     x2, x3, x4, asr #0         // encoding: [0x62,0x00,0x84,0xeb]
610// CHECK: subs     x5, x6, x7, asr #21        // encoding: [0xc5,0x54,0x87,0xeb]
611// CHECK: subs     x8, x9, x10, asr #63       // encoding: [0x28,0xfd,0x8a,0xeb]
612
613        cmn w0, w3
614        cmn wzr, w4
615        cmn w5, wzr
616        cmn wsp, w6
617// CHECK: cmn      w0, w3                     // encoding: [0x1f,0x00,0x03,0x2b]
618// CHECK: cmn      wzr, w4                    // encoding: [0xff,0x03,0x04,0x2b]
619// CHECK: cmn      w5, wzr                    // encoding: [0xbf,0x00,0x1f,0x2b]
620// CHECK: cmn      wsp, w6                    // encoding: [0xff,0x43,0x26,0x2b]
621
622        cmn w6, w7, lsl #0
623        cmn w8, w9, lsl #15
624        cmn w10, w11, lsl #31
625// CHECK: cmn      w6, w7                     // encoding: [0xdf,0x00,0x07,0x2b]
626// CHECK: cmn      w8, w9, lsl #15            // encoding: [0x1f,0x3d,0x09,0x2b]
627// CHECK: cmn      w10, w11, lsl #31          // encoding: [0x5f,0x7d,0x0b,0x2b]
628
629        cmn w12, w13, lsr #0
630        cmn w14, w15, lsr #21
631        cmn w16, w17, lsr #31
632// CHECK: cmn      w12, w13, lsr #0           // encoding: [0x9f,0x01,0x4d,0x2b]
633// CHECK: cmn      w14, w15, lsr #21          // encoding: [0xdf,0x55,0x4f,0x2b]
634// CHECK: cmn      w16, w17, lsr #31          // encoding: [0x1f,0x7e,0x51,0x2b]
635
636        cmn w18, w19, asr #0
637        cmn w20, w21, asr #22
638        cmn w22, w23, asr #31
639// CHECK: cmn      w18, w19, asr #0           // encoding: [0x5f,0x02,0x93,0x2b]
640// CHECK: cmn      w20, w21, asr #22          // encoding: [0x9f,0x5a,0x95,0x2b]
641// CHECK: cmn      w22, w23, asr #31          // encoding: [0xdf,0x7e,0x97,0x2b]
642
643        cmn x0, x3
644        cmn xzr, x4
645        cmn x5, xzr
646        cmn sp, x6
647// CHECK: cmn      x0, x3                     // encoding: [0x1f,0x00,0x03,0xab]
648// CHECK: cmn      xzr, x4                    // encoding: [0xff,0x03,0x04,0xab]
649// CHECK: cmn      x5, xzr                    // encoding: [0xbf,0x00,0x1f,0xab]
650// CHECK: cmn      sp, x6                     // encoding: [0xff,0x63,0x26,0xab]
651
652        cmn x6, x7, lsl #0
653        cmn x8, x9, lsl #15
654        cmn x10, x11, lsl #63
655// CHECK: cmn      x6, x7                     // encoding: [0xdf,0x00,0x07,0xab]
656// CHECK: cmn      x8, x9, lsl #15            // encoding: [0x1f,0x3d,0x09,0xab]
657// CHECK: cmn      x10, x11, lsl #63          // encoding: [0x5f,0xfd,0x0b,0xab]
658
659        cmn x12, x13, lsr #0
660        cmn x14, x15, lsr #41
661        cmn x16, x17, lsr #63
662// CHECK: cmn      x12, x13, lsr #0           // encoding: [0x9f,0x01,0x4d,0xab]
663// CHECK: cmn      x14, x15, lsr #41          // encoding: [0xdf,0xa5,0x4f,0xab]
664// CHECK: cmn      x16, x17, lsr #63          // encoding: [0x1f,0xfe,0x51,0xab]
665
666        cmn x18, x19, asr #0
667        cmn x20, x21, asr #55
668        cmn x22, x23, asr #63
669// CHECK: cmn      x18, x19, asr #0           // encoding: [0x5f,0x02,0x93,0xab]
670// CHECK: cmn      x20, x21, asr #55          // encoding: [0x9f,0xde,0x95,0xab]
671// CHECK: cmn      x22, x23, asr #63          // encoding: [0xdf,0xfe,0x97,0xab]
672
673        cmp w0, w3
674        cmp wzr, w4
675        cmp w5, wzr
676        cmp wsp, w6
677// CHECK: cmp      w0, w3                     // encoding: [0x1f,0x00,0x03,0x6b]
678// CHECK: cmp      wzr, w4                    // encoding: [0xff,0x03,0x04,0x6b]
679// CHECK: cmp      w5, wzr                    // encoding: [0xbf,0x00,0x1f,0x6b]
680// CHECK: cmp      wsp, w6                    // encoding: [0xff,0x43,0x26,0x6b]
681
682        cmp w6, w7, lsl #0
683        cmp w8, w9, lsl #15
684        cmp w10, w11, lsl #31
685// CHECK: cmp      w6, w7                     // encoding: [0xdf,0x00,0x07,0x6b]
686// CHECK: cmp      w8, w9, lsl #15            // encoding: [0x1f,0x3d,0x09,0x6b]
687// CHECK: cmp      w10, w11, lsl #31          // encoding: [0x5f,0x7d,0x0b,0x6b]
688
689        cmp w12, w13, lsr #0
690        cmp w14, w15, lsr #21
691        cmp w16, w17, lsr #31
692// CHECK: cmp      w12, w13, lsr #0           // encoding: [0x9f,0x01,0x4d,0x6b]
693// CHECK: cmp      w14, w15, lsr #21          // encoding: [0xdf,0x55,0x4f,0x6b]
694// CHECK: cmp      w16, w17, lsr #31          // encoding: [0x1f,0x7e,0x51,0x6b]
695
696        cmp w18, w19, asr #0
697        cmp w20, w21, asr #22
698        cmp w22, w23, asr #31
699// CHECK: cmp      w18, w19, asr #0           // encoding: [0x5f,0x02,0x93,0x6b]
700// CHECK: cmp      w20, w21, asr #22          // encoding: [0x9f,0x5a,0x95,0x6b]
701// CHECK: cmp      w22, w23, asr #31          // encoding: [0xdf,0x7e,0x97,0x6b]
702
703        cmp x0, x3
704        cmp xzr, x4
705        cmp x5, xzr
706        cmp sp, x6
707// CHECK: cmp      x0, x3                     // encoding: [0x1f,0x00,0x03,0xeb]
708// CHECK: cmp      xzr, x4                    // encoding: [0xff,0x03,0x04,0xeb]
709// CHECK: cmp      x5, xzr                    // encoding: [0xbf,0x00,0x1f,0xeb]
710// CHECK: cmp      sp, x6                     // encoding: [0xff,0x63,0x26,0xeb]
711
712        cmp x6, x7, lsl #0
713        cmp x8, x9, lsl #15
714        cmp x10, x11, lsl #63
715// CHECK: cmp      x6, x7                     // encoding: [0xdf,0x00,0x07,0xeb]
716// CHECK: cmp      x8, x9, lsl #15            // encoding: [0x1f,0x3d,0x09,0xeb]
717// CHECK: cmp      x10, x11, lsl #63          // encoding: [0x5f,0xfd,0x0b,0xeb]
718
719        cmp x12, x13, lsr #0
720        cmp x14, x15, lsr #41
721        cmp x16, x17, lsr #63
722// CHECK: cmp      x12, x13, lsr #0           // encoding: [0x9f,0x01,0x4d,0xeb]
723// CHECK: cmp      x14, x15, lsr #41          // encoding: [0xdf,0xa5,0x4f,0xeb]
724// CHECK: cmp      x16, x17, lsr #63          // encoding: [0x1f,0xfe,0x51,0xeb]
725
726        cmp x18, x19, asr #0
727        cmp x20, x21, asr #55
728        cmp x22, x23, asr #63
729// CHECK: cmp      x18, x19, asr #0           // encoding: [0x5f,0x02,0x93,0xeb]
730// CHECK: cmp      x20, x21, asr #55          // encoding: [0x9f,0xde,0x95,0xeb]
731// CHECK: cmp      x22, x23, asr #63          // encoding: [0xdf,0xfe,0x97,0xeb]
732
733        neg w29, w30
734        neg w30, wzr
735        neg wzr, w0
736// CHECK: neg      w29, w30              // encoding: [0xfd,0x03,0x1e,0x4b]
737// CHECK: neg      w30, wzr              // encoding: [0xfe,0x03,0x1f,0x4b]
738// CHECK: neg      wzr, w0               // encoding: [0xff,0x03,0x00,0x4b]
739
740        neg w28, w27, lsl #0
741        neg w26, w25, lsl #29
742        neg w24, w23, lsl #31
743
744// CHECK: neg      w28, w27              // encoding: [0xfc,0x03,0x1b,0x4b]
745// CHECK: neg      w26, w25, lsl #29     // encoding: [0xfa,0x77,0x19,0x4b]
746// CHECK: neg      w24, w23, lsl #31     // encoding: [0xf8,0x7f,0x17,0x4b]
747
748        neg w22, w21, lsr #0
749        neg w20, w19, lsr #1
750        neg w18, w17, lsr #31
751// CHECK: neg      w22, w21, lsr #0      // encoding: [0xf6,0x03,0x55,0x4b]
752// CHECK: neg      w20, w19, lsr #1      // encoding: [0xf4,0x07,0x53,0x4b]
753// CHECK: neg      w18, w17, lsr #31     // encoding: [0xf2,0x7f,0x51,0x4b]
754
755        neg w16, w15, asr #0
756        neg w14, w13, asr #12
757        neg w12, w11, asr #31
758// CHECK: neg      w16, w15, asr #0      // encoding: [0xf0,0x03,0x8f,0x4b]
759// CHECK: neg      w14, w13, asr #12     // encoding: [0xee,0x33,0x8d,0x4b]
760// CHECK: neg      w12, w11, asr #31     // encoding: [0xec,0x7f,0x8b,0x4b]
761
762        neg x29, x30
763        neg x30, xzr
764        neg xzr, x0
765// CHECK: neg      x29, x30              // encoding: [0xfd,0x03,0x1e,0xcb]
766// CHECK: neg      x30, xzr              // encoding: [0xfe,0x03,0x1f,0xcb]
767// CHECK: neg      xzr, x0               // encoding: [0xff,0x03,0x00,0xcb]
768
769        neg x28, x27, lsl #0
770        neg x26, x25, lsl #29
771        neg x24, x23, lsl #31
772
773// CHECK: neg      x28, x27              // encoding: [0xfc,0x03,0x1b,0xcb]
774// CHECK: neg      x26, x25, lsl #29     // encoding: [0xfa,0x77,0x19,0xcb]
775// CHECK: neg      x24, x23, lsl #31     // encoding: [0xf8,0x7f,0x17,0xcb]
776
777        neg x22, x21, lsr #0
778        neg x20, x19, lsr #1
779        neg x18, x17, lsr #31
780// CHECK: neg      x22, x21, lsr #0      // encoding: [0xf6,0x03,0x55,0xcb]
781// CHECK: neg      x20, x19, lsr #1      // encoding: [0xf4,0x07,0x53,0xcb]
782// CHECK: neg      x18, x17, lsr #31     // encoding: [0xf2,0x7f,0x51,0xcb]
783
784        neg x16, x15, asr #0
785        neg x14, x13, asr #12
786        neg x12, x11, asr #31
787// CHECK: neg      x16, x15, asr #0      // encoding: [0xf0,0x03,0x8f,0xcb]
788// CHECK: neg      x14, x13, asr #12     // encoding: [0xee,0x33,0x8d,0xcb]
789// CHECK: neg      x12, x11, asr #31     // encoding: [0xec,0x7f,0x8b,0xcb]
790
791        negs w29, w30
792        negs w30, wzr
793        negs wzr, w0
794// CHECK: negs     w29, w30              // encoding: [0xfd,0x03,0x1e,0x6b]
795// CHECK: negs     w30, wzr              // encoding: [0xfe,0x03,0x1f,0x6b]
796// CHECK: cmp      wzr, w0               // encoding: [0xff,0x03,0x00,0x6b]
797
798        negs w28, w27, lsl #0
799        negs w26, w25, lsl #29
800        negs w24, w23, lsl #31
801
802// CHECK: negs     w28, w27             // encoding: [0xfc,0x03,0x1b,0x6b]
803// CHECK: negs     w26, w25, lsl #29     // encoding: [0xfa,0x77,0x19,0x6b]
804// CHECK: negs     w24, w23, lsl #31     // encoding: [0xf8,0x7f,0x17,0x6b]
805
806        negs w22, w21, lsr #0
807        negs w20, w19, lsr #1
808        negs w18, w17, lsr #31
809// CHECK: negs     w22, w21, lsr #0      // encoding: [0xf6,0x03,0x55,0x6b]
810// CHECK: negs     w20, w19, lsr #1      // encoding: [0xf4,0x07,0x53,0x6b]
811// CHECK: negs     w18, w17, lsr #31     // encoding: [0xf2,0x7f,0x51,0x6b]
812
813        negs w16, w15, asr #0
814        negs w14, w13, asr #12
815        negs w12, w11, asr #31
816// CHECK: negs     w16, w15, asr #0      // encoding: [0xf0,0x03,0x8f,0x6b]
817// CHECK: negs     w14, w13, asr #12     // encoding: [0xee,0x33,0x8d,0x6b]
818// CHECK: negs     w12, w11, asr #31     // encoding: [0xec,0x7f,0x8b,0x6b]
819
820        negs x29, x30
821        negs x30, xzr
822        negs xzr, x0
823// CHECK: negs     x29, x30              // encoding: [0xfd,0x03,0x1e,0xeb]
824// CHECK: negs     x30, xzr              // encoding: [0xfe,0x03,0x1f,0xeb]
825// CHECK: cmp     xzr, x0                // encoding: [0xff,0x03,0x00,0xeb]
826
827        negs x28, x27, lsl #0
828        negs x26, x25, lsl #29
829        negs x24, x23, lsl #31
830
831// CHECK: negs     x28, x27              // encoding: [0xfc,0x03,0x1b,0xeb]
832// CHECK: negs     x26, x25, lsl #29     // encoding: [0xfa,0x77,0x19,0xeb]
833// CHECK: negs     x24, x23, lsl #31     // encoding: [0xf8,0x7f,0x17,0xeb]
834
835        negs x22, x21, lsr #0
836        negs x20, x19, lsr #1
837        negs x18, x17, lsr #31
838// CHECK: negs     x22, x21, lsr #0      // encoding: [0xf6,0x03,0x55,0xeb]
839// CHECK: negs     x20, x19, lsr #1      // encoding: [0xf4,0x07,0x53,0xeb]
840// CHECK: negs     x18, x17, lsr #31     // encoding: [0xf2,0x7f,0x51,0xeb]
841
842        negs x16, x15, asr #0
843        negs x14, x13, asr #12
844        negs x12, x11, asr #31
845// CHECK: negs     x16, x15, asr #0      // encoding: [0xf0,0x03,0x8f,0xeb]
846// CHECK: negs     x14, x13, asr #12     // encoding: [0xee,0x33,0x8d,0xeb]
847// CHECK: negs     x12, x11, asr #31     // encoding: [0xec,0x7f,0x8b,0xeb]
848
849//------------------------------------------------------------------------------
850// Add-sub (shifted register)
851//------------------------------------------------------------------------------
852        adc w29, w27, w25
853        adc wzr, w3, w4
854        adc w9, wzr, w10
855        adc w20, w0, wzr
856// CHECK: adc      w29, w27, w25              // encoding: [0x7d,0x03,0x19,0x1a]
857// CHECK: adc      wzr, w3, w4                // encoding: [0x7f,0x00,0x04,0x1a]
858// CHECK: adc      w9, wzr, w10               // encoding: [0xe9,0x03,0x0a,0x1a]
859// CHECK: adc      w20, w0, wzr               // encoding: [0x14,0x00,0x1f,0x1a]
860
861        adc x29, x27, x25
862        adc xzr, x3, x4
863        adc x9, xzr, x10
864        adc x20, x0, xzr
865// CHECK: adc      x29, x27, x25              // encoding: [0x7d,0x03,0x19,0x9a]
866// CHECK: adc      xzr, x3, x4                // encoding: [0x7f,0x00,0x04,0x9a]
867// CHECK: adc      x9, xzr, x10               // encoding: [0xe9,0x03,0x0a,0x9a]
868// CHECK: adc      x20, x0, xzr               // encoding: [0x14,0x00,0x1f,0x9a]
869
870        adcs w29, w27, w25
871        adcs wzr, w3, w4
872        adcs w9, wzr, w10
873        adcs w20, w0, wzr
874// CHECK: adcs     w29, w27, w25              // encoding: [0x7d,0x03,0x19,0x3a]
875// CHECK: adcs     wzr, w3, w4                // encoding: [0x7f,0x00,0x04,0x3a]
876// CHECK: adcs     w9, wzr, w10               // encoding: [0xe9,0x03,0x0a,0x3a]
877// CHECK: adcs     w20, w0, wzr               // encoding: [0x14,0x00,0x1f,0x3a]
878
879        adcs x29, x27, x25
880        adcs xzr, x3, x4
881        adcs x9, xzr, x10
882        adcs x20, x0, xzr
883// CHECK: adcs     x29, x27, x25              // encoding: [0x7d,0x03,0x19,0xba]
884// CHECK: adcs     xzr, x3, x4                // encoding: [0x7f,0x00,0x04,0xba]
885// CHECK: adcs     x9, xzr, x10               // encoding: [0xe9,0x03,0x0a,0xba]
886// CHECK: adcs     x20, x0, xzr               // encoding: [0x14,0x00,0x1f,0xba]
887
888        sbc w29, w27, w25
889        sbc wzr, w3, w4
890        sbc w9, wzr, w10
891        sbc w20, w0, wzr
892// CHECK: sbc      w29, w27, w25              // encoding: [0x7d,0x03,0x19,0x5a]
893// CHECK: sbc      wzr, w3, w4                // encoding: [0x7f,0x00,0x04,0x5a]
894// CHECK: ngc      w9, w10                    // encoding: [0xe9,0x03,0x0a,0x5a]
895// CHECK: sbc      w20, w0, wzr               // encoding: [0x14,0x00,0x1f,0x5a]
896
897        sbc x29, x27, x25
898        sbc xzr, x3, x4
899        sbc x9, xzr, x10
900        sbc x20, x0, xzr
901// CHECK: sbc      x29, x27, x25              // encoding: [0x7d,0x03,0x19,0xda]
902// CHECK: sbc      xzr, x3, x4                // encoding: [0x7f,0x00,0x04,0xda]
903// CHECK: ngc      x9, x10                    // encoding: [0xe9,0x03,0x0a,0xda]
904// CHECK: sbc      x20, x0, xzr               // encoding: [0x14,0x00,0x1f,0xda]
905
906        sbcs w29, w27, w25
907        sbcs wzr, w3, w4
908        sbcs w9, wzr, w10
909        sbcs w20, w0, wzr
910// CHECK: sbcs     w29, w27, w25              // encoding: [0x7d,0x03,0x19,0x7a]
911// CHECK: sbcs     wzr, w3, w4                // encoding: [0x7f,0x00,0x04,0x7a]
912// CHECK: ngcs     w9, w10                    // encoding: [0xe9,0x03,0x0a,0x7a]
913// CHECK: sbcs     w20, w0, wzr               // encoding: [0x14,0x00,0x1f,0x7a]
914
915        sbcs x29, x27, x25
916        sbcs xzr, x3, x4
917        sbcs x9, xzr, x10
918        sbcs x20, x0, xzr
919// CHECK: sbcs     x29, x27, x25              // encoding: [0x7d,0x03,0x19,0xfa]
920// CHECK: sbcs     xzr, x3, x4                // encoding: [0x7f,0x00,0x04,0xfa]
921// CHECK: ngcs     x9, x10                    // encoding: [0xe9,0x03,0x0a,0xfa]
922// CHECK: sbcs     x20, x0, xzr               // encoding: [0x14,0x00,0x1f,0xfa]
923
924        ngc w3, w12
925        ngc wzr, w9
926        ngc w23, wzr
927// CHECK: ngc      w3, w12                    // encoding: [0xe3,0x03,0x0c,0x5a]
928// CHECK: ngc      wzr, w9                    // encoding: [0xff,0x03,0x09,0x5a]
929// CHECK: ngc      w23, wzr                   // encoding: [0xf7,0x03,0x1f,0x5a]
930
931        ngc x29, x30
932        ngc xzr, x0
933        ngc x0, xzr
934// CHECK: ngc      x29, x30                   // encoding: [0xfd,0x03,0x1e,0xda]
935// CHECK: ngc      xzr, x0                    // encoding: [0xff,0x03,0x00,0xda]
936// CHECK: ngc      x0, xzr                    // encoding: [0xe0,0x03,0x1f,0xda]
937
938        ngcs w3, w12
939        ngcs wzr, w9
940        ngcs w23, wzr
941// CHECK: ngcs     w3, w12                    // encoding: [0xe3,0x03,0x0c,0x7a]
942// CHECK: ngcs     wzr, w9                    // encoding: [0xff,0x03,0x09,0x7a]
943// CHECK: ngcs     w23, wzr                   // encoding: [0xf7,0x03,0x1f,0x7a]
944
945        ngcs x29, x30
946        ngcs xzr, x0
947        ngcs x0, xzr
948// CHECK: ngcs     x29, x30                   // encoding: [0xfd,0x03,0x1e,0xfa]
949// CHECK: ngcs     xzr, x0                    // encoding: [0xff,0x03,0x00,0xfa]
950// CHECK: ngcs     x0, xzr                    // encoding: [0xe0,0x03,0x1f,0xfa]
951
952//------------------------------------------------------------------------------
953// Bitfield
954//------------------------------------------------------------------------------
955
956        sbfm x1, x2, #3, #4
957        sbfm x3, x4, #63, #63
958        sbfm wzr, wzr, #31, #31
959        sbfm w12, w9, #0, #0
960
961// CHECK: sbfx     x1, x2, #3, #2       // encoding: [0x41,0x10,0x43,0x93]
962// CHECK: asr      x3, x4, #63          // encoding: [0x83,0xfc,0x7f,0x93]
963// CHECK: asr      wzr, wzr, #31        // encoding: [0xff,0x7f,0x1f,0x13]
964// CHECK: sbfx     w12, w9, #0, #1      // encoding: [0x2c,0x01,0x00,0x13]
965
966        ubfm x4, x5, #12, #10
967        ubfm xzr, x4, #0, #0
968        ubfm x4, xzr, #63, #5
969        ubfm x5, x6, #12, #63
970// CHECK: ubfiz    x4, x5, #52, #11        // encoding: [0xa4,0x28,0x4c,0xd3]
971// CHECK: ubfx     xzr, x4, #0, #1         // encoding: [0x9f,0x00,0x40,0xd3]
972// CHECK: ubfiz    x4, xzr, #1, #6         // encoding: [0xe4,0x17,0x7f,0xd3]
973// CHECK: lsr      x5, x6, #12             // encoding: [0xc5,0xfc,0x4c,0xd3]
974
975        bfm x4, x5, #12, #10
976        bfm xzr, x4, #0, #0
977        bfm x4, xzr, #63, #5
978        bfm x5, x6, #12, #63
979// CHECK: bfi      x4, x5, #52, #11           // encoding: [0xa4,0x28,0x4c,0xb3]
980// CHECK: bfxil    xzr, x4, #0, #1            // encoding: [0x9f,0x00,0x40,0xb3]
981// CHECK: bfi      x4, xzr, #1, #6            // encoding: [0xe4,0x17,0x7f,0xb3]
982// CHECK: bfxil    x5, x6, #12, #52           // encoding: [0xc5,0xfc,0x4c,0xb3]
983
984        sxtb w1, w2
985        sxtb xzr, w3
986        sxth w9, w10
987        sxth x0, w1
988        sxtw x3, w30
989// CHECK: sxtb     w1, w2                     // encoding: [0x41,0x1c,0x00,0x13]
990// CHECK: sxtb     xzr, w3                    // encoding: [0x7f,0x1c,0x40,0x93]
991// CHECK: sxth     w9, w10                    // encoding: [0x49,0x3d,0x00,0x13]
992// CHECK: sxth     x0, w1                     // encoding: [0x20,0x3c,0x40,0x93]
993// CHECK: sxtw     x3, w30                    // encoding: [0xc3,0x7f,0x40,0x93]
994
995        uxtb w1, w2
996        uxtb xzr, w3
997        uxth w9, w10
998        uxth x0, w1
999// CHECK: uxtb     w1, w2                     // encoding: [0x41,0x1c,0x00,0x53]
1000// CHECK: uxtb     {{[wx]}}zr, w3             // encoding: [0x7f,0x1c,0x00,0x53]
1001// CHECK: uxth     w9, w10                    // encoding: [0x49,0x3d,0x00,0x53]
1002// CHECK: uxth     {{[wx]}}0, w1              // encoding: [0x20,0x3c,0x00,0x53]
1003
1004        asr w3, w2, #0
1005        asr w9, w10, #31
1006        asr x20, x21, #63
1007        asr w1, wzr, #3
1008// CHECK: asr      w3, w2, #0                 // encoding: [0x43,0x7c,0x00,0x13]
1009// CHECK: asr      w9, w10, #31               // encoding: [0x49,0x7d,0x1f,0x13]
1010// CHECK: asr      x20, x21, #63              // encoding: [0xb4,0xfe,0x7f,0x93]
1011// CHECK: asr      w1, wzr, #3                // encoding: [0xe1,0x7f,0x03,0x13]
1012
1013        lsr w3, w2, #0
1014        lsr w9, w10, #31
1015        lsr x20, x21, #63
1016        lsr wzr, wzr, #3
1017// CHECK: lsr      w3, w2, #0                 // encoding: [0x43,0x7c,0x00,0x53]
1018// CHECK: lsr      w9, w10, #31               // encoding: [0x49,0x7d,0x1f,0x53]
1019// CHECK: lsr      x20, x21, #63              // encoding: [0xb4,0xfe,0x7f,0xd3]
1020// CHECK: lsr      wzr, wzr, #3               // encoding: [0xff,0x7f,0x03,0x53]
1021
1022        lsl w3, w2, #0
1023        lsl w9, w10, #31
1024        lsl x20, x21, #63
1025        lsl w1, wzr, #3
1026// CHECK: {{lsl|lsr}}      w3, w2, #0         // encoding: [0x43,0x7c,0x00,0x53]
1027// CHECK: lsl      w9, w10, #31               // encoding: [0x49,0x01,0x01,0x53]
1028// CHECK: lsl      x20, x21, #63              // encoding: [0xb4,0x02,0x41,0xd3]
1029// CHECK: lsl      w1, wzr, #3                // encoding: [0xe1,0x73,0x1d,0x53]
1030
1031        sbfiz w9, w10, #0, #1
1032        sbfiz x2, x3, #63, #1
1033        sbfiz x19, x20, #0, #64
1034        sbfiz x9, x10, #5, #59
1035        sbfiz w9, w10, #0, #32
1036        sbfiz w11, w12, #31, #1
1037        sbfiz w13, w14, #29, #3
1038        sbfiz xzr, xzr, #10, #11
1039// CHECK: {{sbfiz|sbfx}}    w9, w10, #0, #1   // encoding: [0x49,0x01,0x00,0x13]
1040// CHECK: sbfiz    x2, x3, #63, #1            // encoding: [0x62,0x00,0x41,0x93]
1041// CHECK: asr    x19, x20, #0           // encoding: [0x93,0xfe,0x40,0x93]
1042// CHECK: sbfiz    x9, x10, #5, #59           // encoding: [0x49,0xe9,0x7b,0x93]
1043// CHECK: asr    w9, w10, #0            // encoding: [0x49,0x7d,0x00,0x13]
1044// CHECK: sbfiz    w11, w12, #31, #1          // encoding: [0x8b,0x01,0x01,0x13]
1045// CHECK: sbfiz    w13, w14, #29, #3          // encoding: [0xcd,0x09,0x03,0x13]
1046// CHECK: sbfiz    xzr, xzr, #10, #11         // encoding: [0xff,0x2b,0x76,0x93]
1047
1048        sbfx w9, w10, #0, #1
1049        sbfx x2, x3, #63, #1
1050        sbfx x19, x20, #0, #64
1051        sbfx x9, x10, #5, #59
1052        sbfx w9, w10, #0, #32
1053        sbfx w11, w12, #31, #1
1054        sbfx w13, w14, #29, #3
1055        sbfx xzr, xzr, #10, #11
1056// CHECK: sbfx     w9, w10, #0, #1            // encoding: [0x49,0x01,0x00,0x13]
1057// CHECK: asr     x2, x3, #63           // encoding: [0x62,0xfc,0x7f,0x93]
1058// CHECK: asr     x19, x20, #0          // encoding: [0x93,0xfe,0x40,0x93]
1059// CHECK: asr     x9, x10, #5           // encoding: [0x49,0xfd,0x45,0x93]
1060// CHECK: asr     w9, w10, #0           // encoding: [0x49,0x7d,0x00,0x13]
1061// CHECK: asr     w11, w12, #31         // encoding: [0x8b,0x7d,0x1f,0x13]
1062// CHECK: asr     w13, w14, #29         // encoding: [0xcd,0x7d,0x1d,0x13]
1063// CHECK: sbfx     xzr, xzr, #10, #11         // encoding: [0xff,0x53,0x4a,0x93]
1064
1065        bfi w9, w10, #0, #1
1066        bfi x2, x3, #63, #1
1067        bfi x19, x20, #0, #64
1068        bfi x9, x10, #5, #59
1069        bfi w9, w10, #0, #32
1070        bfi w11, w12, #31, #1
1071        bfi w13, w14, #29, #3
1072        bfi xzr, xzr, #10, #11
1073
1074// CHECK: bfxil    w9, w10, #0, #1            // encoding: [0x49,0x01,0x00,0x33]
1075// CHECK: bfi      x2, x3, #63, #1            // encoding: [0x62,0x00,0x41,0xb3]
1076// CHECK: bfxil    x19, x20, #0, #64          // encoding: [0x93,0xfe,0x40,0xb3]
1077// CHECK: bfi      x9, x10, #5, #59           // encoding: [0x49,0xe9,0x7b,0xb3]
1078// CHECK: bfxil    w9, w10, #0, #32           // encoding: [0x49,0x7d,0x00,0x33]
1079// CHECK: bfi      w11, w12, #31, #1          // encoding: [0x8b,0x01,0x01,0x33]
1080// CHECK: bfi      w13, w14, #29, #3          // encoding: [0xcd,0x09,0x03,0x33]
1081// CHECK: bfi      xzr, xzr, #10, #11         // encoding: [0xff,0x2b,0x76,0xb3]
1082
1083        bfxil w9, w10, #0, #1
1084        bfxil x2, x3, #63, #1
1085        bfxil x19, x20, #0, #64
1086        bfxil x9, x10, #5, #59
1087        bfxil w9, w10, #0, #32
1088        bfxil w11, w12, #31, #1
1089        bfxil w13, w14, #29, #3
1090        bfxil xzr, xzr, #10, #11
1091// CHECK: bfxil    w9, w10, #0, #1            // encoding: [0x49,0x01,0x00,0x33]
1092// CHECK: bfxil    x2, x3, #63, #1            // encoding: [0x62,0xfc,0x7f,0xb3]
1093// CHECK: bfxil    x19, x20, #0, #64          // encoding: [0x93,0xfe,0x40,0xb3]
1094// CHECK: bfxil    x9, x10, #5, #59           // encoding: [0x49,0xfd,0x45,0xb3]
1095// CHECK: bfxil    w9, w10, #0, #32           // encoding: [0x49,0x7d,0x00,0x33]
1096// CHECK: bfxil    w11, w12, #31, #1          // encoding: [0x8b,0x7d,0x1f,0x33]
1097// CHECK: bfxil    w13, w14, #29, #3          // encoding: [0xcd,0x7d,0x1d,0x33]
1098// CHECK: bfxil    xzr, xzr, #10, #11         // encoding: [0xff,0x53,0x4a,0xb3]
1099
1100        ubfiz w9, w10, #0, #1
1101        ubfiz x2, x3, #63, #1
1102        ubfiz x19, x20, #0, #64
1103        ubfiz x9, x10, #5, #59
1104        ubfiz w9, w10, #0, #32
1105        ubfiz w11, w12, #31, #1
1106        ubfiz w13, w14, #29, #3
1107        ubfiz xzr, xzr, #10, #11
1108
1109// CHECK: ubfx     w9, w10, #0, #1         // encoding: [0x49,0x01,0x00,0x53]
1110// CHECK: lsl      x2, x3, #63             // encoding: [0x62,0x00,0x41,0xd3]
1111// CHECK: lsr      x19, x20, #0            // encoding: [0x93,0xfe,0x40,0xd3]
1112// CHECK: lsl      x9, x10, #5             // encoding: [0x49,0xe9,0x7b,0xd3]
1113// CHECK: lsr      w9, w10, #0             // encoding: [0x49,0x7d,0x00,0x53]
1114// CHECK: lsl      w11, w12, #31           // encoding: [0x8b,0x01,0x01,0x53]
1115// CHECK: lsl      w13, w14, #29           // encoding: [0xcd,0x09,0x03,0x53]
1116// CHECK: ubfiz    xzr, xzr, #10, #11      // encoding: [0xff,0x2b,0x76,0xd3]
1117
1118        ubfx w9, w10, #0, #1
1119        ubfx x2, x3, #63, #1
1120        ubfx x19, x20, #0, #64
1121        ubfx x9, x10, #5, #59
1122        ubfx w9, w10, #0, #32
1123        ubfx w11, w12, #31, #1
1124        ubfx w13, w14, #29, #3
1125        ubfx xzr, xzr, #10, #11
1126
1127// CHECK: ubfx    w9, w10, #0, #1         // encoding: [0x49,0x01,0x00,0x53]
1128// CHECK: lsr     x2, x3, #63             // encoding: [0x62,0xfc,0x7f,0xd3]
1129// CHECK: lsr     x19, x20, #0            // encoding: [0x93,0xfe,0x40,0xd3]
1130// CHECK: lsr     x9, x10, #5             // encoding: [0x49,0xfd,0x45,0xd3]
1131// CHECK: lsr     w9, w10, #0             // encoding: [0x49,0x7d,0x00,0x53]
1132// CHECK: lsr     w11, w12, #31           // encoding: [0x8b,0x7d,0x1f,0x53]
1133// CHECK: lsr     w13, w14, #29           // encoding: [0xcd,0x7d,0x1d,0x53]
1134// CHECK: ubfx    xzr, xzr, #10, #11      // encoding: [0xff,0x53,0x4a,0xd3]
1135//------------------------------------------------------------------------------
1136// Compare & branch (immediate)
1137//------------------------------------------------------------------------------
1138
1139        cbz w5, lbl
1140        cbz x5, lbl
1141        cbnz x2, lbl
1142        cbnz x26, lbl
1143// CHECK: cbz    w5, lbl                 // encoding: [0bAAA00101,A,A,0x34]
1144// CHECK:                                 //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1145// CHECK: cbz    x5, lbl                 // encoding: [0bAAA00101,A,A,0xb4]
1146// CHECK:                                 //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1147// CHECK: cbnz    x2, lbl                 // encoding: [0bAAA00010,A,A,0xb5]
1148// CHECK:                                 //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1149// CHECK: cbnz    x26, lbl                // encoding: [0bAAA11010,A,A,0xb5]
1150// CHECK:                                 //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1151
1152        cbz wzr, lbl
1153        cbnz xzr, lbl
1154
1155// CHECK: cbz    wzr, lbl                // encoding: [0bAAA11111,A,A,0x34]
1156// CHECK:                                 //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1157// CHECK: cbnz    xzr, lbl                // encoding: [0bAAA11111,A,A,0xb5]
1158// CHECK:                                 //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1159
1160        cbz w5, #0
1161        cbnz x3, #-4
1162        cbz w20, #1048572
1163        cbnz xzr, #-1048576
1164// CHECK: cbz     w5, #0                  // encoding: [0x05,0x00,0x00,0x34]
1165// CHECK: cbnz    x3, #-4                 // encoding: [0xe3,0xff,0xff,0xb5]
1166// CHECK: cbz     w20, #1048572           // encoding: [0xf4,0xff,0x7f,0x34]
1167// CHECK: cbnz    xzr, #-1048576          // encoding: [0x1f,0x00,0x80,0xb5]
1168
1169//------------------------------------------------------------------------------
1170// Conditional branch (immediate)
1171//------------------------------------------------------------------------------
1172
1173        b.eq lbl
1174        b.ne lbl
1175        b.cs lbl
1176        b.hs lbl
1177        b.lo lbl
1178        b.cc lbl
1179        b.mi lbl
1180        b.pl lbl
1181        b.vs lbl
1182        b.vc lbl
1183        b.hi lbl
1184        b.ls lbl
1185        b.ge lbl
1186        b.lt lbl
1187        b.gt lbl
1188        b.le lbl
1189        b.al lbl
1190
1191// CHECK: b.eq lbl                     // encoding: [0bAAA00000,A,A,0x54]
1192// CHECK:                              //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1193// CHECK: b.ne lbl                     // encoding: [0bAAA00001,A,A,0x54]
1194// CHECK:                              //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1195// CHECK: b.hs lbl                     // encoding: [0bAAA00010,A,A,0x54]
1196// CHECK:                              //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1197// CHECK: b.hs lbl                     // encoding: [0bAAA00010,A,A,0x54]
1198// CHECK:                              //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1199// CHECK: b.lo lbl                     // encoding: [0bAAA00011,A,A,0x54]
1200// CHECK:                              //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1201// CHECK: b.lo lbl                     // encoding: [0bAAA00011,A,A,0x54]
1202// CHECK:                              //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1203// CHECK: b.mi lbl                     // encoding: [0bAAA00100,A,A,0x54]
1204// CHECK:                              //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1205// CHECK: b.pl lbl                     // encoding: [0bAAA00101,A,A,0x54]
1206// CHECK:                              //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1207// CHECK: b.vs lbl                     // encoding: [0bAAA00110,A,A,0x54]
1208// CHECK:                              //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1209// CHECK: b.vc lbl                     // encoding: [0bAAA00111,A,A,0x54]
1210// CHECK:                              //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1211// CHECK: b.hi lbl                     // encoding: [0bAAA01000,A,A,0x54]
1212// CHECK:                              //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1213// CHECK: b.ls lbl                     // encoding: [0bAAA01001,A,A,0x54]
1214// CHECK:                              //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1215// CHECK: b.ge lbl                     // encoding: [0bAAA01010,A,A,0x54]
1216// CHECK:                              //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1217// CHECK: b.lt lbl                     // encoding: [0bAAA01011,A,A,0x54]
1218// CHECK:                              //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1219// CHECK: b.gt lbl                     // encoding: [0bAAA01100,A,A,0x54]
1220// CHECK:                              //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1221// CHECK: b.le lbl                     // encoding: [0bAAA01101,A,A,0x54]
1222// CHECK:                              //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1223// CHECK: b.al lbl                     // encoding: [0bAAA01110,A,A,0x54]
1224// CHECK:                              //   fixup A - offset: 0, value: lbl, kind: fixup_aarch64_pcrel_branch19
1225
1226        //  ARM64 has these in a separate file
1227        beq lbl
1228        bne lbl
1229        bcs lbl
1230        bhs lbl
1231        blo lbl
1232        bcc lbl
1233        bmi lbl
1234        bpl lbl
1235        bvs lbl
1236        bvc lbl
1237        bhi lbl
1238        bls lbl
1239        bge lbl
1240        blt lbl
1241        bgt lbl
1242        ble lbl
1243        bal lbl
1244
1245        b.eq #0
1246        b.lt #-4
1247        b.cc #1048572
1248// CHECK: b.eq #0                         // encoding: [0x00,0x00,0x00,0x54]
1249// CHECK: b.lt #-4                        // encoding: [0xeb,0xff,0xff,0x54]
1250// CHECK: b.lo #1048572                   // encoding: [0xe3,0xff,0x7f,0x54]
1251
1252//------------------------------------------------------------------------------
1253// Conditional compare (immediate)
1254//------------------------------------------------------------------------------
1255
1256        ccmp w1, #31, #0, eq
1257        ccmp w3, #0, #15, hs
1258        ccmp wzr, #15, #13, cs
1259// CHECK: ccmp    w1, #31, #0, eq         // encoding: [0x20,0x08,0x5f,0x7a]
1260// CHECK: ccmp    w3, #0, #15, hs         // encoding: [0x6f,0x28,0x40,0x7a]
1261// CHECK: ccmp    wzr, #15, #13, hs       // encoding: [0xed,0x2b,0x4f,0x7a]
1262
1263        ccmp x9, #31, #0, le
1264        ccmp x3, #0, #15, gt
1265        ccmp xzr, #5, #7, ne
1266// CHECK: ccmp    x9, #31, #0, le         // encoding: [0x20,0xd9,0x5f,0xfa]
1267// CHECK: ccmp    x3, #0, #15, gt         // encoding: [0x6f,0xc8,0x40,0xfa]
1268// CHECK: ccmp    xzr, #5, #7, ne         // encoding: [0xe7,0x1b,0x45,0xfa]
1269
1270        ccmn w1, #31, #0, eq
1271        ccmn w3, #0, #15, hs
1272        ccmn wzr, #15, #13, cs
1273// CHECK: ccmn    w1, #31, #0, eq         // encoding: [0x20,0x08,0x5f,0x3a]
1274// CHECK: ccmn    w3, #0, #15, hs         // encoding: [0x6f,0x28,0x40,0x3a]
1275// CHECK: ccmn    wzr, #15, #13, hs       // encoding: [0xed,0x2b,0x4f,0x3a]
1276
1277        ccmn x9, #31, #0, le
1278        ccmn x3, #0, #15, gt
1279        ccmn xzr, #5, #7, ne
1280// CHECK: ccmn    x9, #31, #0, le         // encoding: [0x20,0xd9,0x5f,0xba]
1281// CHECK: ccmn    x3, #0, #15, gt         // encoding: [0x6f,0xc8,0x40,0xba]
1282// CHECK: ccmn    xzr, #5, #7, ne         // encoding: [0xe7,0x1b,0x45,0xba]
1283
1284//------------------------------------------------------------------------------
1285// Conditional compare (register)
1286//------------------------------------------------------------------------------
1287
1288        ccmp w1, wzr, #0, eq
1289        ccmp w3, w0, #15, hs
1290        ccmp wzr, w15, #13, cs
1291// CHECK: ccmp    w1, wzr, #0, eq         // encoding: [0x20,0x00,0x5f,0x7a]
1292// CHECK: ccmp    w3, w0, #15, hs         // encoding: [0x6f,0x20,0x40,0x7a]
1293// CHECK: ccmp    wzr, w15, #13, hs       // encoding: [0xed,0x23,0x4f,0x7a]
1294
1295        ccmp x9, xzr, #0, le
1296        ccmp x3, x0, #15, gt
1297        ccmp xzr, x5, #7, ne
1298// CHECK: ccmp    x9, xzr, #0, le         // encoding: [0x20,0xd1,0x5f,0xfa]
1299// CHECK: ccmp    x3, x0, #15, gt         // encoding: [0x6f,0xc0,0x40,0xfa]
1300// CHECK: ccmp    xzr, x5, #7, ne         // encoding: [0xe7,0x13,0x45,0xfa]
1301
1302        ccmn w1, wzr, #0, eq
1303        ccmn w3, w0, #15, hs
1304        ccmn wzr, w15, #13, cs
1305// CHECK: ccmn    w1, wzr, #0, eq         // encoding: [0x20,0x00,0x5f,0x3a]
1306// CHECK: ccmn    w3, w0, #15, hs         // encoding: [0x6f,0x20,0x40,0x3a]
1307// CHECK: ccmn    wzr, w15, #13, hs       // encoding: [0xed,0x23,0x4f,0x3a]
1308
1309        ccmn x9, xzr, #0, le
1310        ccmn x3, x0, #15, gt
1311        ccmn xzr, x5, #7, ne
1312// CHECK: ccmn    x9, xzr, #0, le         // encoding: [0x20,0xd1,0x5f,0xba]
1313// CHECK: ccmn    x3, x0, #15, gt         // encoding: [0x6f,0xc0,0x40,0xba]
1314// CHECK: ccmn    xzr, x5, #7, ne         // encoding: [0xe7,0x13,0x45,0xba]
1315
1316//------------------------------------------------------------------------------
1317// Conditional select
1318//------------------------------------------------------------------------------
1319        csel w1, w0, w19, ne
1320        csel wzr, w5, w9, eq
1321        csel w9, wzr, w30, gt
1322        csel w1, w28, wzr, mi
1323// CHECK: csel     w1, w0, w19, ne            // encoding: [0x01,0x10,0x93,0x1a]
1324// CHECK: csel     wzr, w5, w9, eq            // encoding: [0xbf,0x00,0x89,0x1a]
1325// CHECK: csel     w9, wzr, w30, gt           // encoding: [0xe9,0xc3,0x9e,0x1a]
1326// CHECK: csel     w1, w28, wzr, mi           // encoding: [0x81,0x43,0x9f,0x1a]
1327
1328        csel x19, x23, x29, lt
1329        csel xzr, x3, x4, ge
1330        csel x5, xzr, x6, cs
1331        csel x7, x8, xzr, cc
1332// CHECK: csel     x19, x23, x29, lt          // encoding: [0xf3,0xb2,0x9d,0x9a]
1333// CHECK: csel     xzr, x3, x4, ge            // encoding: [0x7f,0xa0,0x84,0x9a]
1334// CHECK: csel     x5, xzr, x6, hs            // encoding: [0xe5,0x23,0x86,0x9a]
1335// CHECK: csel     x7, x8, xzr, lo            // encoding: [0x07,0x31,0x9f,0x9a]
1336
1337        csinc w1, w0, w19, ne
1338        csinc wzr, w5, w9, eq
1339        csinc w9, wzr, w30, gt
1340        csinc w1, w28, wzr, mi
1341// CHECK: csinc    w1, w0, w19, ne            // encoding: [0x01,0x14,0x93,0x1a]
1342// CHECK: csinc    wzr, w5, w9, eq            // encoding: [0xbf,0x04,0x89,0x1a]
1343// CHECK: csinc    w9, wzr, w30, gt           // encoding: [0xe9,0xc7,0x9e,0x1a]
1344// CHECK: csinc    w1, w28, wzr, mi           // encoding: [0x81,0x47,0x9f,0x1a]
1345
1346        csinc x19, x23, x29, lt
1347        csinc xzr, x3, x4, ge
1348        csinc x5, xzr, x6, cs
1349        csinc x7, x8, xzr, cc
1350// CHECK: csinc    x19, x23, x29, lt          // encoding: [0xf3,0xb6,0x9d,0x9a]
1351// CHECK: csinc    xzr, x3, x4, ge            // encoding: [0x7f,0xa4,0x84,0x9a]
1352// CHECK: csinc    x5, xzr, x6, hs            // encoding: [0xe5,0x27,0x86,0x9a]
1353// CHECK: csinc    x7, x8, xzr, lo            // encoding: [0x07,0x35,0x9f,0x9a]
1354
1355        csinv w1, w0, w19, ne
1356        csinv wzr, w5, w9, eq
1357        csinv w9, wzr, w30, gt
1358        csinv w1, w28, wzr, mi
1359// CHECK: csinv    w1, w0, w19, ne            // encoding: [0x01,0x10,0x93,0x5a]
1360// CHECK: csinv    wzr, w5, w9, eq            // encoding: [0xbf,0x00,0x89,0x5a]
1361// CHECK: csinv    w9, wzr, w30, gt           // encoding: [0xe9,0xc3,0x9e,0x5a]
1362// CHECK: csinv    w1, w28, wzr, mi           // encoding: [0x81,0x43,0x9f,0x5a]
1363
1364        csinv x19, x23, x29, lt
1365        csinv xzr, x3, x4, ge
1366        csinv x5, xzr, x6, cs
1367        csinv x7, x8, xzr, cc
1368// CHECK: csinv    x19, x23, x29, lt          // encoding: [0xf3,0xb2,0x9d,0xda]
1369// CHECK: csinv    xzr, x3, x4, ge            // encoding: [0x7f,0xa0,0x84,0xda]
1370// CHECK: csinv    x5, xzr, x6, hs            // encoding: [0xe5,0x23,0x86,0xda]
1371// CHECK: csinv    x7, x8, xzr, lo            // encoding: [0x07,0x31,0x9f,0xda]
1372
1373        csneg w1, w0, w19, ne
1374        csneg wzr, w5, w9, eq
1375        csneg w9, wzr, w30, gt
1376        csneg w1, w28, wzr, mi
1377// CHECK: csneg    w1, w0, w19, ne            // encoding: [0x01,0x14,0x93,0x5a]
1378// CHECK: csneg    wzr, w5, w9, eq            // encoding: [0xbf,0x04,0x89,0x5a]
1379// CHECK: csneg    w9, wzr, w30, gt           // encoding: [0xe9,0xc7,0x9e,0x5a]
1380// CHECK: csneg    w1, w28, wzr, mi           // encoding: [0x81,0x47,0x9f,0x5a]
1381
1382        csneg x19, x23, x29, lt
1383        csneg xzr, x3, x4, ge
1384        csneg x5, xzr, x6, cs
1385        csneg x7, x8, xzr, cc
1386// CHECK: csneg    x19, x23, x29, lt          // encoding: [0xf3,0xb6,0x9d,0xda]
1387// CHECK: csneg    xzr, x3, x4, ge            // encoding: [0x7f,0xa4,0x84,0xda]
1388// CHECK: csneg    x5, xzr, x6, hs            // encoding: [0xe5,0x27,0x86,0xda]
1389// CHECK: csneg    x7, x8, xzr, lo            // encoding: [0x07,0x35,0x9f,0xda]
1390
1391        cset w3, eq
1392        cset x9, pl
1393// CHECK: cset    w3, eq           // encoding: [0xe3,0x17,0x9f,0x1a]
1394// CHECK: cset    x9, pl           // encoding: [0xe9,0x47,0x9f,0x9a]
1395
1396        csetm w20, ne
1397        csetm x30, ge
1398// CHECK: csetm    w20, ne          // encoding: [0xf4,0x03,0x9f,0x5a]
1399// CHECK: csetm    x30, ge          // encoding: [0xfe,0xb3,0x9f,0xda]
1400
1401        cinc w3, w5, gt
1402        cinc wzr, w4, le
1403        cinc w9, wzr, lt
1404// CHECK: cinc    w3, w5, gt             // encoding: [0xa3,0xd4,0x85,0x1a]
1405// CHECK: cinc    wzr, w4, le            // encoding: [0x9f,0xc4,0x84,0x1a]
1406// CHECK: cset    w9, lt           // encoding: [0xe9,0xa7,0x9f,0x1a]
1407
1408        cinc x3, x5, gt
1409        cinc xzr, x4, le
1410        cinc x9, xzr, lt
1411// CHECK: cinc     x3, x5, gt             // encoding: [0xa3,0xd4,0x85,0x9a]
1412// CHECK: cinc     xzr, x4, le            // encoding: [0x9f,0xc4,0x84,0x9a]
1413// CHECK: cset     x9, lt           // encoding: [0xe9,0xa7,0x9f,0x9a]
1414
1415        cinv w3, w5, gt
1416        cinv wzr, w4, le
1417        cinv w9, wzr, lt
1418// CHECK: cinv    w3, w5, gt             // encoding: [0xa3,0xd0,0x85,0x5a]
1419// CHECK: cinv    wzr, w4, le            // encoding: [0x9f,0xc0,0x84,0x5a]
1420// CHECK: csetm    w9, lt           // encoding: [0xe9,0xa3,0x9f,0x5a]
1421
1422        cinv x3, x5, gt
1423        cinv xzr, x4, le
1424        cinv x9, xzr, lt
1425// CHECK: cinv    x3, x5, gt             // encoding: [0xa3,0xd0,0x85,0xda]
1426// CHECK: cinv    xzr, x4, le            // encoding: [0x9f,0xc0,0x84,0xda]
1427// CHECK: csetm    x9, lt           // encoding: [0xe9,0xa3,0x9f,0xda]
1428
1429        cneg w3, w5, gt
1430        cneg wzr, w4, le
1431        cneg w9, wzr, lt
1432// CHECK: cneg    w3, w5, gt            // encoding: [0xa3,0xd4,0x85,0x5a]
1433// CHECK: cneg    wzr, w4, le            // encoding: [0x9f,0xc4,0x84,0x5a]
1434// CHECK: cneg    w9, wzr, lt           // encoding: [0xe9,0xa7,0x9f,0x5a]
1435
1436        cneg x3, x5, gt
1437        cneg xzr, x4, le
1438        cneg x9, xzr, lt
1439// CHECK: cneg    x3, x5, gt             // encoding: [0xa3,0xd4,0x85,0xda]
1440// CHECK: cneg    xzr, x4, le            // encoding: [0x9f,0xc4,0x84,0xda]
1441// CHECK: cneg    x9, xzr, lt           // encoding: [0xe9,0xa7,0x9f,0xda]
1442
1443//------------------------------------------------------------------------------
1444// Data-processing (1 source)
1445//------------------------------------------------------------------------------
1446
1447	rbit	w0, w7
1448	rbit	x18, x3
1449	rev16	w17, w1
1450	rev16	x5, x2
1451	rev	w18, w0
1452	rev32	x20, x1
1453	rev32	x20, xzr
1454// CHECK: rbit	w0, w7                       // encoding: [0xe0,0x00,0xc0,0x5a]
1455// CHECK: rbit	x18, x3                      // encoding: [0x72,0x00,0xc0,0xda]
1456// CHECK: rev16 w17, w1                      // encoding: [0x31,0x04,0xc0,0x5a]
1457// CHECK: rev16	x5, x2                       // encoding: [0x45,0x04,0xc0,0xda]
1458// CHECK: rev	w18, w0                      // encoding: [0x12,0x08,0xc0,0x5a]
1459// CHECK: rev32	x20, x1                      // encoding: [0x34,0x08,0xc0,0xda]
1460// CHECK: rev32	x20, xzr                     // encoding: [0xf4,0x0b,0xc0,0xda]
1461
1462	rev	x22, x2
1463	rev	x18, xzr
1464	rev	w7, wzr
1465	clz	w24, w3
1466	clz	x26, x4
1467	cls	w3, w5
1468	cls	x20, x5
1469// CHECK: rev	x22, x2                      // encoding: [0x56,0x0c,0xc0,0xda]
1470// CHECK: rev	x18, xzr                     // encoding: [0xf2,0x0f,0xc0,0xda]
1471// CHECK: rev	w7, wzr                      // encoding: [0xe7,0x0b,0xc0,0x5a]
1472// CHECK: clz	w24, w3                      // encoding: [0x78,0x10,0xc0,0x5a]
1473// CHECK: clz	x26, x4                      // encoding: [0x9a,0x10,0xc0,0xda]
1474// CHECK: cls	w3, w5                       // encoding: [0xa3,0x14,0xc0,0x5a]
1475// CHECK: cls	x20, x5                      // encoding: [0xb4,0x14,0xc0,0xda]
1476
1477	clz	w24, wzr
1478	rev	x22, xzr
1479// CHECK: clz	w24, wzr                     // encoding: [0xf8,0x13,0xc0,0x5a]
1480// CHECK: rev	x22, xzr                     // encoding: [0xf6,0x0f,0xc0,0xda]
1481
1482//------------------------------------------------------------------------------
1483// Data-processing (2 source)
1484//------------------------------------------------------------------------------
1485
1486        crc32b  w5, w7, w20
1487        crc32h  w28, wzr, w30
1488        crc32w  w0, w1, w2
1489        crc32x  w7, w9, x20
1490        crc32cb w9, w5, w4
1491        crc32ch w13, w17, w25
1492        crc32cw wzr, w3, w5
1493        crc32cx w18, w16, xzr
1494// CHECK: crc32b   w5, w7, w20             // encoding: [0xe5,0x40,0xd4,0x1a]
1495// CHECK: crc32h   w28, wzr, w30           // encoding: [0xfc,0x47,0xde,0x1a]
1496// CHECK: crc32w   w0, w1, w2              // encoding: [0x20,0x48,0xc2,0x1a]
1497// CHECK: crc32x   w7, w9, x20             // encoding: [0x27,0x4d,0xd4,0x9a]
1498// CHECK: crc32cb  w9, w5, w4              // encoding: [0xa9,0x50,0xc4,0x1a]
1499// CHECK: crc32ch  w13, w17, w25           // encoding: [0x2d,0x56,0xd9,0x1a]
1500// CHECK: crc32cw  wzr, w3, w5             // encoding: [0x7f,0x58,0xc5,0x1a]
1501// CHECK: crc32cx  w18, w16, xzr           // encoding: [0x12,0x5e,0xdf,0x9a]
1502
1503        udiv	w0, w7, w10
1504        udiv	x9, x22, x4
1505        sdiv	w12, w21, w0
1506        sdiv	x13, x2, x1
1507        lslv	w11, w12, w13
1508        lslv	x14, x15, x16
1509        lsrv	w17, w18, w19
1510        lsrv	x20, x21, x22
1511        asrv	w23, w24, w25
1512        asrv	x26, x27, x28
1513        rorv	w0, w1, w2
1514        rorv    x3, x4, x5
1515
1516
1517// CHECK: udiv	w0, w7, w10                   // encoding: [0xe0,0x08,0xca,0x1a]
1518// CHECK: udiv	x9, x22, x4                   // encoding: [0xc9,0x0a,0xc4,0x9a]
1519// CHECK: sdiv	w12, w21, w0                  // encoding: [0xac,0x0e,0xc0,0x1a]
1520// CHECK: sdiv	x13, x2, x1                   // encoding: [0x4d,0x0c,0xc1,0x9a]
1521// CHECK: lsl	w11, w12, w13                 // encoding: [0x8b,0x21,0xcd,0x1a]
1522// CHECK: lsl	x14, x15, x16                 // encoding: [0xee,0x21,0xd0,0x9a]
1523// CHECK: lsr	w17, w18, w19                 // encoding: [0x51,0x26,0xd3,0x1a]
1524// CHECK: lsr	x20, x21, x22                 // encoding: [0xb4,0x26,0xd6,0x9a]
1525// CHECK: asr	w23, w24, w25                 // encoding: [0x17,0x2b,0xd9,0x1a]
1526// CHECK: asr	x26, x27, x28                 // encoding: [0x7a,0x2b,0xdc,0x9a]
1527// CHECK: ror	w0, w1, w2                    // encoding: [0x20,0x2c,0xc2,0x1a]
1528// CHECK: ror  x3, x4, x5                     // encoding: [0x83,0x2c,0xc5,0x9a]
1529
1530
1531        lsl	w6, w7, w8
1532        lsl	x9, x10, x11
1533        lsr	w12, w13, w14
1534        lsr	x15, x16, x17
1535        asr	w18, w19, w20
1536        asr	x21, x22, x23
1537        ror	w24, w25, w26
1538        ror	x27, x28, x29
1539// CHECK: lsl	w6, w7, w8                    // encoding: [0xe6,0x20,0xc8,0x1a]
1540// CHECK: lsl	x9, x10, x11                  // encoding: [0x49,0x21,0xcb,0x9a]
1541// CHECK: lsr	w12, w13, w14                 // encoding: [0xac,0x25,0xce,0x1a]
1542// CHECK: lsr	x15, x16, x17                 // encoding: [0x0f,0x26,0xd1,0x9a]
1543// CHECK: asr	w18, w19, w20                 // encoding: [0x72,0x2a,0xd4,0x1a]
1544// CHECK: asr	x21, x22, x23                 // encoding: [0xd5,0x2a,0xd7,0x9a]
1545// CHECK: ror	w24, w25, w26                 // encoding: [0x38,0x2f,0xda,0x1a]
1546// CHECK: ror	x27, x28, x29                 // encoding: [0x9b,0x2f,0xdd,0x9a]
1547
1548        madd w1, w3, w7, w4
1549        madd wzr, w0, w9, w11
1550        madd w13, wzr, w4, w4
1551        madd w19, w30, wzr, w29
1552        madd w4, w5, w6, wzr
1553// CHECK: madd     w1, w3, w7, w4             // encoding: [0x61,0x10,0x07,0x1b]
1554// CHECK: madd     wzr, w0, w9, w11           // encoding: [0x1f,0x2c,0x09,0x1b]
1555// CHECK: madd     w13, wzr, w4, w4           // encoding: [0xed,0x13,0x04,0x1b]
1556// CHECK: madd     w19, w30, wzr, w29         // encoding: [0xd3,0x77,0x1f,0x1b]
1557// CHECK: mul      w4, w5, w6                 // encoding: [0xa4,0x7c,0x06,0x1b]
1558
1559        madd x1, x3, x7, x4
1560        madd xzr, x0, x9, x11
1561        madd x13, xzr, x4, x4
1562        madd x19, x30, xzr, x29
1563        madd x4, x5, x6, xzr
1564// CHECK: madd     x1, x3, x7, x4             // encoding: [0x61,0x10,0x07,0x9b]
1565// CHECK: madd     xzr, x0, x9, x11           // encoding: [0x1f,0x2c,0x09,0x9b]
1566// CHECK: madd     x13, xzr, x4, x4           // encoding: [0xed,0x13,0x04,0x9b]
1567// CHECK: madd     x19, x30, xzr, x29         // encoding: [0xd3,0x77,0x1f,0x9b]
1568// CHECK: mul      x4, x5, x6                 // encoding: [0xa4,0x7c,0x06,0x9b]
1569
1570        msub w1, w3, w7, w4
1571        msub wzr, w0, w9, w11
1572        msub w13, wzr, w4, w4
1573        msub w19, w30, wzr, w29
1574        msub w4, w5, w6, wzr
1575// CHECK: msub     w1, w3, w7, w4             // encoding: [0x61,0x90,0x07,0x1b]
1576// CHECK: msub     wzr, w0, w9, w11           // encoding: [0x1f,0xac,0x09,0x1b]
1577// CHECK: msub     w13, wzr, w4, w4           // encoding: [0xed,0x93,0x04,0x1b]
1578// CHECK: msub     w19, w30, wzr, w29         // encoding: [0xd3,0xf7,0x1f,0x1b]
1579// CHECK: mneg     w4, w5, w6                 // encoding: [0xa4,0xfc,0x06,0x1b]
1580
1581        msub x1, x3, x7, x4
1582        msub xzr, x0, x9, x11
1583        msub x13, xzr, x4, x4
1584        msub x19, x30, xzr, x29
1585        msub x4, x5, x6, xzr
1586// CHECK: msub     x1, x3, x7, x4             // encoding: [0x61,0x90,0x07,0x9b]
1587// CHECK: msub     xzr, x0, x9, x11           // encoding: [0x1f,0xac,0x09,0x9b]
1588// CHECK: msub     x13, xzr, x4, x4           // encoding: [0xed,0x93,0x04,0x9b]
1589// CHECK: msub     x19, x30, xzr, x29         // encoding: [0xd3,0xf7,0x1f,0x9b]
1590// CHECK: mneg     x4, x5, x6                 // encoding: [0xa4,0xfc,0x06,0x9b]
1591
1592        smaddl x3, w5, w2, x9
1593        smaddl xzr, w10, w11, x12
1594        smaddl x13, wzr, w14, x15
1595        smaddl x16, w17, wzr, x18
1596        smaddl x19, w20, w21, xzr
1597// CHECK: smaddl   x3, w5, w2, x9             // encoding: [0xa3,0x24,0x22,0x9b]
1598// CHECK: smaddl   xzr, w10, w11, x12         // encoding: [0x5f,0x31,0x2b,0x9b]
1599// CHECK: smaddl   x13, wzr, w14, x15         // encoding: [0xed,0x3f,0x2e,0x9b]
1600// CHECK: smaddl   x16, w17, wzr, x18         // encoding: [0x30,0x4a,0x3f,0x9b]
1601// CHECK: smull    x19, w20, w21              // encoding: [0x93,0x7e,0x35,0x9b]
1602
1603        smsubl x3, w5, w2, x9
1604        smsubl xzr, w10, w11, x12
1605        smsubl x13, wzr, w14, x15
1606        smsubl x16, w17, wzr, x18
1607        smsubl x19, w20, w21, xzr
1608// CHECK: smsubl   x3, w5, w2, x9             // encoding: [0xa3,0xa4,0x22,0x9b]
1609// CHECK: smsubl   xzr, w10, w11, x12         // encoding: [0x5f,0xb1,0x2b,0x9b]
1610// CHECK: smsubl   x13, wzr, w14, x15         // encoding: [0xed,0xbf,0x2e,0x9b]
1611// CHECK: smsubl   x16, w17, wzr, x18         // encoding: [0x30,0xca,0x3f,0x9b]
1612// CHECK: smnegl   x19, w20, w21              // encoding: [0x93,0xfe,0x35,0x9b]
1613
1614        umaddl x3, w5, w2, x9
1615        umaddl xzr, w10, w11, x12
1616        umaddl x13, wzr, w14, x15
1617        umaddl x16, w17, wzr, x18
1618        umaddl x19, w20, w21, xzr
1619// CHECK: umaddl   x3, w5, w2, x9             // encoding: [0xa3,0x24,0xa2,0x9b]
1620// CHECK: umaddl   xzr, w10, w11, x12         // encoding: [0x5f,0x31,0xab,0x9b]
1621// CHECK: umaddl   x13, wzr, w14, x15         // encoding: [0xed,0x3f,0xae,0x9b]
1622// CHECK: umaddl   x16, w17, wzr, x18         // encoding: [0x30,0x4a,0xbf,0x9b]
1623// CHECK: umull    x19, w20, w21              // encoding: [0x93,0x7e,0xb5,0x9b]
1624
1625
1626
1627        umsubl x3, w5, w2, x9
1628        umsubl xzr, w10, w11, x12
1629        umsubl x13, wzr, w14, x15
1630        umsubl x16, w17, wzr, x18
1631        umsubl x19, w20, w21, xzr
1632// CHECK: umsubl   x3, w5, w2, x9             // encoding: [0xa3,0xa4,0xa2,0x9b]
1633// CHECK: umsubl   xzr, w10, w11, x12         // encoding: [0x5f,0xb1,0xab,0x9b]
1634// CHECK: umsubl   x13, wzr, w14, x15         // encoding: [0xed,0xbf,0xae,0x9b]
1635// CHECK: umsubl   x16, w17, wzr, x18         // encoding: [0x30,0xca,0xbf,0x9b]
1636// CHECK: umnegl   x19, w20, w21              // encoding: [0x93,0xfe,0xb5,0x9b]
1637
1638        smulh x30, x29, x28
1639        smulh xzr, x27, x26
1640        smulh x25, xzr, x24
1641        smulh x23, x22, xzr
1642// CHECK: smulh    x30, x29, x28              // encoding: [0xbe,0x7f,0x5c,0x9b]
1643// CHECK: smulh    xzr, x27, x26              // encoding: [0x7f,0x7f,0x5a,0x9b]
1644// CHECK: smulh    x25, xzr, x24              // encoding: [0xf9,0x7f,0x58,0x9b]
1645// CHECK: smulh    x23, x22, xzr              // encoding: [0xd7,0x7e,0x5f,0x9b]
1646
1647        umulh x30, x29, x28
1648        umulh xzr, x27, x26
1649        umulh x25, xzr, x24
1650        umulh x23, x22, xzr
1651// CHECK: umulh    x30, x29, x28              // encoding: [0xbe,0x7f,0xdc,0x9b]
1652// CHECK: umulh    xzr, x27, x26              // encoding: [0x7f,0x7f,0xda,0x9b]
1653// CHECK: umulh    x25, xzr, x24              // encoding: [0xf9,0x7f,0xd8,0x9b]
1654// CHECK: umulh    x23, x22, xzr              // encoding: [0xd7,0x7e,0xdf,0x9b]
1655
1656        mul w3, w4, w5
1657        mul wzr, w6, w7
1658        mul w8, wzr, w9
1659        mul w10, w11, wzr
1660
1661        mul x12, x13, x14
1662        mul xzr, x15, x16
1663        mul x17, xzr, x18
1664        mul x19, x20, xzr
1665
1666        mneg w21, w22, w23
1667        mneg wzr, w24, w25
1668        mneg w26, wzr, w27
1669        mneg w28, w29, wzr
1670
1671        smull x11, w13, w17
1672        umull x11, w13, w17
1673        smnegl x11, w13, w17
1674        umnegl x11, w13, w17
1675// CHECK: mul      w3, w4, w5                 // encoding: [0x83,0x7c,0x05,0x1b]
1676// CHECK: mul      wzr, w6, w7                // encoding: [0xdf,0x7c,0x07,0x1b]
1677// CHECK: mul      w8, wzr, w9                // encoding: [0xe8,0x7f,0x09,0x1b]
1678// CHECK: mul      w10, w11, wzr              // encoding: [0x6a,0x7d,0x1f,0x1b]
1679// CHECK: mul      x12, x13, x14              // encoding: [0xac,0x7d,0x0e,0x9b]
1680// CHECK: mul      xzr, x15, x16              // encoding: [0xff,0x7d,0x10,0x9b]
1681// CHECK: mul      x17, xzr, x18              // encoding: [0xf1,0x7f,0x12,0x9b]
1682// CHECK: mul      x19, x20, xzr              // encoding: [0x93,0x7e,0x1f,0x9b]
1683// CHECK: mneg     w21, w22, w23              // encoding: [0xd5,0xfe,0x17,0x1b]
1684// CHECK: mneg     wzr, w24, w25              // encoding: [0x1f,0xff,0x19,0x1b]
1685// CHECK: mneg     w26, wzr, w27              // encoding: [0xfa,0xff,0x1b,0x1b]
1686// CHECK: mneg     w28, w29, wzr              // encoding: [0xbc,0xff,0x1f,0x1b]
1687// CHECK: smull    x11, w13, w17              // encoding: [0xab,0x7d,0x31,0x9b]
1688// CHECK: umull    x11, w13, w17              // encoding: [0xab,0x7d,0xb1,0x9b]
1689// CHECK: smnegl   x11, w13, w17              // encoding: [0xab,0xfd,0x31,0x9b]
1690// CHECK: umnegl   x11, w13, w17              // encoding: [0xab,0xfd,0xb1,0x9b]
1691
1692//------------------------------------------------------------------------------
1693// Exception generation
1694//------------------------------------------------------------------------------
1695        svc #0
1696        svc #65535
1697// CHECK: svc      #0                         // encoding: [0x01,0x00,0x00,0xd4]
1698// CHECK: svc      #{{65535|0xffff}}          // encoding: [0xe1,0xff,0x1f,0xd4]
1699
1700        hvc #1
1701        smc #12000
1702        brk #12
1703        hlt #123
1704// CHECK: hvc      #{{1|0x1}}                 // encoding: [0x22,0x00,0x00,0xd4]
1705// CHECK: smc      #{{12000|0x2ee0}}          // encoding: [0x03,0xdc,0x05,0xd4]
1706// CHECK: brk      #{{12|0xc}}                // encoding: [0x80,0x01,0x20,0xd4]
1707// CHECK: hlt      #{{123|0x7b}}              // encoding: [0x60,0x0f,0x40,0xd4]
1708
1709        dcps1 #42
1710        dcps2 #9
1711        dcps3 #1000
1712// CHECK: dcps1    #{{42|0x2a}}               // encoding: [0x41,0x05,0xa0,0xd4]
1713// CHECK: dcps2    #{{9|0x9}}                 // encoding: [0x22,0x01,0xa0,0xd4]
1714// CHECK: dcps3    #{{1000|0x3e8}}            // encoding: [0x03,0x7d,0xa0,0xd4]
1715
1716        dcps1
1717        dcps2
1718        dcps3
1719// CHECK: dcps1                               // encoding: [0x01,0x00,0xa0,0xd4]
1720// CHECK: dcps2                               // encoding: [0x02,0x00,0xa0,0xd4]
1721// CHECK: dcps3                               // encoding: [0x03,0x00,0xa0,0xd4]
1722
1723//------------------------------------------------------------------------------
1724// Extract (immediate)
1725//------------------------------------------------------------------------------
1726
1727        extr w3, w5, w7, #0
1728        extr w11, w13, w17, #31
1729// CHECK: extr     w3, w5, w7, #0             // encoding: [0xa3,0x00,0x87,0x13]
1730// CHECK: extr     w11, w13, w17, #31         // encoding: [0xab,0x7d,0x91,0x13]
1731
1732        extr x3, x5, x7, #15
1733        extr x11, x13, x17, #63
1734// CHECK: extr     x3, x5, x7, #15            // encoding: [0xa3,0x3c,0xc7,0x93]
1735// CHECK: extr     x11, x13, x17, #63         // encoding: [0xab,0xfd,0xd1,0x93]
1736
1737        ror x19, x23, #24
1738        ror x29, xzr, #63
1739// CHECK: ror     x19, x23, #24         // encoding: [0xf3,0x62,0xd7,0x93]
1740// CHECK: ror     x29, xzr, #63         // encoding: [0xfd,0xff,0xdf,0x93]
1741
1742        ror w9, w13, #31
1743// CHECK: ror     w9, w13, #31          // encoding: [0xa9,0x7d,0x8d,0x13]
1744
1745//------------------------------------------------------------------------------
1746// Floating-point compare
1747//------------------------------------------------------------------------------
1748
1749        fcmp s3, s5
1750        fcmp s31, #0.0
1751// CHECK: fcmp    s3, s5                  // encoding: [0x60,0x20,0x25,0x1e]
1752// CHECK: fcmp    s31, #0.0               // encoding: [0xe8,0x23,0x20,0x1e]
1753
1754        fcmpe s29, s30
1755        fcmpe s15, #0.0
1756// CHECK: fcmpe   s29, s30                // encoding: [0xb0,0x23,0x3e,0x1e]
1757// CHECK: fcmpe   s15, #0.0               // encoding: [0xf8,0x21,0x20,0x1e]
1758
1759        fcmp d4, d12
1760        fcmp d23, #0.0
1761// CHECK: fcmp    d4, d12                 // encoding: [0x80,0x20,0x6c,0x1e]
1762// CHECK: fcmp    d23, #0.0               // encoding: [0xe8,0x22,0x60,0x1e]
1763
1764        fcmpe d26, d22
1765        fcmpe d29, #0.0
1766// CHECK: fcmpe   d26, d22                // encoding: [0x50,0x23,0x76,0x1e]
1767// CHECK: fcmpe   d29, #0.0               // encoding: [0xb8,0x23,0x60,0x1e]
1768
1769//------------------------------------------------------------------------------
1770// Floating-point conditional compare
1771//------------------------------------------------------------------------------
1772
1773        fccmp s1, s31, #0, eq
1774        fccmp s3, s0, #15, hs
1775        fccmp s31, s15, #13, cs
1776// CHECK: fccmp    s1, s31, #0, eq         // encoding: [0x20,0x04,0x3f,0x1e]
1777// CHECK: fccmp    s3, s0, #15, hs         // encoding: [0x6f,0x24,0x20,0x1e]
1778// CHECK: fccmp    s31, s15, #13, hs       // encoding: [0xed,0x27,0x2f,0x1e]
1779
1780        fccmp d9, d31, #0, le
1781        fccmp d3, d0, #15, gt
1782        fccmp d31, d5, #7, ne
1783// CHECK: fccmp    d9, d31, #0, le         // encoding: [0x20,0xd5,0x7f,0x1e]
1784// CHECK: fccmp    d3, d0, #15, gt         // encoding: [0x6f,0xc4,0x60,0x1e]
1785// CHECK: fccmp    d31, d5, #7, ne         // encoding: [0xe7,0x17,0x65,0x1e]
1786
1787        fccmpe s1, s31, #0, eq
1788        fccmpe s3, s0, #15, hs
1789        fccmpe s31, s15, #13, cs
1790// CHECK: fccmpe    s1, s31, #0, eq         // encoding: [0x30,0x04,0x3f,0x1e]
1791// CHECK: fccmpe    s3, s0, #15, hs         // encoding: [0x7f,0x24,0x20,0x1e]
1792// CHECK: fccmpe    s31, s15, #13, hs       // encoding: [0xfd,0x27,0x2f,0x1e]
1793
1794        fccmpe d9, d31, #0, le
1795        fccmpe d3, d0, #15, gt
1796        fccmpe d31, d5, #7, ne
1797// CHECK: fccmpe    d9, d31, #0, le         // encoding: [0x30,0xd5,0x7f,0x1e]
1798// CHECK: fccmpe    d3, d0, #15, gt         // encoding: [0x7f,0xc4,0x60,0x1e]
1799// CHECK: fccmpe    d31, d5, #7, ne         // encoding: [0xf7,0x17,0x65,0x1e]
1800
1801//------------------------------------------------------------------------------
1802// Floating-point conditional compare
1803//------------------------------------------------------------------------------
1804
1805        fcsel s3, s20, s9, pl
1806        fcsel d9, d10, d11, mi
1807// CHECK: fcsel   s3, s20, s9, pl         // encoding: [0x83,0x5e,0x29,0x1e]
1808// CHECK: fcsel   d9, d10, d11, mi        // encoding: [0x49,0x4d,0x6b,0x1e]
1809
1810//------------------------------------------------------------------------------
1811// Floating-point data-processing (1 source)
1812//------------------------------------------------------------------------------
1813
1814        fmov s0, s1
1815        fabs s2, s3
1816        fneg s4, s5
1817        fsqrt s6, s7
1818        fcvt d8, s9
1819        fcvt h10, s11
1820        frintn s12, s13
1821        frintp s14, s15
1822        frintm s16, s17
1823        frintz s18, s19
1824        frinta s20, s21
1825        frintx s22, s23
1826        frinti s24, s25
1827// CHECK: fmov     s0, s1                // encoding: [0x20,0x40,0x20,0x1e]
1828// CHECK: fabs     s2, s3                // encoding: [0x62,0xc0,0x20,0x1e]
1829// CHECK: fneg     s4, s5                     // encoding: [0xa4,0x40,0x21,0x1e]
1830// CHECK: fsqrt    s6, s7                     // encoding: [0xe6,0xc0,0x21,0x1e]
1831// CHECK: fcvt     d8, s9                     // encoding: [0x28,0xc1,0x22,0x1e]
1832// CHECK: fcvt     h10, s11                   // encoding: [0x6a,0xc1,0x23,0x1e]
1833// CHECK: frintn   s12, s13                   // encoding: [0xac,0x41,0x24,0x1e]
1834// CHECK: frintp   s14, s15                   // encoding: [0xee,0xc1,0x24,0x1e]
1835// CHECK: frintm   s16, s17                   // encoding: [0x30,0x42,0x25,0x1e]
1836// CHECK: frintz   s18, s19                   // encoding: [0x72,0xc2,0x25,0x1e]
1837// CHECK: frinta   s20, s21                   // encoding: [0xb4,0x42,0x26,0x1e]
1838// CHECK: frintx   s22, s23                   // encoding: [0xf6,0x42,0x27,0x1e]
1839// CHECK: frinti   s24, s25                   // encoding: [0x38,0xc3,0x27,0x1e]
1840
1841        fmov d0, d1
1842        fabs d2, d3
1843        fneg d4, d5
1844        fsqrt d6, d7
1845        fcvt s8, d9
1846        fcvt h10, d11
1847        frintn d12, d13
1848        frintp d14, d15
1849        frintm d16, d17
1850        frintz d18, d19
1851        frinta d20, d21
1852        frintx d22, d23
1853        frinti d24, d25
1854// CHECK: fmov     d0, d1                     // encoding: [0x20,0x40,0x60,0x1e]
1855// CHECK: fabs     d2, d3                     // encoding: [0x62,0xc0,0x60,0x1e]
1856// CHECK: fneg     d4, d5                     // encoding: [0xa4,0x40,0x61,0x1e]
1857// CHECK: fsqrt    d6, d7                     // encoding: [0xe6,0xc0,0x61,0x1e]
1858// CHECK: fcvt     s8, d9                     // encoding: [0x28,0x41,0x62,0x1e]
1859// CHECK: fcvt     h10, d11                   // encoding: [0x6a,0xc1,0x63,0x1e]
1860// CHECK: frintn   d12, d13                   // encoding: [0xac,0x41,0x64,0x1e]
1861// CHECK: frintp   d14, d15                   // encoding: [0xee,0xc1,0x64,0x1e]
1862// CHECK: frintm   d16, d17                   // encoding: [0x30,0x42,0x65,0x1e]
1863// CHECK: frintz   d18, d19                   // encoding: [0x72,0xc2,0x65,0x1e]
1864// CHECK: frinta   d20, d21                   // encoding: [0xb4,0x42,0x66,0x1e]
1865// CHECK: frintx   d22, d23                   // encoding: [0xf6,0x42,0x67,0x1e]
1866// CHECK: frinti   d24, d25                   // encoding: [0x38,0xc3,0x67,0x1e]
1867
1868        fcvt s26, h27
1869        fcvt d28, h29
1870// CHECK: fcvt     s26, h27                   // encoding: [0x7a,0x43,0xe2,0x1e]
1871// CHECK: fcvt     d28, h29                   // encoding: [0xbc,0xc3,0xe2,0x1e]
1872
1873//------------------------------------------------------------------------------
1874// Floating-point data-processing (2 sources)
1875//------------------------------------------------------------------------------
1876
1877        fmul s20, s19, s17
1878        fdiv s1, s2, s3
1879        fadd s4, s5, s6
1880        fsub s7, s8, s9
1881        fmax s10, s11, s12
1882        fmin s13, s14, s15
1883        fmaxnm s16, s17, s18
1884        fminnm s19, s20, s21
1885        fnmul s22, s23, s24
1886// CHECK: fmul     s20, s19, s17              // encoding: [0x74,0x0a,0x31,0x1e]
1887// CHECK: fdiv     s1, s2, s3                 // encoding: [0x41,0x18,0x23,0x1e]
1888// CHECK: fadd     s4, s5, s6                 // encoding: [0xa4,0x28,0x26,0x1e]
1889// CHECK: fsub     s7, s8, s9                 // encoding: [0x07,0x39,0x29,0x1e]
1890// CHECK: fmax     s10, s11, s12              // encoding: [0x6a,0x49,0x2c,0x1e]
1891// CHECK: fmin     s13, s14, s15              // encoding: [0xcd,0x59,0x2f,0x1e]
1892// CHECK: fmaxnm   s16, s17, s18              // encoding: [0x30,0x6a,0x32,0x1e]
1893// CHECK: fminnm   s19, s20, s21              // encoding: [0x93,0x7a,0x35,0x1e]
1894// CHECK: fnmul    s22, s23, s24              // encoding: [0xf6,0x8a,0x38,0x1e]
1895
1896        fmul d20, d19, d17
1897        fdiv d1, d2, d3
1898        fadd d4, d5, d6
1899        fsub d7, d8, d9
1900        fmax d10, d11, d12
1901        fmin d13, d14, d15
1902        fmaxnm d16, d17, d18
1903        fminnm d19, d20, d21
1904        fnmul d22, d23, d24
1905// CHECK: fmul     d20, d19, d17              // encoding: [0x74,0x0a,0x71,0x1e]
1906// CHECK: fdiv     d1, d2, d3                 // encoding: [0x41,0x18,0x63,0x1e]
1907// CHECK: fadd     d4, d5, d6                 // encoding: [0xa4,0x28,0x66,0x1e]
1908// CHECK: fsub     d7, d8, d9                 // encoding: [0x07,0x39,0x69,0x1e]
1909// CHECK: fmax     d10, d11, d12              // encoding: [0x6a,0x49,0x6c,0x1e]
1910// CHECK: fmin     d13, d14, d15              // encoding: [0xcd,0x59,0x6f,0x1e]
1911// CHECK: fmaxnm   d16, d17, d18              // encoding: [0x30,0x6a,0x72,0x1e]
1912// CHECK: fminnm   d19, d20, d21              // encoding: [0x93,0x7a,0x75,0x1e]
1913// CHECK: fnmul    d22, d23, d24              // encoding: [0xf6,0x8a,0x78,0x1e]
1914
1915//------------------------------------------------------------------------------
1916// Floating-point data-processing (3 sources)
1917//------------------------------------------------------------------------------
1918
1919        fmadd s3, s5, s6, s31
1920        fmadd d3, d13, d0, d23
1921        fmsub s3, s5, s6, s31
1922        fmsub d3, d13, d0, d23
1923        fnmadd s3, s5, s6, s31
1924        fnmadd d3, d13, d0, d23
1925        fnmsub s3, s5, s6, s31
1926        fnmsub d3, d13, d0, d23
1927// CHECK: fmadd   s3, s5, s6, s31         // encoding: [0xa3,0x7c,0x06,0x1f]
1928// CHECK: fmadd   d3, d13, d0, d23        // encoding: [0xa3,0x5d,0x40,0x1f]
1929// CHECK: fmsub   s3, s5, s6, s31         // encoding: [0xa3,0xfc,0x06,0x1f]
1930// CHECK: fmsub   d3, d13, d0, d23        // encoding: [0xa3,0xdd,0x40,0x1f]
1931// CHECK: fnmadd  s3, s5, s6, s31         // encoding: [0xa3,0x7c,0x26,0x1f]
1932// CHECK: fnmadd  d3, d13, d0, d23        // encoding: [0xa3,0x5d,0x60,0x1f]
1933// CHECK: fnmsub  s3, s5, s6, s31         // encoding: [0xa3,0xfc,0x26,0x1f]
1934// CHECK: fnmsub  d3, d13, d0, d23        // encoding: [0xa3,0xdd,0x60,0x1f]
1935
1936//------------------------------------------------------------------------------
1937// Floating-point <-> fixed-point conversion
1938//------------------------------------------------------------------------------
1939
1940        fcvtzs w3, s5, #1
1941        fcvtzs wzr, s20, #13
1942        fcvtzs w19, s0, #32
1943// CHECK: fcvtzs  w3, s5, #1              // encoding: [0xa3,0xfc,0x18,0x1e]
1944// CHECK: fcvtzs  wzr, s20, #13           // encoding: [0x9f,0xce,0x18,0x1e]
1945// CHECK: fcvtzs  w19, s0, #32            // encoding: [0x13,0x80,0x18,0x1e]
1946
1947        fcvtzs x3, s5, #1
1948        fcvtzs x12, s30, #45
1949        fcvtzs x19, s0, #64
1950// CHECK: fcvtzs  x3, s5, #1              // encoding: [0xa3,0xfc,0x18,0x9e]
1951// CHECK: fcvtzs  x12, s30, #45           // encoding: [0xcc,0x4f,0x18,0x9e]
1952// CHECK: fcvtzs  x19, s0, #64            // encoding: [0x13,0x00,0x18,0x9e]
1953
1954        fcvtzs w3, d5, #1
1955        fcvtzs wzr, d20, #13
1956        fcvtzs w19, d0, #32
1957// CHECK: fcvtzs  w3, d5, #1              // encoding: [0xa3,0xfc,0x58,0x1e]
1958// CHECK: fcvtzs  wzr, d20, #13           // encoding: [0x9f,0xce,0x58,0x1e]
1959// CHECK: fcvtzs  w19, d0, #32            // encoding: [0x13,0x80,0x58,0x1e]
1960
1961        fcvtzs x3, d5, #1
1962        fcvtzs x12, d30, #45
1963        fcvtzs x19, d0, #64
1964// CHECK: fcvtzs  x3, d5, #1              // encoding: [0xa3,0xfc,0x58,0x9e]
1965// CHECK: fcvtzs  x12, d30, #45           // encoding: [0xcc,0x4f,0x58,0x9e]
1966// CHECK: fcvtzs  x19, d0, #64            // encoding: [0x13,0x00,0x58,0x9e]
1967
1968        fcvtzu w3, s5, #1
1969        fcvtzu wzr, s20, #13
1970        fcvtzu w19, s0, #32
1971// CHECK: fcvtzu  w3, s5, #1              // encoding: [0xa3,0xfc,0x19,0x1e]
1972// CHECK: fcvtzu  wzr, s20, #13           // encoding: [0x9f,0xce,0x19,0x1e]
1973// CHECK: fcvtzu  w19, s0, #32            // encoding: [0x13,0x80,0x19,0x1e]
1974
1975        fcvtzu x3, s5, #1
1976        fcvtzu x12, s30, #45
1977        fcvtzu x19, s0, #64
1978// CHECK: fcvtzu  x3, s5, #1              // encoding: [0xa3,0xfc,0x19,0x9e]
1979// CHECK: fcvtzu  x12, s30, #45           // encoding: [0xcc,0x4f,0x19,0x9e]
1980// CHECK: fcvtzu  x19, s0, #64            // encoding: [0x13,0x00,0x19,0x9e]
1981
1982        fcvtzu w3, d5, #1
1983        fcvtzu wzr, d20, #13
1984        fcvtzu w19, d0, #32
1985// CHECK: fcvtzu  w3, d5, #1              // encoding: [0xa3,0xfc,0x59,0x1e]
1986// CHECK: fcvtzu  wzr, d20, #13           // encoding: [0x9f,0xce,0x59,0x1e]
1987// CHECK: fcvtzu  w19, d0, #32            // encoding: [0x13,0x80,0x59,0x1e]
1988
1989        fcvtzu x3, d5, #1
1990        fcvtzu x12, d30, #45
1991        fcvtzu x19, d0, #64
1992// CHECK: fcvtzu  x3, d5, #1              // encoding: [0xa3,0xfc,0x59,0x9e]
1993// CHECK: fcvtzu  x12, d30, #45           // encoding: [0xcc,0x4f,0x59,0x9e]
1994// CHECK: fcvtzu  x19, d0, #64            // encoding: [0x13,0x00,0x59,0x9e]
1995
1996        scvtf s23, w19, #1
1997        scvtf s31, wzr, #20
1998        scvtf s14, w0, #32
1999// CHECK: scvtf   s23, w19, #1            // encoding: [0x77,0xfe,0x02,0x1e]
2000// CHECK: scvtf   s31, wzr, #20           // encoding: [0xff,0xb3,0x02,0x1e]
2001// CHECK: scvtf   s14, w0, #32            // encoding: [0x0e,0x80,0x02,0x1e]
2002
2003        scvtf s23, x19, #1
2004        scvtf s31, xzr, #20
2005        scvtf s14, x0, #64
2006// CHECK: scvtf   s23, x19, #1            // encoding: [0x77,0xfe,0x02,0x9e]
2007// CHECK: scvtf   s31, xzr, #20           // encoding: [0xff,0xb3,0x02,0x9e]
2008// CHECK: scvtf   s14, x0, #64            // encoding: [0x0e,0x00,0x02,0x9e]
2009
2010        scvtf d23, w19, #1
2011        scvtf d31, wzr, #20
2012        scvtf d14, w0, #32
2013// CHECK: scvtf   d23, w19, #1            // encoding: [0x77,0xfe,0x42,0x1e]
2014// CHECK: scvtf   d31, wzr, #20           // encoding: [0xff,0xb3,0x42,0x1e]
2015// CHECK: scvtf   d14, w0, #32            // encoding: [0x0e,0x80,0x42,0x1e]
2016
2017        scvtf d23, x19, #1
2018        scvtf d31, xzr, #20
2019        scvtf d14, x0, #64
2020// CHECK: scvtf   d23, x19, #1            // encoding: [0x77,0xfe,0x42,0x9e]
2021// CHECK: scvtf   d31, xzr, #20           // encoding: [0xff,0xb3,0x42,0x9e]
2022// CHECK: scvtf   d14, x0, #64            // encoding: [0x0e,0x00,0x42,0x9e]
2023
2024        ucvtf s23, w19, #1
2025        ucvtf s31, wzr, #20
2026        ucvtf s14, w0, #32
2027// CHECK: ucvtf   s23, w19, #1            // encoding: [0x77,0xfe,0x03,0x1e]
2028// CHECK: ucvtf   s31, wzr, #20           // encoding: [0xff,0xb3,0x03,0x1e]
2029// CHECK: ucvtf   s14, w0, #32            // encoding: [0x0e,0x80,0x03,0x1e]
2030
2031        ucvtf s23, x19, #1
2032        ucvtf s31, xzr, #20
2033        ucvtf s14, x0, #64
2034// CHECK: ucvtf   s23, x19, #1            // encoding: [0x77,0xfe,0x03,0x9e]
2035// CHECK: ucvtf   s31, xzr, #20           // encoding: [0xff,0xb3,0x03,0x9e]
2036// CHECK: ucvtf   s14, x0, #64            // encoding: [0x0e,0x00,0x03,0x9e]
2037
2038        ucvtf d23, w19, #1
2039        ucvtf d31, wzr, #20
2040        ucvtf d14, w0, #32
2041// CHECK: ucvtf   d23, w19, #1            // encoding: [0x77,0xfe,0x43,0x1e]
2042// CHECK: ucvtf   d31, wzr, #20           // encoding: [0xff,0xb3,0x43,0x1e]
2043// CHECK: ucvtf   d14, w0, #32            // encoding: [0x0e,0x80,0x43,0x1e]
2044
2045        ucvtf d23, x19, #1
2046        ucvtf d31, xzr, #20
2047        ucvtf d14, x0, #64
2048// CHECK: ucvtf   d23, x19, #1            // encoding: [0x77,0xfe,0x43,0x9e]
2049// CHECK: ucvtf   d31, xzr, #20           // encoding: [0xff,0xb3,0x43,0x9e]
2050// CHECK: ucvtf   d14, x0, #64            // encoding: [0x0e,0x00,0x43,0x9e]
2051
2052//------------------------------------------------------------------------------
2053// Floating-point <-> integer conversion
2054//------------------------------------------------------------------------------
2055        fcvtns w3, s31
2056        fcvtns xzr, s12
2057        fcvtnu wzr, s12
2058        fcvtnu x0, s0
2059// CHECK: fcvtns   w3, s31                    // encoding: [0xe3,0x03,0x20,0x1e]
2060// CHECK: fcvtns   xzr, s12                   // encoding: [0x9f,0x01,0x20,0x9e]
2061// CHECK: fcvtnu   wzr, s12                   // encoding: [0x9f,0x01,0x21,0x1e]
2062// CHECK: fcvtnu   x0, s0                     // encoding: [0x00,0x00,0x21,0x9e]
2063
2064        fcvtps wzr, s9
2065        fcvtps x12, s20
2066        fcvtpu w30, s23
2067        fcvtpu x29, s3
2068// CHECK: fcvtps   wzr, s9                    // encoding: [0x3f,0x01,0x28,0x1e]
2069// CHECK: fcvtps   x12, s20                   // encoding: [0x8c,0x02,0x28,0x9e]
2070// CHECK: fcvtpu   w30, s23                   // encoding: [0xfe,0x02,0x29,0x1e]
2071// CHECK: fcvtpu   x29, s3                    // encoding: [0x7d,0x00,0x29,0x9e]
2072
2073        fcvtms w2, s3
2074        fcvtms x4, s5
2075        fcvtmu w6, s7
2076        fcvtmu x8, s9
2077// CHECK: fcvtms   w2, s3                     // encoding: [0x62,0x00,0x30,0x1e]
2078// CHECK: fcvtms   x4, s5                     // encoding: [0xa4,0x00,0x30,0x9e]
2079// CHECK: fcvtmu   w6, s7                     // encoding: [0xe6,0x00,0x31,0x1e]
2080// CHECK: fcvtmu   x8, s9                     // encoding: [0x28,0x01,0x31,0x9e]
2081
2082        fcvtzs w10, s11
2083        fcvtzs x12, s13
2084        fcvtzu w14, s15
2085        fcvtzu x15, s16
2086// CHECK: fcvtzs   w10, s11                   // encoding: [0x6a,0x01,0x38,0x1e]
2087// CHECK: fcvtzs   x12, s13                   // encoding: [0xac,0x01,0x38,0x9e]
2088// CHECK: fcvtzu   w14, s15                   // encoding: [0xee,0x01,0x39,0x1e]
2089// CHECK: fcvtzu   x15, s16                   // encoding: [0x0f,0x02,0x39,0x9e]
2090
2091        scvtf s17, w18
2092        scvtf s19, x20
2093        ucvtf s21, w22
2094        scvtf s23, x24
2095// CHECK: scvtf    s17, w18                   // encoding: [0x51,0x02,0x22,0x1e]
2096// CHECK: scvtf    s19, x20                   // encoding: [0x93,0x02,0x22,0x9e]
2097// CHECK: ucvtf    s21, w22                   // encoding: [0xd5,0x02,0x23,0x1e]
2098// CHECK: scvtf    s23, x24                   // encoding: [0x17,0x03,0x22,0x9e]
2099
2100        fcvtas w25, s26
2101        fcvtas x27, s28
2102        fcvtau w29, s30
2103        fcvtau xzr, s0
2104// CHECK: fcvtas   w25, s26                   // encoding: [0x59,0x03,0x24,0x1e]
2105// CHECK: fcvtas   x27, s28                   // encoding: [0x9b,0x03,0x24,0x9e]
2106// CHECK: fcvtau   w29, s30                   // encoding: [0xdd,0x03,0x25,0x1e]
2107// CHECK: fcvtau   xzr, s0                    // encoding: [0x1f,0x00,0x25,0x9e]
2108
2109        fcvtns w3, d31
2110        fcvtns xzr, d12
2111        fcvtnu wzr, d12
2112        fcvtnu x0, d0
2113// CHECK: fcvtns   w3, d31                    // encoding: [0xe3,0x03,0x60,0x1e]
2114// CHECK: fcvtns   xzr, d12                   // encoding: [0x9f,0x01,0x60,0x9e]
2115// CHECK: fcvtnu   wzr, d12                   // encoding: [0x9f,0x01,0x61,0x1e]
2116// CHECK: fcvtnu   x0, d0                     // encoding: [0x00,0x00,0x61,0x9e]
2117
2118        fcvtps wzr, d9
2119        fcvtps x12, d20
2120        fcvtpu w30, d23
2121        fcvtpu x29, d3
2122// CHECK: fcvtps   wzr, d9                    // encoding: [0x3f,0x01,0x68,0x1e]
2123// CHECK: fcvtps   x12, d20                   // encoding: [0x8c,0x02,0x68,0x9e]
2124// CHECK: fcvtpu   w30, d23                   // encoding: [0xfe,0x02,0x69,0x1e]
2125// CHECK: fcvtpu   x29, d3                    // encoding: [0x7d,0x00,0x69,0x9e]
2126
2127        fcvtms w2, d3
2128        fcvtms x4, d5
2129        fcvtmu w6, d7
2130        fcvtmu x8, d9
2131// CHECK: fcvtms   w2, d3                     // encoding: [0x62,0x00,0x70,0x1e]
2132// CHECK: fcvtms   x4, d5                     // encoding: [0xa4,0x00,0x70,0x9e]
2133// CHECK: fcvtmu   w6, d7                     // encoding: [0xe6,0x00,0x71,0x1e]
2134// CHECK: fcvtmu   x8, d9                     // encoding: [0x28,0x01,0x71,0x9e]
2135
2136        fcvtzs w10, d11
2137        fcvtzs x12, d13
2138        fcvtzu w14, d15
2139        fcvtzu x15, d16
2140// CHECK: fcvtzs   w10, d11                   // encoding: [0x6a,0x01,0x78,0x1e]
2141// CHECK: fcvtzs   x12, d13                   // encoding: [0xac,0x01,0x78,0x9e]
2142// CHECK: fcvtzu   w14, d15                   // encoding: [0xee,0x01,0x79,0x1e]
2143// CHECK: fcvtzu   x15, d16                   // encoding: [0x0f,0x02,0x79,0x9e]
2144
2145        scvtf d17, w18
2146        scvtf d19, x20
2147        ucvtf d21, w22
2148        ucvtf d23, x24
2149// CHECK: scvtf    d17, w18                   // encoding: [0x51,0x02,0x62,0x1e]
2150// CHECK: scvtf    d19, x20                   // encoding: [0x93,0x02,0x62,0x9e]
2151// CHECK: ucvtf    d21, w22                   // encoding: [0xd5,0x02,0x63,0x1e]
2152// CHECK: ucvtf    d23, x24                   // encoding: [0x17,0x03,0x63,0x9e]
2153
2154        fcvtas w25, d26
2155        fcvtas x27, d28
2156        fcvtau w29, d30
2157        fcvtau xzr, d0
2158// CHECK: fcvtas   w25, d26                   // encoding: [0x59,0x03,0x64,0x1e]
2159// CHECK: fcvtas   x27, d28                   // encoding: [0x9b,0x03,0x64,0x9e]
2160// CHECK: fcvtau   w29, d30                   // encoding: [0xdd,0x03,0x65,0x1e]
2161// CHECK: fcvtau   xzr, d0                    // encoding: [0x1f,0x00,0x65,0x9e]
2162
2163        fmov w3, s9
2164        fmov s9, w3
2165// CHECK: fmov     w3, s9                     // encoding: [0x23,0x01,0x26,0x1e]
2166// CHECK: fmov     s9, w3                     // encoding: [0x69,0x00,0x27,0x1e]
2167
2168        fmov x20, d31
2169        fmov d1, x15
2170// CHECK: fmov     x20, d31                   // encoding: [0xf4,0x03,0x66,0x9e]
2171// CHECK: fmov     d1, x15                    // encoding: [0xe1,0x01,0x67,0x9e]
2172
2173        fmov x3, v12.d[1]
2174        fmov v1.d[1], x19
2175        fmov v3.d[1], xzr
2176// CHECK: fmov     x3, v12.d[1]               // encoding: [0x83,0x01,0xae,0x9e]
2177// CHECK: fmov     v1.d[1], x19               // encoding: [0x61,0x02,0xaf,0x9e]
2178// CHECK: fmov     v3.d[1], xzr               // encoding: [0xe3,0x03,0xaf,0x9e]
2179
2180//------------------------------------------------------------------------------
2181// Floating-point immediate
2182//------------------------------------------------------------------------------
2183
2184        fmov s2, #0.125
2185        fmov s3, #1.0
2186        fmov d30, #16.0
2187// CHECK: fmov     s2, #{{0.12500000|1.250*e-01}}            // encoding: [0x02,0x10,0x28,0x1e]
2188// CHECK: fmov     s3, #{{1.00000000|1.0*e\+00}}            // encoding: [0x03,0x10,0x2e,0x1e]
2189// CHECK: fmov     d30, #{{16.00000000|1.60*e\+01}}          // encoding: [0x1e,0x10,0x66,0x1e]
2190
2191        fmov s4, #1.0625
2192        fmov d10, #1.9375
2193// CHECK: fmov     s4, #{{1.06250*(e\+00)?}}            // encoding: [0x04,0x30,0x2e,0x1e]
2194// CHECK: fmov     d10, #{{1.93750*(e\+00)?}}           // encoding: [0x0a,0xf0,0x6f,0x1e]
2195
2196        fmov s12, #-1.0
2197// CHECK: fmov     s12, #{{-1.0*(e\+00)?}}          // encoding: [0x0c,0x10,0x3e,0x1e]
2198
2199        fmov d16, #8.5
2200// CHECK: fmov     d16, #{{8.50*(e\+00)?}}          // encoding: [0x10,0x30,0x64,0x1e]
2201
2202//------------------------------------------------------------------------------
2203// Load-register (literal)
2204//------------------------------------------------------------------------------
2205        ldr w3, here
2206        ldr x29, there
2207        ldrsw xzr, everywhere
2208
2209// CHECK: ldr    w3, here                // encoding: [0bAAA00011,A,A,0x18]
2210// CHECK:                                 //   fixup A - offset: 0, value: here, kind: fixup_aarch64_ldr_pcrel_imm19
2211// CHECK: ldr    x29, there              // encoding: [0bAAA11101,A,A,0x58]
2212// CHECK:                                 //   fixup A - offset: 0, value: there, kind: fixup_aarch64_ldr_pcrel_imm19
2213// CHECK: ldrsw    xzr, everywhere         // encoding: [0bAAA11111,A,A,0x98]
2214// CHECK:                                 //   fixup A - offset: 0, value: everywhere, kind: fixup_aarch64_ldr_pcrel_imm19
2215
2216        ldr s0, who_knows
2217        ldr d0, i_dont
2218        ldr q0, there_must_be_a_better_way
2219
2220// CHECK: ldr    s0, who_knows           // encoding: [0bAAA00000,A,A,0x1c]
2221// CHECK:                                 //   fixup A - offset: 0, value: who_knows, kind: fixup_aarch64_ldr_pcrel_imm19
2222// CHECK: ldr    d0, i_dont              // encoding: [0bAAA00000,A,A,0x5c]
2223// CHECK:                                 //   fixup A - offset: 0, value: i_dont, kind: fixup_aarch64_ldr_pcrel_imm19
2224// CHECK: ldr    q0, there_must_be_a_better_way // encoding: [0bAAA00000,A,A,0x9c]
2225// CHECK:                                 //   fixup A - offset: 0, value: there_must_be_a_better_way, kind: fixup_aarch64_ldr_pcrel_imm19
2226
2227        ldr w0, #1048572
2228        ldr x10, #-1048576
2229// CHECK: ldr     w0, #1048572            // encoding: [0xe0,0xff,0x7f,0x18]
2230// CHECK: ldr     x10, #-1048576          // encoding: [0x0a,0x00,0x80,0x58]
2231
2232        prfm pldl1strm, nowhere
2233        prfm #22, somewhere
2234
2235// CHECK: prfm    pldl1strm, nowhere      // encoding: [0bAAA00001,A,A,0xd8]
2236// CHECK:                                 //   fixup A - offset: 0, value: nowhere, kind: fixup_aarch64_ldr_pcrel_imm19
2237// CHECK: prfm    #22, somewhere          // encoding: [0bAAA10110,A,A,0xd8]
2238// CHECK:                                 //   fixup A - offset: 0, value: somewhere, kind: fixup_aarch64_ldr_pcrel_imm19
2239
2240//------------------------------------------------------------------------------
2241// Load/store exclusive
2242//------------------------------------------------------------------------------
2243
2244        stxrb      w1, w2, [x3, #0]
2245        stxrh      w2, w3, [x4]
2246        stxr       wzr, w4, [sp]
2247        stxr       w5, x6, [x7]
2248// CHECK: stxrb    w1, w2, [x3]              // encoding: [0x62,0x7c,0x01,0x08]
2249// CHECK: stxrh    w2, w3, [x4]              // encoding: [0x83,0x7c,0x02,0x48]
2250// CHECK: stxr     wzr, w4, [sp]             // encoding: [0xe4,0x7f,0x1f,0x88]
2251// CHECK: stxr     w5, x6, [x7]              // encoding: [0xe6,0x7c,0x05,0xc8]
2252
2253        ldxrb      w7, [x9]
2254        ldxrh      wzr, [x10]
2255        ldxr       w9, [sp]
2256        ldxr       x10, [x11]
2257// CHECK: ldxrb    w7, [x9]                  // encoding: [0x27,0x7d,0x5f,0x08]
2258// CHECK: ldxrh    wzr, [x10]                // encoding: [0x5f,0x7d,0x5f,0x48]
2259// CHECK: ldxr     w9, [sp]                  // encoding: [0xe9,0x7f,0x5f,0x88]
2260// CHECK: ldxr     x10, [x11]                // encoding: [0x6a,0x7d,0x5f,0xc8]
2261
2262        stxp       w11, w12, w13, [x14]
2263        stxp       wzr, x23, x14, [x15]
2264// CHECK: stxp     w11, w12, w13, [x14]      // encoding: [0xcc,0x35,0x2b,0x88]
2265// CHECK: stxp     wzr, x23, x14, [x15]      // encoding: [0xf7,0x39,0x3f,0xc8]
2266
2267        ldxp       w12, wzr, [sp]
2268        ldxp       x13, x14, [x15]
2269// CHECK: ldxp     w12, wzr, [sp]            // encoding: [0xec,0x7f,0x7f,0x88]
2270// CHECK: ldxp     x13, x14, [x15]           // encoding: [0xed,0x39,0x7f,0xc8]
2271
2272        stlxrb     w14, w15, [x16]
2273        stlxrh     w15, w16, [x17,#0]
2274        stlxr      wzr, w17, [sp]
2275        stlxr      w18, x19, [x20]
2276// CHECK: stlxrb   w14, w15, [x16]           // encoding: [0x0f,0xfe,0x0e,0x08]
2277// CHECK: stlxrh   w15, w16, [x17]           // encoding: [0x30,0xfe,0x0f,0x48]
2278// CHECK: stlxr    wzr, w17, [sp]            // encoding: [0xf1,0xff,0x1f,0x88]
2279// CHECK: stlxr    w18, x19, [x20]           // encoding: [0x93,0xfe,0x12,0xc8]
2280
2281        ldaxrb     w19, [x21]
2282        ldaxrh     w20, [sp]
2283        ldaxr      wzr, [x22]
2284        ldaxr      x21, [x23]
2285// CHECK: ldaxrb   w19, [x21]                // encoding: [0xb3,0xfe,0x5f,0x08]
2286// CHECK: ldaxrh   w20, [sp]                 // encoding: [0xf4,0xff,0x5f,0x48]
2287// CHECK: ldaxr    wzr, [x22]                // encoding: [0xdf,0xfe,0x5f,0x88]
2288// CHECK: ldaxr    x21, [x23]                // encoding: [0xf5,0xfe,0x5f,0xc8]
2289
2290        stlxp      wzr, w22, w23, [x24]
2291        stlxp      w25, x26, x27, [sp]
2292// CHECK: stlxp    wzr, w22, w23, [x24]      // encoding: [0x16,0xdf,0x3f,0x88]
2293// CHECK: stlxp    w25, x26, x27, [sp]       // encoding: [0xfa,0xef,0x39,0xc8]
2294
2295        ldaxp      w26, wzr, [sp]
2296        ldaxp      x27, x28, [x30]
2297// CHECK: ldaxp    w26, wzr, [sp]            // encoding: [0xfa,0xff,0x7f,0x88]
2298// CHECK: ldaxp    x27, x28, [x30]           // encoding: [0xdb,0xf3,0x7f,0xc8]
2299
2300        stlrb      w27, [sp]
2301        stlrh      w28, [x0]
2302        stlr       wzr, [x1]
2303        stlr       x30, [x2]
2304// CHECK: stlrb    w27, [sp]                 // encoding: [0xfb,0xff,0x9f,0x08]
2305// CHECK: stlrh    w28, [x0]                 // encoding: [0x1c,0xfc,0x9f,0x48]
2306// CHECK: stlr     wzr, [x1]                 // encoding: [0x3f,0xfc,0x9f,0x88]
2307// CHECK: stlr     x30, [x2]                 // encoding: [0x5e,0xfc,0x9f,0xc8]
2308
2309        ldarb      w29, [sp]
2310        ldarh      w30, [x0]
2311        ldar       wzr, [x1]
2312        ldar       x1, [x2]
2313// CHECK: ldarb    w29, [sp]                 // encoding: [0xfd,0xff,0xdf,0x08]
2314// CHECK: ldarh    w30, [x0]                 // encoding: [0x1e,0xfc,0xdf,0x48]
2315// CHECK: ldar     wzr, [x1]                 // encoding: [0x3f,0xfc,0xdf,0x88]
2316// CHECK: ldar     x1, [x2]                  // encoding: [0x41,0xfc,0xdf,0xc8]
2317
2318        stlxp      wzr, w22, w23, [x24,#0]
2319// CHECK: stlxp    wzr, w22, w23, [x24]      // encoding: [0x16,0xdf,0x3f,0x88]
2320
2321//------------------------------------------------------------------------------
2322// Load/store (unaligned immediate)
2323//------------------------------------------------------------------------------
2324
2325        sturb w9, [sp, #0]
2326        sturh wzr, [x12, #255]
2327        stur w16, [x0, #-256]
2328        stur x28, [x14, #1]
2329// CHECK: sturb    w9, [sp]                   // encoding: [0xe9,0x03,0x00,0x38]
2330// CHECK: sturh    wzr, [x12, #255]           // encoding: [0x9f,0xf1,0x0f,0x78]
2331// CHECK: stur     w16, [x0, #-256]           // encoding: [0x10,0x00,0x10,0xb8]
2332// CHECK: stur     x28, [x14, #1]             // encoding: [0xdc,0x11,0x00,0xf8]
2333
2334        ldurb w1, [x20, #255]
2335        ldurh w20, [x1, #255]
2336        ldur w12, [sp, #255]
2337        ldur xzr, [x12, #255]
2338// CHECK: ldurb    w1, [x20, #255]            // encoding: [0x81,0xf2,0x4f,0x38]
2339// CHECK: ldurh    w20, [x1, #255]            // encoding: [0x34,0xf0,0x4f,0x78]
2340// CHECK: ldur     w12, [sp, #255]            // encoding: [0xec,0xf3,0x4f,0xb8]
2341// CHECK: ldur     xzr, [x12, #255]           // encoding: [0x9f,0xf1,0x4f,0xf8]
2342
2343        ldursb x9, [x7, #-256]
2344        ldursh x17, [x19, #-256]
2345        ldursw x20, [x15, #-256]
2346        ldursw x13, [x2]
2347        prfum pldl2keep, [sp, #-256]
2348        ldursb w19, [x1, #-256]
2349        ldursh w15, [x21, #-256]
2350// CHECK: ldursb   x9, [x7, #-256]            // encoding: [0xe9,0x00,0x90,0x38]
2351// CHECK: ldursh   x17, [x19, #-256]          // encoding: [0x71,0x02,0x90,0x78]
2352// CHECK: ldursw   x20, [x15, #-256]          // encoding: [0xf4,0x01,0x90,0xb8]
2353// CHECK: ldursw   x13, [x2]                  // encoding: [0x4d,0x00,0x80,0xb8]
2354// CHECK: prfum    pldl2keep, [sp, #-256]     // encoding: [0xe2,0x03,0x90,0xf8]
2355// CHECK: ldursb   w19, [x1, #-256]           // encoding: [0x33,0x00,0xd0,0x38]
2356// CHECK: ldursh   w15, [x21, #-256]          // encoding: [0xaf,0x02,0xd0,0x78]
2357
2358        stur b0, [sp, #1]
2359        stur h12, [x12, #-1]
2360        stur s15, [x0, #255]
2361        stur d31, [x5, #25]
2362        stur q9, [x5]
2363// CHECK: stur     b0, [sp, #1]               // encoding: [0xe0,0x13,0x00,0x3c]
2364// CHECK: stur     h12, [x12, #-1]            // encoding: [0x8c,0xf1,0x1f,0x7c]
2365// CHECK: stur     s15, [x0, #255]            // encoding: [0x0f,0xf0,0x0f,0xbc]
2366// CHECK: stur     d31, [x5, #25]             // encoding: [0xbf,0x90,0x01,0xfc]
2367// CHECK: stur     q9, [x5]                   // encoding: [0xa9,0x00,0x80,0x3c]
2368
2369        ldur b3, [sp]
2370        ldur h5, [x4, #-256]
2371        ldur s7, [x12, #-1]
2372        ldur d11, [x19, #4]
2373        ldur q13, [x1, #2]
2374// CHECK: ldur     b3, [sp]                   // encoding: [0xe3,0x03,0x40,0x3c]
2375// CHECK: ldur     h5, [x4, #-256]            // encoding: [0x85,0x00,0x50,0x7c]
2376// CHECK: ldur     s7, [x12, #-1]             // encoding: [0x87,0xf1,0x5f,0xbc]
2377// CHECK: ldur     d11, [x19, #4]             // encoding: [0x6b,0x42,0x40,0xfc]
2378// CHECK: ldur     q13, [x1, #2]              // encoding: [0x2d,0x20,0xc0,0x3c]
2379
2380//------------------------------------------------------------------------------
2381// Load/store (unsigned immediate)
2382//------------------------------------------------------------------------------
2383
2384//// Basic addressing mode limits: 8 byte access
2385        ldr x0, [x0]
2386        ldr x4, [x29, #0]
2387        ldr x30, [x12, #32760]
2388        ldr x20, [sp, #8]
2389// CHECK: ldr      x0, [x0]                   // encoding: [0x00,0x00,0x40,0xf9]
2390// CHECK: ldr      x4, [x29]                  // encoding: [0xa4,0x03,0x40,0xf9]
2391// CHECK: ldr      x30, [x12, #32760]         // encoding: [0x9e,0xfd,0x7f,0xf9]
2392// CHECK: ldr      x20, [sp, #8]              // encoding: [0xf4,0x07,0x40,0xf9]
2393
2394//// Rt treats 31 as zero-register
2395        ldr xzr, [sp]
2396// CHECK: ldr      xzr, [sp]                  // encoding: [0xff,0x03,0x40,0xf9]
2397
2398        //// 4-byte load, check still 64-bit address, limits
2399        ldr w2, [sp]
2400        ldr w17, [sp, #16380]
2401        ldr w13, [x2, #4]
2402// CHECK: ldr      w2, [sp]                   // encoding: [0xe2,0x03,0x40,0xb9]
2403// CHECK: ldr      w17, [sp, #16380]          // encoding: [0xf1,0xff,0x7f,0xb9]
2404// CHECK: ldr      w13, [x2, #4]              // encoding: [0x4d,0x04,0x40,0xb9]
2405
2406//// Signed 4-byte load. Limits.
2407        ldrsw x2, [x5,#4]
2408        ldrsw x23, [sp, #16380]
2409// CHECK: ldrsw    x2, [x5, #4]               // encoding: [0xa2,0x04,0x80,0xb9]
2410// CHECK: ldrsw    x23, [sp, #16380]          // encoding: [0xf7,0xff,0xbf,0xb9]
2411
2412////  2-byte loads
2413        ldrh w2, [x4]
2414        ldrsh w23, [x6, #8190]
2415        ldrsh wzr, [sp, #2]
2416        ldrsh x29, [x2, #2]
2417// CHECK: ldrh     w2, [x4]                   // encoding: [0x82,0x00,0x40,0x79]
2418// CHECK: ldrsh    w23, [x6, #8190]           // encoding: [0xd7,0xfc,0xff,0x79]
2419// CHECK: ldrsh    wzr, [sp, #2]              // encoding: [0xff,0x07,0xc0,0x79]
2420// CHECK: ldrsh    x29, [x2, #2]              // encoding: [0x5d,0x04,0x80,0x79]
2421
2422//// 1-byte loads
2423        ldrb w26, [x3, #121]
2424        ldrb w12, [x2, #0]
2425        ldrsb w27, [sp, #4095]
2426        ldrsb xzr, [x15]
2427// CHECK: ldrb     w26, [x3, #121]            // encoding: [0x7a,0xe4,0x41,0x39]
2428// CHECK: ldrb     w12, [x2]                  // encoding: [0x4c,0x00,0x40,0x39]
2429// CHECK: ldrsb    w27, [sp, #4095]           // encoding: [0xfb,0xff,0xff,0x39]
2430// CHECK: ldrsb    xzr, [x15]                 // encoding: [0xff,0x01,0x80,0x39]
2431
2432//// Stores
2433        str x30, [sp]
2434        str w20, [x4, #16380]
2435        strh w20, [x10, #14]
2436        strh w17, [sp, #8190]
2437        strb w23, [x3, #4095]
2438        strb wzr, [x2]
2439// CHECK: str      x30, [sp]                  // encoding: [0xfe,0x03,0x00,0xf9]
2440// CHECK: str      w20, [x4, #16380]          // encoding: [0x94,0xfc,0x3f,0xb9]
2441// CHECK: strh     w20, [x10, #14]            // encoding: [0x54,0x1d,0x00,0x79]
2442// CHECK: strh     w17, [sp, #8190]           // encoding: [0xf1,0xff,0x3f,0x79]
2443// CHECK: strb     w23, [x3, #4095]           // encoding: [0x77,0xfc,0x3f,0x39]
2444// CHECK: strb     wzr, [x2]                  // encoding: [0x5f,0x00,0x00,0x39]
2445
2446//// Relocations
2447        str x15, [x5, #:lo12:sym]
2448        ldrb w15, [x5, #:lo12:sym]
2449        ldrsh x15, [x5, #:lo12:sym]
2450        ldrsw x15, [x5, #:lo12:sym]
2451        ldr x15, [x5, #:lo12:sym]
2452        ldr q3, [x2, #:lo12:sym]
2453
2454// CHECK: str    x15, [x5, :lo12:sym]    // encoding: [0xaf,0bAAAAAA00,0b00AAAAAA,0xf9]
2455// CHECK:                                 //   fixup A - offset: 0, value: :lo12:sym, kind: fixup_aarch64_ldst_imm12_scale8
2456// CHECK: ldrb    w15, [x5, :lo12:sym]    // encoding: [0xaf,0bAAAAAA00,0b01AAAAAA,0x39]
2457// CHECK:                                 //   fixup A - offset: 0, value: :lo12:sym, kind: fixup_aarch64_ldst_imm12_scale1
2458// CHECK: ldrsh    x15, [x5, :lo12:sym]    // encoding: [0xaf,0bAAAAAA00,0b10AAAAAA,0x79]
2459// CHECK:                                 //   fixup A - offset: 0, value: :lo12:sym, kind: fixup_aarch64_ldst_imm12_scale2
2460// CHECK: ldrsw    x15, [x5, :lo12:sym]    // encoding: [0xaf,0bAAAAAA00,0b10AAAAAA,0xb9]
2461// CHECK:                                 //   fixup A - offset: 0, value: :lo12:sym, kind: fixup_aarch64_ldst_imm12_scale4
2462// CHECK: ldr    x15, [x5, :lo12:sym]    // encoding: [0xaf,0bAAAAAA00,0b01AAAAAA,0xf9]
2463// CHECK:                                 //   fixup A - offset: 0, value: :lo12:sym, kind: fixup_aarch64_ldst_imm12_scale8
2464// CHECK: ldr    q3, [x2, :lo12:sym]     // encoding: [0x43,0bAAAAAA00,0b11AAAAAA,0x3d]
2465// CHECK:                                 //   fixup A - offset: 0, value: :lo12:sym, kind: fixup_aarch64_ldst_imm12_scale16
2466
2467        prfm pldl1keep, [sp, #8]
2468        prfm pldl1strm, [x3]
2469        prfm pldl2keep, [x5,#16]
2470        prfm pldl2strm, [x2]
2471        prfm pldl3keep, [x5]
2472        prfm pldl3strm, [x6]
2473        prfm plil1keep, [sp, #8]
2474        prfm plil1strm, [x3]
2475        prfm plil2keep, [x5,#16]
2476        prfm plil2strm, [x2]
2477        prfm plil3keep, [x5]
2478        prfm plil3strm, [x6]
2479        prfm pstl1keep, [sp, #8]
2480        prfm pstl1strm, [x3]
2481        prfm pstl2keep, [x5,#16]
2482        prfm pstl2strm, [x2]
2483        prfm pstl3keep, [x5]
2484        prfm pstl3strm, [x6]
2485        prfm #15, [sp]
2486// CHECK: prfm    pldl1keep, [sp, #8]     // encoding: [0xe0,0x07,0x80,0xf9]
2487// CHECK: prfm    pldl1strm, [x3{{(, #0)?}}]     // encoding: [0x61,0x00,0x80,0xf9]
2488// CHECK: prfm    pldl2keep, [x5, #16]    // encoding: [0xa2,0x08,0x80,0xf9]
2489// CHECK: prfm    pldl2strm, [x2{{(, #0)?}}]     // encoding: [0x43,0x00,0x80,0xf9]
2490// CHECK: prfm    pldl3keep, [x5{{(, #0)?}}]     // encoding: [0xa4,0x00,0x80,0xf9]
2491// CHECK: prfm    pldl3strm, [x6{{(, #0)?}}]     // encoding: [0xc5,0x00,0x80,0xf9]
2492// CHECK: prfm    plil1keep, [sp, #8]     // encoding: [0xe8,0x07,0x80,0xf9]
2493// CHECK: prfm    plil1strm, [x3{{(, #0)?}}]     // encoding: [0x69,0x00,0x80,0xf9]
2494// CHECK: prfm    plil2keep, [x5, #16]    // encoding: [0xaa,0x08,0x80,0xf9]
2495// CHECK: prfm    plil2strm, [x2{{(, #0)?}}]     // encoding: [0x4b,0x00,0x80,0xf9]
2496// CHECK: prfm    plil3keep, [x5{{(, #0)?}}]     // encoding: [0xac,0x00,0x80,0xf9]
2497// CHECK: prfm    plil3strm, [x6{{(, #0)?}}]     // encoding: [0xcd,0x00,0x80,0xf9]
2498// CHECK: prfm    pstl1keep, [sp, #8]     // encoding: [0xf0,0x07,0x80,0xf9]
2499// CHECK: prfm    pstl1strm, [x3{{(, #0)?}}]     // encoding: [0x71,0x00,0x80,0xf9]
2500// CHECK: prfm    pstl2keep, [x5, #16]    // encoding: [0xb2,0x08,0x80,0xf9]
2501// CHECK: prfm    pstl2strm, [x2{{(, #0)?}}]     // encoding: [0x53,0x00,0x80,0xf9]
2502// CHECK: prfm    pstl3keep, [x5{{(, #0)?}}]     // encoding: [0xb4,0x00,0x80,0xf9]
2503// CHECK: prfm    pstl3strm, [x6{{(, #0)?}}]     // encoding: [0xd5,0x00,0x80,0xf9]
2504// CHECK: prfm    #15, [sp{{(, #0)?}}]           // encoding: [0xef,0x03,0x80,0xf9]
2505
2506//// Floating-point versions
2507
2508        ldr b31, [sp, #4095]
2509        ldr h20, [x2, #8190]
2510        ldr s10, [x19, #16380]
2511        ldr d3, [x10, #32760]
2512        str q12, [sp, #65520]
2513// CHECK: ldr      b31, [sp, #4095]           // encoding: [0xff,0xff,0x7f,0x3d]
2514// CHECK: ldr      h20, [x2, #8190]           // encoding: [0x54,0xfc,0x7f,0x7d]
2515// CHECK: ldr      s10, [x19, #16380]         // encoding: [0x6a,0xfe,0x7f,0xbd]
2516// CHECK: ldr      d3, [x10, #32760]          // encoding: [0x43,0xfd,0x7f,0xfd]
2517// CHECK: str      q12, [sp, #65520]          // encoding: [0xec,0xff,0xbf,0x3d]
2518
2519//------------------------------------------------------------------------------
2520// Load/store register (register offset)
2521//------------------------------------------------------------------------------
2522
2523        ldrb w3, [sp, x5]
2524        ldrb w9, [x27, x6, lsl #0]
2525        ldrsb w10, [x30, x7]
2526        ldrb w11, [x29, x3, sxtx]
2527        strb w12, [x28, xzr, sxtx #0]
2528        ldrb w14, [x26, w6, uxtw]
2529        ldrsb w15, [x25, w7, uxtw #0]
2530        ldrb w17, [x23, w9, sxtw]
2531        ldrsb x18, [x22, w10, sxtw #0]
2532// CHECK: ldrb     w3, [sp, x5]               // encoding: [0xe3,0x6b,0x65,0x38]
2533// CHECK: ldrb     w9, [x27, x6, lsl #0]      // encoding: [0x69,0x7b,0x66,0x38]
2534// CHECK: ldrsb    w10, [x30, x7]             // encoding: [0xca,0x6b,0xe7,0x38]
2535// CHECK: ldrb     w11, [x29, x3, sxtx]       // encoding: [0xab,0xeb,0x63,0x38]
2536// CHECK: strb     w12, [x28, xzr, sxtx #0]   // encoding: [0x8c,0xfb,0x3f,0x38]
2537// CHECK: ldrb     w14, [x26, w6, uxtw]       // encoding: [0x4e,0x4b,0x66,0x38]
2538// CHECK: ldrsb    w15, [x25, w7, uxtw #0]    // encoding: [0x2f,0x5b,0xe7,0x38]
2539// CHECK: ldrb     w17, [x23, w9, sxtw]       // encoding: [0xf1,0xca,0x69,0x38]
2540// CHECK: ldrsb    x18, [x22, w10, sxtw #0]   // encoding: [0xd2,0xda,0xaa,0x38]
2541
2542        ldrsh w3, [sp, x5]
2543        ldrsh w9, [x27, x6, lsl #0]
2544        ldrh w10, [x30, x7, lsl #1]
2545        strh w11, [x29, x3, sxtx]
2546        ldrh w12, [x28, xzr, sxtx #0]
2547        ldrsh x13, [x27, x5, sxtx #1]
2548        ldrh w14, [x26, w6, uxtw]
2549        ldrh w15, [x25, w7, uxtw #0]
2550        ldrsh w16, [x24, w8, uxtw #1]
2551        ldrh w17, [x23, w9, sxtw]
2552        ldrh w18, [x22, w10, sxtw #0]
2553        strh w19, [x21, wzr, sxtw #1]
2554// CHECK: ldrsh    w3, [sp, x5]               // encoding: [0xe3,0x6b,0xe5,0x78]
2555// CHECK: ldrsh    w9, [x27, x6]              // encoding: [0x69,0x6b,0xe6,0x78]
2556// CHECK: ldrh     w10, [x30, x7, lsl #1]     // encoding: [0xca,0x7b,0x67,0x78]
2557// CHECK: strh     w11, [x29, x3, sxtx]       // encoding: [0xab,0xeb,0x23,0x78]
2558// CHECK: ldrh     w12, [x28, xzr, sxtx]      // encoding: [0x8c,0xeb,0x7f,0x78]
2559// CHECK: ldrsh    x13, [x27, x5, sxtx #1]    // encoding: [0x6d,0xfb,0xa5,0x78]
2560// CHECK: ldrh     w14, [x26, w6, uxtw]       // encoding: [0x4e,0x4b,0x66,0x78]
2561// CHECK: ldrh     w15, [x25, w7, uxtw]       // encoding: [0x2f,0x4b,0x67,0x78]
2562// CHECK: ldrsh    w16, [x24, w8, uxtw #1]    // encoding: [0x10,0x5b,0xe8,0x78]
2563// CHECK: ldrh     w17, [x23, w9, sxtw]       // encoding: [0xf1,0xca,0x69,0x78]
2564// CHECK: ldrh     w18, [x22, w10, sxtw]      // encoding: [0xd2,0xca,0x6a,0x78]
2565// CHECK: strh     w19, [x21, wzr, sxtw #1]   // encoding: [0xb3,0xda,0x3f,0x78]
2566
2567        ldr w3, [sp, x5]
2568        ldr s9, [x27, x6, lsl #0]
2569        ldr w10, [x30, x7, lsl #2]
2570        ldr w11, [x29, x3, sxtx]
2571        str s12, [x28, xzr, sxtx #0]
2572        str w13, [x27, x5, sxtx #2]
2573        str w14, [x26, w6, uxtw]
2574        ldr w15, [x25, w7, uxtw #0]
2575        ldr w16, [x24, w8, uxtw #2]
2576        ldrsw x17, [x23, w9, sxtw]
2577        ldr w18, [x22, w10, sxtw #0]
2578        ldrsw x19, [x21, wzr, sxtw #2]
2579// CHECK: ldr      w3, [sp, x5]               // encoding: [0xe3,0x6b,0x65,0xb8]
2580// CHECK: ldr      s9, [x27, x6]              // encoding: [0x69,0x6b,0x66,0xbc]
2581// CHECK: ldr      w10, [x30, x7, lsl #2]     // encoding: [0xca,0x7b,0x67,0xb8]
2582// CHECK: ldr      w11, [x29, x3, sxtx]       // encoding: [0xab,0xeb,0x63,0xb8]
2583// CHECK: str      s12, [x28, xzr, sxtx]      // encoding: [0x8c,0xeb,0x3f,0xbc]
2584// CHECK: str      w13, [x27, x5, sxtx #2]    // encoding: [0x6d,0xfb,0x25,0xb8]
2585// CHECK: str      w14, [x26, w6, uxtw]       // encoding: [0x4e,0x4b,0x26,0xb8]
2586// CHECK: ldr      w15, [x25, w7, uxtw]       // encoding: [0x2f,0x4b,0x67,0xb8]
2587// CHECK: ldr      w16, [x24, w8, uxtw #2]    // encoding: [0x10,0x5b,0x68,0xb8]
2588// CHECK: ldrsw    x17, [x23, w9, sxtw]       // encoding: [0xf1,0xca,0xa9,0xb8]
2589// CHECK: ldr      w18, [x22, w10, sxtw]      // encoding: [0xd2,0xca,0x6a,0xb8]
2590// CHECK: ldrsw    x19, [x21, wzr, sxtw #2]   // encoding: [0xb3,0xda,0xbf,0xb8]
2591
2592        ldr x3, [sp, x5]
2593        str x9, [x27, x6, lsl #0]
2594        ldr d10, [x30, x7, lsl #3]
2595        str x11, [x29, x3, sxtx]
2596        ldr x12, [x28, xzr, sxtx #0]
2597        ldr x13, [x27, x5, sxtx #3]
2598        prfm pldl1keep, [x26, w6, uxtw]
2599        ldr x15, [x25, w7, uxtw #0]
2600        ldr x16, [x24, w8, uxtw #3]
2601        ldr x17, [x23, w9, sxtw]
2602        ldr x18, [x22, w10, sxtw #0]
2603        str d19, [x21, wzr, sxtw #3]
2604        prfm #6, [x0, x5]
2605// CHECK: ldr      x3, [sp, x5]               // encoding: [0xe3,0x6b,0x65,0xf8]
2606// CHECK: str      x9, [x27, x6]              // encoding: [0x69,0x6b,0x26,0xf8]
2607// CHECK: ldr      d10, [x30, x7, lsl #3]     // encoding: [0xca,0x7b,0x67,0xfc]
2608// CHECK: str      x11, [x29, x3, sxtx]       // encoding: [0xab,0xeb,0x23,0xf8]
2609// CHECK: ldr      x12, [x28, xzr, sxtx]      // encoding: [0x8c,0xeb,0x7f,0xf8]
2610// CHECK: ldr      x13, [x27, x5, sxtx #3]    // encoding: [0x6d,0xfb,0x65,0xf8]
2611// CHECK: prfm     pldl1keep, [x26, w6, uxtw] // encoding: [0x40,0x4b,0xa6,0xf8]
2612// CHECK: ldr      x15, [x25, w7, uxtw]       // encoding: [0x2f,0x4b,0x67,0xf8]
2613// CHECK: ldr      x16, [x24, w8, uxtw #3]    // encoding: [0x10,0x5b,0x68,0xf8]
2614// CHECK: ldr      x17, [x23, w9, sxtw]       // encoding: [0xf1,0xca,0x69,0xf8]
2615// CHECK: ldr      x18, [x22, w10, sxtw]      // encoding: [0xd2,0xca,0x6a,0xf8]
2616// CHECK: str      d19, [x21, wzr, sxtw #3]   // encoding: [0xb3,0xda,0x3f,0xfc]
2617// CHECK: prfm     #6, [x0, x5{{(, lsl #0)?}}]       // encoding: [0x06,0x68,0xa5,0xf8]
2618
2619        ldr q3, [sp, x5]
2620        ldr q9, [x27, x6, lsl #0]
2621        ldr q10, [x30, x7, lsl #4]
2622        str q11, [x29, x3, sxtx]
2623        str q12, [x28, xzr, sxtx #0]
2624        str q13, [x27, x5, sxtx #4]
2625        ldr q14, [x26, w6, uxtw]
2626        ldr q15, [x25, w7, uxtw #0]
2627        ldr q16, [x24, w8, uxtw #4]
2628        ldr q17, [x23, w9, sxtw]
2629        str q18, [x22, w10, sxtw #0]
2630        ldr q19, [x21, wzr, sxtw #4]
2631// CHECK: ldr      q3, [sp, x5]               // encoding: [0xe3,0x6b,0xe5,0x3c]
2632// CHECK: ldr      q9, [x27, x6]              // encoding: [0x69,0x6b,0xe6,0x3c]
2633// CHECK: ldr      q10, [x30, x7, lsl #4]     // encoding: [0xca,0x7b,0xe7,0x3c]
2634// CHECK: str      q11, [x29, x3, sxtx]       // encoding: [0xab,0xeb,0xa3,0x3c]
2635// CHECK: str      q12, [x28, xzr, sxtx]      // encoding: [0x8c,0xeb,0xbf,0x3c]
2636// CHECK: str      q13, [x27, x5, sxtx #4]    // encoding: [0x6d,0xfb,0xa5,0x3c]
2637// CHECK: ldr      q14, [x26, w6, uxtw]       // encoding: [0x4e,0x4b,0xe6,0x3c]
2638// CHECK: ldr      q15, [x25, w7, uxtw]       // encoding: [0x2f,0x4b,0xe7,0x3c]
2639// CHECK: ldr      q16, [x24, w8, uxtw #4]    // encoding: [0x10,0x5b,0xe8,0x3c]
2640// CHECK: ldr      q17, [x23, w9, sxtw]       // encoding: [0xf1,0xca,0xe9,0x3c]
2641// CHECK: str      q18, [x22, w10, sxtw]      // encoding: [0xd2,0xca,0xaa,0x3c]
2642// CHECK: ldr      q19, [x21, wzr, sxtw #4]   // encoding: [0xb3,0xda,0xff,0x3c]
2643
2644//------------------------------------------------------------------------------
2645// Load/store register (immediate post-indexed)
2646//------------------------------------------------------------------------------
2647
2648        strb w9, [x2], #255
2649        strb w10, [x3], #1
2650        strb w10, [x3], #-256
2651        strh w9, [x2], #255
2652        strh w9, [x2], #1
2653        strh w10, [x3], #-256
2654// CHECK: strb     w9, [x2], #255             // encoding: [0x49,0xf4,0x0f,0x38]
2655// CHECK: strb     w10, [x3], #1              // encoding: [0x6a,0x14,0x00,0x38]
2656// CHECK: strb     w10, [x3], #-256           // encoding: [0x6a,0x04,0x10,0x38]
2657// CHECK: strh     w9, [x2], #255             // encoding: [0x49,0xf4,0x0f,0x78]
2658// CHECK: strh     w9, [x2], #1               // encoding: [0x49,0x14,0x00,0x78]
2659// CHECK: strh     w10, [x3], #-256           // encoding: [0x6a,0x04,0x10,0x78]
2660
2661        str w19, [sp], #255
2662        str w20, [x30], #1
2663        str w21, [x12], #-256
2664        str xzr, [x9], #255
2665        str x2, [x3], #1
2666        str x19, [x12], #-256
2667// CHECK: str      w19, [sp], #255            // encoding: [0xf3,0xf7,0x0f,0xb8]
2668// CHECK: str      w20, [x30], #1             // encoding: [0xd4,0x17,0x00,0xb8]
2669// CHECK: str      w21, [x12], #-256          // encoding: [0x95,0x05,0x10,0xb8]
2670// CHECK: str      xzr, [x9], #255            // encoding: [0x3f,0xf5,0x0f,0xf8]
2671// CHECK: str      x2, [x3], #1               // encoding: [0x62,0x14,0x00,0xf8]
2672// CHECK: str      x19, [x12], #-256          // encoding: [0x93,0x05,0x10,0xf8]
2673
2674        ldrb w9, [x2], #255
2675        ldrb w10, [x3], #1
2676        ldrb w10, [x3], #-256
2677        ldrh w9, [x2], #255
2678        ldrh w9, [x2], #1
2679        ldrh w10, [x3], #-256
2680// CHECK: ldrb     w9, [x2], #255             // encoding: [0x49,0xf4,0x4f,0x38]
2681// CHECK: ldrb     w10, [x3], #1              // encoding: [0x6a,0x14,0x40,0x38]
2682// CHECK: ldrb     w10, [x3], #-256           // encoding: [0x6a,0x04,0x50,0x38]
2683// CHECK: ldrh     w9, [x2], #255             // encoding: [0x49,0xf4,0x4f,0x78]
2684// CHECK: ldrh     w9, [x2], #1               // encoding: [0x49,0x14,0x40,0x78]
2685// CHECK: ldrh     w10, [x3], #-256           // encoding: [0x6a,0x04,0x50,0x78]
2686
2687        ldr w19, [sp], #255
2688        ldr w20, [x30], #1
2689        ldr w21, [x12], #-256
2690        ldr xzr, [x9], #255
2691        ldr x2, [x3], #1
2692        ldr x19, [x12], #-256
2693// CHECK: ldr      w19, [sp], #255            // encoding: [0xf3,0xf7,0x4f,0xb8]
2694// CHECK: ldr      w20, [x30], #1             // encoding: [0xd4,0x17,0x40,0xb8]
2695// CHECK: ldr      w21, [x12], #-256          // encoding: [0x95,0x05,0x50,0xb8]
2696// CHECK: ldr      xzr, [x9], #255            // encoding: [0x3f,0xf5,0x4f,0xf8]
2697// CHECK: ldr      x2, [x3], #1               // encoding: [0x62,0x14,0x40,0xf8]
2698// CHECK: ldr      x19, [x12], #-256          // encoding: [0x93,0x05,0x50,0xf8]
2699
2700        ldrsb xzr, [x9], #255
2701        ldrsb x2, [x3], #1
2702        ldrsb x19, [x12], #-256
2703        ldrsh xzr, [x9], #255
2704        ldrsh x2, [x3], #1
2705        ldrsh x19, [x12], #-256
2706        ldrsw xzr, [x9], #255
2707        ldrsw x2, [x3], #1
2708        ldrsw x19, [x12], #-256
2709// CHECK: ldrsb    xzr, [x9], #255            // encoding: [0x3f,0xf5,0x8f,0x38]
2710// CHECK: ldrsb    x2, [x3], #1               // encoding: [0x62,0x14,0x80,0x38]
2711// CHECK: ldrsb    x19, [x12], #-256          // encoding: [0x93,0x05,0x90,0x38]
2712// CHECK: ldrsh    xzr, [x9], #255            // encoding: [0x3f,0xf5,0x8f,0x78]
2713// CHECK: ldrsh    x2, [x3], #1               // encoding: [0x62,0x14,0x80,0x78]
2714// CHECK: ldrsh    x19, [x12], #-256          // encoding: [0x93,0x05,0x90,0x78]
2715// CHECK: ldrsw    xzr, [x9], #255            // encoding: [0x3f,0xf5,0x8f,0xb8]
2716// CHECK: ldrsw    x2, [x3], #1               // encoding: [0x62,0x14,0x80,0xb8]
2717// CHECK: ldrsw    x19, [x12], #-256          // encoding: [0x93,0x05,0x90,0xb8]
2718
2719        ldrsb wzr, [x9], #255
2720        ldrsb w2, [x3], #1
2721        ldrsb w19, [x12], #-256
2722        ldrsh wzr, [x9], #255
2723        ldrsh w2, [x3], #1
2724        ldrsh w19, [x12], #-256
2725// CHECK: ldrsb    wzr, [x9], #255            // encoding: [0x3f,0xf5,0xcf,0x38]
2726// CHECK: ldrsb    w2, [x3], #1               // encoding: [0x62,0x14,0xc0,0x38]
2727// CHECK: ldrsb    w19, [x12], #-256          // encoding: [0x93,0x05,0xd0,0x38]
2728// CHECK: ldrsh    wzr, [x9], #255            // encoding: [0x3f,0xf5,0xcf,0x78]
2729// CHECK: ldrsh    w2, [x3], #1               // encoding: [0x62,0x14,0xc0,0x78]
2730// CHECK: ldrsh    w19, [x12], #-256          // encoding: [0x93,0x05,0xd0,0x78]
2731
2732        str b0, [x0], #255
2733        str b3, [x3], #1
2734        str b5, [sp], #-256
2735        str h10, [x10], #255
2736        str h13, [x23], #1
2737        str h15, [sp], #-256
2738        str s20, [x20], #255
2739        str s23, [x23], #1
2740        str s25, [x0], #-256
2741        str d20, [x20], #255
2742        str d23, [x23], #1
2743        str d25, [x0], #-256
2744// CHECK: str      b0, [x0], #255             // encoding: [0x00,0xf4,0x0f,0x3c]
2745// CHECK: str      b3, [x3], #1               // encoding: [0x63,0x14,0x00,0x3c]
2746// CHECK: str      b5, [sp], #-256            // encoding: [0xe5,0x07,0x10,0x3c]
2747// CHECK: str      h10, [x10], #255           // encoding: [0x4a,0xf5,0x0f,0x7c]
2748// CHECK: str      h13, [x23], #1             // encoding: [0xed,0x16,0x00,0x7c]
2749// CHECK: str      h15, [sp], #-256           // encoding: [0xef,0x07,0x10,0x7c]
2750// CHECK: str      s20, [x20], #255           // encoding: [0x94,0xf6,0x0f,0xbc]
2751// CHECK: str      s23, [x23], #1             // encoding: [0xf7,0x16,0x00,0xbc]
2752// CHECK: str      s25, [x0], #-256           // encoding: [0x19,0x04,0x10,0xbc]
2753// CHECK: str      d20, [x20], #255           // encoding: [0x94,0xf6,0x0f,0xfc]
2754// CHECK: str      d23, [x23], #1             // encoding: [0xf7,0x16,0x00,0xfc]
2755// CHECK: str      d25, [x0], #-256           // encoding: [0x19,0x04,0x10,0xfc]
2756
2757        ldr b0, [x0], #255
2758        ldr b3, [x3], #1
2759        ldr b5, [sp], #-256
2760        ldr h10, [x10], #255
2761        ldr h13, [x23], #1
2762        ldr h15, [sp], #-256
2763        ldr s20, [x20], #255
2764        ldr s23, [x23], #1
2765        ldr s25, [x0], #-256
2766        ldr d20, [x20], #255
2767        ldr d23, [x23], #1
2768        ldr d25, [x0], #-256
2769// CHECK: ldr      b0, [x0], #255             // encoding: [0x00,0xf4,0x4f,0x3c]
2770// CHECK: ldr      b3, [x3], #1               // encoding: [0x63,0x14,0x40,0x3c]
2771// CHECK: ldr      b5, [sp], #-256            // encoding: [0xe5,0x07,0x50,0x3c]
2772// CHECK: ldr      h10, [x10], #255           // encoding: [0x4a,0xf5,0x4f,0x7c]
2773// CHECK: ldr      h13, [x23], #1             // encoding: [0xed,0x16,0x40,0x7c]
2774// CHECK: ldr      h15, [sp], #-256           // encoding: [0xef,0x07,0x50,0x7c]
2775// CHECK: ldr      s20, [x20], #255           // encoding: [0x94,0xf6,0x4f,0xbc]
2776// CHECK: ldr      s23, [x23], #1             // encoding: [0xf7,0x16,0x40,0xbc]
2777// CHECK: ldr      s25, [x0], #-256           // encoding: [0x19,0x04,0x50,0xbc]
2778// CHECK: ldr      d20, [x20], #255           // encoding: [0x94,0xf6,0x4f,0xfc]
2779// CHECK: ldr      d23, [x23], #1             // encoding: [0xf7,0x16,0x40,0xfc]
2780// CHECK: ldr      d25, [x0], #-256           // encoding: [0x19,0x04,0x50,0xfc]
2781
2782        ldr q20, [x1], #255
2783        ldr q23, [x9], #1
2784        ldr q25, [x20], #-256
2785        str q10, [x1], #255
2786        str q22, [sp], #1
2787        str q21, [x20], #-256
2788// CHECK: ldr      q20, [x1], #255            // encoding: [0x34,0xf4,0xcf,0x3c]
2789// CHECK: ldr      q23, [x9], #1              // encoding: [0x37,0x15,0xc0,0x3c]
2790// CHECK: ldr      q25, [x20], #-256          // encoding: [0x99,0x06,0xd0,0x3c]
2791// CHECK: str      q10, [x1], #255            // encoding: [0x2a,0xf4,0x8f,0x3c]
2792// CHECK: str      q22, [sp], #1              // encoding: [0xf6,0x17,0x80,0x3c]
2793// CHECK: str      q21, [x20], #-256          // encoding: [0x95,0x06,0x90,0x3c]
2794
2795//------------------------------------------------------------------------------
2796// Load/store register (immediate pre-indexed)
2797//------------------------------------------------------------------------------
2798
2799        ldr x3, [x4, #0]!
2800        ldr xzr, [sp, #0]!
2801// CHECK: ldr      x3, [x4, #0]!              // encoding: [0x83,0x0c,0x40,0xf8]
2802// CHECK: ldr      xzr, [sp, #0]!              // encoding: [0xff,0x0f,0x40,0xf8]
2803
2804        strb w9, [x2, #255]!
2805        strb w10, [x3, #1]!
2806        strb w10, [x3, #-256]!
2807        strh w9, [x2, #255]!
2808        strh w9, [x2, #1]!
2809        strh w10, [x3, #-256]!
2810// CHECK: strb     w9, [x2, #255]!            // encoding: [0x49,0xfc,0x0f,0x38]
2811// CHECK: strb     w10, [x3, #1]!             // encoding: [0x6a,0x1c,0x00,0x38]
2812// CHECK: strb     w10, [x3, #-256]!          // encoding: [0x6a,0x0c,0x10,0x38]
2813// CHECK: strh     w9, [x2, #255]!            // encoding: [0x49,0xfc,0x0f,0x78]
2814// CHECK: strh     w9, [x2, #1]!              // encoding: [0x49,0x1c,0x00,0x78]
2815// CHECK: strh     w10, [x3, #-256]!          // encoding: [0x6a,0x0c,0x10,0x78]
2816
2817        str w19, [sp, #255]!
2818        str w20, [x30, #1]!
2819        str w21, [x12, #-256]!
2820        str xzr, [x9, #255]!
2821        str x2, [x3, #1]!
2822        str x19, [x12, #-256]!
2823// CHECK: str      w19, [sp, #255]!           // encoding: [0xf3,0xff,0x0f,0xb8]
2824// CHECK: str      w20, [x30, #1]!            // encoding: [0xd4,0x1f,0x00,0xb8]
2825// CHECK: str      w21, [x12, #-256]!         // encoding: [0x95,0x0d,0x10,0xb8]
2826// CHECK: str      xzr, [x9, #255]!           // encoding: [0x3f,0xfd,0x0f,0xf8]
2827// CHECK: str      x2, [x3, #1]!              // encoding: [0x62,0x1c,0x00,0xf8]
2828// CHECK: str      x19, [x12, #-256]!         // encoding: [0x93,0x0d,0x10,0xf8]
2829
2830        ldrb w9, [x2, #255]!
2831        ldrb w10, [x3, #1]!
2832        ldrb w10, [x3, #-256]!
2833        ldrh w9, [x2, #255]!
2834        ldrh w9, [x2, #1]!
2835        ldrh w10, [x3, #-256]!
2836// CHECK: ldrb     w9, [x2, #255]!            // encoding: [0x49,0xfc,0x4f,0x38]
2837// CHECK: ldrb     w10, [x3, #1]!             // encoding: [0x6a,0x1c,0x40,0x38]
2838// CHECK: ldrb     w10, [x3, #-256]!          // encoding: [0x6a,0x0c,0x50,0x38]
2839// CHECK: ldrh     w9, [x2, #255]!            // encoding: [0x49,0xfc,0x4f,0x78]
2840// CHECK: ldrh     w9, [x2, #1]!              // encoding: [0x49,0x1c,0x40,0x78]
2841// CHECK: ldrh     w10, [x3, #-256]!          // encoding: [0x6a,0x0c,0x50,0x78]
2842
2843        ldr w19, [sp, #255]!
2844        ldr w20, [x30, #1]!
2845        ldr w21, [x12, #-256]!
2846        ldr xzr, [x9, #255]!
2847        ldr x2, [x3, #1]!
2848        ldr x19, [x12, #-256]!
2849// CHECK: ldr      w19, [sp, #255]!           // encoding: [0xf3,0xff,0x4f,0xb8]
2850// CHECK: ldr      w20, [x30, #1]!            // encoding: [0xd4,0x1f,0x40,0xb8]
2851// CHECK: ldr      w21, [x12, #-256]!         // encoding: [0x95,0x0d,0x50,0xb8]
2852// CHECK: ldr      xzr, [x9, #255]!           // encoding: [0x3f,0xfd,0x4f,0xf8]
2853// CHECK: ldr      x2, [x3, #1]!              // encoding: [0x62,0x1c,0x40,0xf8]
2854// CHECK: ldr      x19, [x12, #-256]!         // encoding: [0x93,0x0d,0x50,0xf8]
2855
2856        ldrsb xzr, [x9, #255]!
2857        ldrsb x2, [x3, #1]!
2858        ldrsb x19, [x12, #-256]!
2859        ldrsh xzr, [x9, #255]!
2860        ldrsh x2, [x3, #1]!
2861        ldrsh x19, [x12, #-256]!
2862        ldrsw xzr, [x9, #255]!
2863        ldrsw x2, [x3, #1]!
2864        ldrsw x19, [x12, #-256]!
2865// CHECK: ldrsb    xzr, [x9, #255]!           // encoding: [0x3f,0xfd,0x8f,0x38]
2866// CHECK: ldrsb    x2, [x3, #1]!              // encoding: [0x62,0x1c,0x80,0x38]
2867// CHECK: ldrsb    x19, [x12, #-256]!         // encoding: [0x93,0x0d,0x90,0x38]
2868// CHECK: ldrsh    xzr, [x9, #255]!           // encoding: [0x3f,0xfd,0x8f,0x78]
2869// CHECK: ldrsh    x2, [x3, #1]!              // encoding: [0x62,0x1c,0x80,0x78]
2870// CHECK: ldrsh    x19, [x12, #-256]!         // encoding: [0x93,0x0d,0x90,0x78]
2871// CHECK: ldrsw    xzr, [x9, #255]!           // encoding: [0x3f,0xfd,0x8f,0xb8]
2872// CHECK: ldrsw    x2, [x3, #1]!              // encoding: [0x62,0x1c,0x80,0xb8]
2873// CHECK: ldrsw    x19, [x12, #-256]!         // encoding: [0x93,0x0d,0x90,0xb8]
2874
2875        ldrsb wzr, [x9, #255]!
2876        ldrsb w2, [x3, #1]!
2877        ldrsb w19, [x12, #-256]!
2878        ldrsh wzr, [x9, #255]!
2879        ldrsh w2, [x3, #1]!
2880        ldrsh w19, [x12, #-256]!
2881// CHECK: ldrsb    wzr, [x9, #255]!           // encoding: [0x3f,0xfd,0xcf,0x38]
2882// CHECK: ldrsb    w2, [x3, #1]!              // encoding: [0x62,0x1c,0xc0,0x38]
2883// CHECK: ldrsb    w19, [x12, #-256]!         // encoding: [0x93,0x0d,0xd0,0x38]
2884// CHECK: ldrsh    wzr, [x9, #255]!           // encoding: [0x3f,0xfd,0xcf,0x78]
2885// CHECK: ldrsh    w2, [x3, #1]!              // encoding: [0x62,0x1c,0xc0,0x78]
2886// CHECK: ldrsh    w19, [x12, #-256]!         // encoding: [0x93,0x0d,0xd0,0x78]
2887
2888        str b0, [x0, #255]!
2889        str b3, [x3, #1]!
2890        str b5, [sp, #-256]!
2891        str h10, [x10, #255]!
2892        str h13, [x23, #1]!
2893        str h15, [sp, #-256]!
2894        str s20, [x20, #255]!
2895        str s23, [x23, #1]!
2896        str s25, [x0, #-256]!
2897        str d20, [x20, #255]!
2898        str d23, [x23, #1]!
2899        str d25, [x0, #-256]!
2900// CHECK: str      b0, [x0, #255]!            // encoding: [0x00,0xfc,0x0f,0x3c]
2901// CHECK: str      b3, [x3, #1]!              // encoding: [0x63,0x1c,0x00,0x3c]
2902// CHECK: str      b5, [sp, #-256]!           // encoding: [0xe5,0x0f,0x10,0x3c]
2903// CHECK: str      h10, [x10, #255]!          // encoding: [0x4a,0xfd,0x0f,0x7c]
2904// CHECK: str      h13, [x23, #1]!            // encoding: [0xed,0x1e,0x00,0x7c]
2905// CHECK: str      h15, [sp, #-256]!          // encoding: [0xef,0x0f,0x10,0x7c]
2906// CHECK: str      s20, [x20, #255]!          // encoding: [0x94,0xfe,0x0f,0xbc]
2907// CHECK: str      s23, [x23, #1]!            // encoding: [0xf7,0x1e,0x00,0xbc]
2908// CHECK: str      s25, [x0, #-256]!          // encoding: [0x19,0x0c,0x10,0xbc]
2909// CHECK: str      d20, [x20, #255]!          // encoding: [0x94,0xfe,0x0f,0xfc]
2910// CHECK: str      d23, [x23, #1]!            // encoding: [0xf7,0x1e,0x00,0xfc]
2911// CHECK: str      d25, [x0, #-256]!          // encoding: [0x19,0x0c,0x10,0xfc]
2912
2913        ldr b0, [x0, #255]!
2914        ldr b3, [x3, #1]!
2915        ldr b5, [sp, #-256]!
2916        ldr h10, [x10, #255]!
2917        ldr h13, [x23, #1]!
2918        ldr h15, [sp, #-256]!
2919        ldr s20, [x20, #255]!
2920        ldr s23, [x23, #1]!
2921        ldr s25, [x0, #-256]!
2922        ldr d20, [x20, #255]!
2923        ldr d23, [x23, #1]!
2924        ldr d25, [x0, #-256]!
2925// CHECK: ldr      b0, [x0, #255]!            // encoding: [0x00,0xfc,0x4f,0x3c]
2926// CHECK: ldr      b3, [x3, #1]!              // encoding: [0x63,0x1c,0x40,0x3c]
2927// CHECK: ldr      b5, [sp, #-256]!           // encoding: [0xe5,0x0f,0x50,0x3c]
2928// CHECK: ldr      h10, [x10, #255]!          // encoding: [0x4a,0xfd,0x4f,0x7c]
2929// CHECK: ldr      h13, [x23, #1]!            // encoding: [0xed,0x1e,0x40,0x7c]
2930// CHECK: ldr      h15, [sp, #-256]!          // encoding: [0xef,0x0f,0x50,0x7c]
2931// CHECK: ldr      s20, [x20, #255]!          // encoding: [0x94,0xfe,0x4f,0xbc]
2932// CHECK: ldr      s23, [x23, #1]!            // encoding: [0xf7,0x1e,0x40,0xbc]
2933// CHECK: ldr      s25, [x0, #-256]!          // encoding: [0x19,0x0c,0x50,0xbc]
2934// CHECK: ldr      d20, [x20, #255]!          // encoding: [0x94,0xfe,0x4f,0xfc]
2935// CHECK: ldr      d23, [x23, #1]!            // encoding: [0xf7,0x1e,0x40,0xfc]
2936// CHECK: ldr      d25, [x0, #-256]!          // encoding: [0x19,0x0c,0x50,0xfc]
2937
2938        ldr q20, [x1, #255]!
2939        ldr q23, [x9, #1]!
2940        ldr q25, [x20, #-256]!
2941        str q10, [x1, #255]!
2942        str q22, [sp, #1]!
2943        str q21, [x20, #-256]!
2944// CHECK: ldr      q20, [x1, #255]!           // encoding: [0x34,0xfc,0xcf,0x3c]
2945// CHECK: ldr      q23, [x9, #1]!             // encoding: [0x37,0x1d,0xc0,0x3c]
2946// CHECK: ldr      q25, [x20, #-256]!         // encoding: [0x99,0x0e,0xd0,0x3c]
2947// CHECK: str      q10, [x1, #255]!           // encoding: [0x2a,0xfc,0x8f,0x3c]
2948// CHECK: str      q22, [sp, #1]!             // encoding: [0xf6,0x1f,0x80,0x3c]
2949// CHECK: str      q21, [x20, #-256]!         // encoding: [0x95,0x0e,0x90,0x3c]
2950
2951//------------------------------------------------------------------------------
2952// Load/store (unprivileged)
2953//------------------------------------------------------------------------------
2954
2955        sttrb w9, [sp, #0]
2956        sttrh wzr, [x12, #255]
2957        sttr w16, [x0, #-256]
2958        sttr x28, [x14, #1]
2959// CHECK: sttrb    w9, [sp]                   // encoding: [0xe9,0x0b,0x00,0x38]
2960// CHECK: sttrh    wzr, [x12, #255]           // encoding: [0x9f,0xf9,0x0f,0x78]
2961// CHECK: sttr     w16, [x0, #-256]           // encoding: [0x10,0x08,0x10,0xb8]
2962// CHECK: sttr     x28, [x14, #1]             // encoding: [0xdc,0x19,0x00,0xf8]
2963
2964        ldtrb w1, [x20, #255]
2965        ldtrh w20, [x1, #255]
2966        ldtr w12, [sp, #255]
2967        ldtr xzr, [x12, #255]
2968// CHECK: ldtrb    w1, [x20, #255]            // encoding: [0x81,0xfa,0x4f,0x38]
2969// CHECK: ldtrh    w20, [x1, #255]            // encoding: [0x34,0xf8,0x4f,0x78]
2970// CHECK: ldtr     w12, [sp, #255]            // encoding: [0xec,0xfb,0x4f,0xb8]
2971// CHECK: ldtr     xzr, [x12, #255]           // encoding: [0x9f,0xf9,0x4f,0xf8]
2972
2973        ldtrsb x9, [x7, #-256]
2974        ldtrsh x17, [x19, #-256]
2975        ldtrsw x20, [x15, #-256]
2976        ldtrsb w19, [x1, #-256]
2977        ldtrsh w15, [x21, #-256]
2978// CHECK: ldtrsb   x9, [x7, #-256]            // encoding: [0xe9,0x08,0x90,0x38]
2979// CHECK: ldtrsh   x17, [x19, #-256]          // encoding: [0x71,0x0a,0x90,0x78]
2980// CHECK: ldtrsw   x20, [x15, #-256]          // encoding: [0xf4,0x09,0x90,0xb8]
2981// CHECK: ldtrsb   w19, [x1, #-256]           // encoding: [0x33,0x08,0xd0,0x38]
2982// CHECK: ldtrsh   w15, [x21, #-256]          // encoding: [0xaf,0x0a,0xd0,0x78]
2983
2984//------------------------------------------------------------------------------
2985// Load/store register pair (offset)
2986//------------------------------------------------------------------------------
2987
2988        ldp w3, w5, [sp]
2989        stp wzr, w9, [sp, #252]
2990        ldp w2, wzr, [sp, #-256]
2991        ldp w9, w10, [sp, #4]
2992// CHECK: ldp      w3, w5, [sp]               // encoding: [0xe3,0x17,0x40,0x29]
2993// CHECK: stp      wzr, w9, [sp, #252]        // encoding: [0xff,0xa7,0x1f,0x29]
2994// CHECK: ldp      w2, wzr, [sp, #-256]       // encoding: [0xe2,0x7f,0x60,0x29]
2995// CHECK: ldp      w9, w10, [sp, #4]          // encoding: [0xe9,0xab,0x40,0x29]
2996
2997        ldpsw x9, x10, [sp, #4]
2998        ldpsw x9, x10, [x2, #-256]
2999        ldpsw x20, x30, [sp, #252]
3000// CHECK: ldpsw    x9, x10, [sp, #4]          // encoding: [0xe9,0xab,0x40,0x69]
3001// CHECK: ldpsw    x9, x10, [x2, #-256]       // encoding: [0x49,0x28,0x60,0x69]
3002// CHECK: ldpsw    x20, x30, [sp, #252]       // encoding: [0xf4,0xfb,0x5f,0x69]
3003
3004        ldp x21, x29, [x2, #504]
3005        ldp x22, x23, [x3, #-512]
3006        ldp x24, x25, [x4, #8]
3007// CHECK: ldp      x21, x29, [x2, #504]       // encoding: [0x55,0xf4,0x5f,0xa9]
3008// CHECK: ldp      x22, x23, [x3, #-512]      // encoding: [0x76,0x5c,0x60,0xa9]
3009// CHECK: ldp      x24, x25, [x4, #8]         // encoding: [0x98,0xe4,0x40,0xa9]
3010
3011        ldp s29, s28, [sp, #252]
3012        stp s27, s26, [sp, #-256]
3013        ldp s1, s2, [x3, #44]
3014// CHECK: ldp      s29, s28, [sp, #252]       // encoding: [0xfd,0xf3,0x5f,0x2d]
3015// CHECK: stp      s27, s26, [sp, #-256]      // encoding: [0xfb,0x6b,0x20,0x2d]
3016// CHECK: ldp      s1, s2, [x3, #44]          // encoding: [0x61,0x88,0x45,0x2d]
3017
3018        stp d3, d5, [x9, #504]
3019        stp d7, d11, [x10, #-512]
3020        ldp d2, d3, [x30, #-8]
3021// CHECK: stp      d3, d5, [x9, #504]         // encoding: [0x23,0x95,0x1f,0x6d]
3022// CHECK: stp      d7, d11, [x10, #-512]      // encoding: [0x47,0x2d,0x20,0x6d]
3023// CHECK: ldp      d2, d3, [x30, #-8]         // encoding: [0xc2,0x8f,0x7f,0x6d]
3024
3025        stp q3, q5, [sp]
3026        stp q17, q19, [sp, #1008]
3027        ldp q23, q29, [x1, #-1024]
3028// CHECK: stp      q3, q5, [sp]               // encoding: [0xe3,0x17,0x00,0xad]
3029// CHECK: stp      q17, q19, [sp, #1008]      // encoding: [0xf1,0xcf,0x1f,0xad]
3030// CHECK: ldp      q23, q29, [x1, #-1024]     // encoding: [0x37,0x74,0x60,0xad]
3031
3032//------------------------------------------------------------------------------
3033// Load/store register pair (post-indexed)
3034//------------------------------------------------------------------------------
3035
3036        ldp w3, w5, [sp], #0
3037        stp wzr, w9, [sp], #252
3038        ldp w2, wzr, [sp], #-256
3039        ldp w9, w10, [sp], #4
3040// CHECK: ldp      w3, w5, [sp], #0           // encoding: [0xe3,0x17,0xc0,0x28]
3041// CHECK: stp      wzr, w9, [sp], #252        // encoding: [0xff,0xa7,0x9f,0x28]
3042// CHECK: ldp      w2, wzr, [sp], #-256       // encoding: [0xe2,0x7f,0xe0,0x28]
3043// CHECK: ldp      w9, w10, [sp], #4          // encoding: [0xe9,0xab,0xc0,0x28]
3044
3045        ldpsw x9, x10, [sp], #4
3046        ldpsw x9, x10, [x2], #-256
3047        ldpsw x20, x30, [sp], #252
3048// CHECK: ldpsw    x9, x10, [sp], #4          // encoding: [0xe9,0xab,0xc0,0x68]
3049// CHECK: ldpsw    x9, x10, [x2], #-256       // encoding: [0x49,0x28,0xe0,0x68]
3050// CHECK: ldpsw    x20, x30, [sp], #252       // encoding: [0xf4,0xfb,0xdf,0x68]
3051
3052        ldp x21, x29, [x2], #504
3053        ldp x22, x23, [x3], #-512
3054        ldp x24, x25, [x4], #8
3055// CHECK: ldp      x21, x29, [x2], #504       // encoding: [0x55,0xf4,0xdf,0xa8]
3056// CHECK: ldp      x22, x23, [x3], #-512      // encoding: [0x76,0x5c,0xe0,0xa8]
3057// CHECK: ldp      x24, x25, [x4], #8         // encoding: [0x98,0xe4,0xc0,0xa8]
3058
3059        ldp s29, s28, [sp], #252
3060        stp s27, s26, [sp], #-256
3061        ldp s1, s2, [x3], #44
3062// CHECK: ldp      s29, s28, [sp], #252       // encoding: [0xfd,0xf3,0xdf,0x2c]
3063// CHECK: stp      s27, s26, [sp], #-256      // encoding: [0xfb,0x6b,0xa0,0x2c]
3064// CHECK: ldp      s1, s2, [x3], #44          // encoding: [0x61,0x88,0xc5,0x2c]
3065
3066        stp d3, d5, [x9], #504
3067        stp d7, d11, [x10], #-512
3068        ldp d2, d3, [x30], #-8
3069// CHECK: stp      d3, d5, [x9], #504         // encoding: [0x23,0x95,0x9f,0x6c]
3070// CHECK: stp      d7, d11, [x10], #-512      // encoding: [0x47,0x2d,0xa0,0x6c]
3071// CHECK: ldp      d2, d3, [x30], #-8         // encoding: [0xc2,0x8f,0xff,0x6c]
3072
3073        stp q3, q5, [sp], #0
3074        stp q17, q19, [sp], #1008
3075        ldp q23, q29, [x1], #-1024
3076// CHECK: stp      q3, q5, [sp], #0           // encoding: [0xe3,0x17,0x80,0xac]
3077// CHECK: stp      q17, q19, [sp], #1008      // encoding: [0xf1,0xcf,0x9f,0xac]
3078// CHECK: ldp      q23, q29, [x1], #-1024     // encoding: [0x37,0x74,0xe0,0xac]
3079
3080//------------------------------------------------------------------------------
3081// Load/store register pair (pre-indexed)
3082//------------------------------------------------------------------------------
3083        ldp w3, w5, [sp, #0]!
3084        stp wzr, w9, [sp, #252]!
3085        ldp w2, wzr, [sp, #-256]!
3086        ldp w9, w10, [sp, #4]!
3087// CHECK: ldp      w3, w5, [sp, #0]!          // encoding: [0xe3,0x17,0xc0,0x29]
3088// CHECK: stp      wzr, w9, [sp, #252]!       // encoding: [0xff,0xa7,0x9f,0x29]
3089// CHECK: ldp      w2, wzr, [sp, #-256]!      // encoding: [0xe2,0x7f,0xe0,0x29]
3090// CHECK: ldp      w9, w10, [sp, #4]!         // encoding: [0xe9,0xab,0xc0,0x29]
3091
3092        ldpsw x9, x10, [sp, #4]!
3093        ldpsw x9, x10, [x2, #-256]!
3094        ldpsw x20, x30, [sp, #252]!
3095// CHECK: ldpsw    x9, x10, [sp, #4]!         // encoding: [0xe9,0xab,0xc0,0x69]
3096// CHECK: ldpsw    x9, x10, [x2, #-256]!      // encoding: [0x49,0x28,0xe0,0x69]
3097// CHECK: ldpsw    x20, x30, [sp, #252]!      // encoding: [0xf4,0xfb,0xdf,0x69]
3098
3099        ldp x21, x29, [x2, #504]!
3100        ldp x22, x23, [x3, #-512]!
3101        ldp x24, x25, [x4, #8]!
3102// CHECK: ldp      x21, x29, [x2, #504]!      // encoding: [0x55,0xf4,0xdf,0xa9]
3103// CHECK: ldp      x22, x23, [x3, #-512]!     // encoding: [0x76,0x5c,0xe0,0xa9]
3104// CHECK: ldp      x24, x25, [x4, #8]!        // encoding: [0x98,0xe4,0xc0,0xa9]
3105
3106        ldp s29, s28, [sp, #252]!
3107        stp s27, s26, [sp, #-256]!
3108        ldp s1, s2, [x3, #44]!
3109// CHECK: ldp      s29, s28, [sp, #252]!      // encoding: [0xfd,0xf3,0xdf,0x2d]
3110// CHECK: stp      s27, s26, [sp, #-256]!     // encoding: [0xfb,0x6b,0xa0,0x2d]
3111// CHECK: ldp      s1, s2, [x3, #44]!         // encoding: [0x61,0x88,0xc5,0x2d]
3112
3113        stp d3, d5, [x9, #504]!
3114        stp d7, d11, [x10, #-512]!
3115        ldp d2, d3, [x30, #-8]!
3116// CHECK: stp      d3, d5, [x9, #504]!        // encoding: [0x23,0x95,0x9f,0x6d]
3117// CHECK: stp      d7, d11, [x10, #-512]!     // encoding: [0x47,0x2d,0xa0,0x6d]
3118// CHECK: ldp      d2, d3, [x30, #-8]!        // encoding: [0xc2,0x8f,0xff,0x6d]
3119
3120        stp q3, q5, [sp, #0]!
3121        stp q17, q19, [sp, #1008]!
3122        ldp q23, q29, [x1, #-1024]!
3123// CHECK: stp      q3, q5, [sp, #0]!          // encoding: [0xe3,0x17,0x80,0xad]
3124// CHECK: stp      q17, q19, [sp, #1008]!     // encoding: [0xf1,0xcf,0x9f,0xad]
3125// CHECK: ldp      q23, q29, [x1, #-1024]!    // encoding: [0x37,0x74,0xe0,0xad]
3126
3127//------------------------------------------------------------------------------
3128// Load/store non-temporal register pair (offset)
3129//------------------------------------------------------------------------------
3130
3131        ldnp w3, w5, [sp]
3132        stnp wzr, w9, [sp, #252]
3133        ldnp w2, wzr, [sp, #-256]
3134        ldnp w9, w10, [sp, #4]
3135// CHECK: ldnp      w3, w5, [sp]               // encoding: [0xe3,0x17,0x40,0x28]
3136// CHECK: stnp      wzr, w9, [sp, #252]        // encoding: [0xff,0xa7,0x1f,0x28]
3137// CHECK: ldnp      w2, wzr, [sp, #-256]       // encoding: [0xe2,0x7f,0x60,0x28]
3138// CHECK: ldnp      w9, w10, [sp, #4]          // encoding: [0xe9,0xab,0x40,0x28]
3139
3140        ldnp x21, x29, [x2, #504]
3141        ldnp x22, x23, [x3, #-512]
3142        ldnp x24, x25, [x4, #8]
3143// CHECK: ldnp      x21, x29, [x2, #504]       // encoding: [0x55,0xf4,0x5f,0xa8]
3144// CHECK: ldnp      x22, x23, [x3, #-512]      // encoding: [0x76,0x5c,0x60,0xa8]
3145// CHECK: ldnp      x24, x25, [x4, #8]         // encoding: [0x98,0xe4,0x40,0xa8]
3146
3147        ldnp s29, s28, [sp, #252]
3148        stnp s27, s26, [sp, #-256]
3149        ldnp s1, s2, [x3, #44]
3150// CHECK: ldnp      s29, s28, [sp, #252]       // encoding: [0xfd,0xf3,0x5f,0x2c]
3151// CHECK: stnp      s27, s26, [sp, #-256]      // encoding: [0xfb,0x6b,0x20,0x2c]
3152// CHECK: ldnp      s1, s2, [x3, #44]          // encoding: [0x61,0x88,0x45,0x2c]
3153
3154        stnp d3, d5, [x9, #504]
3155        stnp d7, d11, [x10, #-512]
3156        ldnp d2, d3, [x30, #-8]
3157// CHECK: stnp      d3, d5, [x9, #504]         // encoding: [0x23,0x95,0x1f,0x6c]
3158// CHECK: stnp      d7, d11, [x10, #-512]      // encoding: [0x47,0x2d,0x20,0x6c]
3159// CHECK: ldnp      d2, d3, [x30, #-8]         // encoding: [0xc2,0x8f,0x7f,0x6c]
3160
3161        stnp q3, q5, [sp]
3162        stnp q17, q19, [sp, #1008]
3163        ldnp q23, q29, [x1, #-1024]
3164// CHECK: stnp      q3, q5, [sp]               // encoding: [0xe3,0x17,0x00,0xac]
3165// CHECK: stnp      q17, q19, [sp, #1008]      // encoding: [0xf1,0xcf,0x1f,0xac]
3166// CHECK: ldnp      q23, q29, [x1, #-1024]     // encoding: [0x37,0x74,0x60,0xac]
3167
3168//------------------------------------------------------------------------------
3169// Logical (immediate)
3170//------------------------------------------------------------------------------
3171        // 32 bit replication-width
3172        orr w3, w9, #0xffff0000
3173        orr wsp, w10, #0xe00000ff
3174        orr w9, w10, #0x000003ff
3175// CHECK: orr      w3, w9, #0xffff0000        // encoding: [0x23,0x3d,0x10,0x32]
3176// CHECK: orr      wsp, w10, #0xe00000ff      // encoding: [0x5f,0x29,0x03,0x32]
3177// CHECK: orr      w9, w10, #0x3ff            // encoding: [0x49,0x25,0x00,0x32]
3178
3179        // 16 bit replication width
3180        and w14, w15, #0x80008000
3181        and w12, w13, #0xffc3ffc3
3182        and w11, wzr, #0x00030003
3183// CHECK: and      w14, w15, #0x80008000      // encoding: [0xee,0x81,0x01,0x12]
3184// CHECK: and      w12, w13, #0xffc3ffc3      // encoding: [0xac,0xad,0x0a,0x12]
3185// CHECK: and      w11, wzr, #0x30003         // encoding: [0xeb,0x87,0x00,0x12]
3186
3187        // 8 bit replication width
3188        eor w3, w6, #0xe0e0e0e0
3189        eor wsp, wzr, #0x03030303
3190        eor w16, w17, #0x81818181
3191// CHECK: eor      w3, w6, #0xe0e0e0e0        // encoding: [0xc3,0xc8,0x03,0x52]
3192// CHECK: eor      wsp, wzr, #0x3030303       // encoding: [0xff,0xc7,0x00,0x52]
3193// CHECK: eor      w16, w17, #0x81818181      // encoding: [0x30,0xc6,0x01,0x52]
3194
3195        // 4 bit replication width
3196        ands wzr, w18, #0xcccccccc
3197        ands w19, w20, #0x33333333
3198        ands w21, w22, #0x99999999
3199// CHECK: {{ands wzr,|tst}} w18, #0xcccccccc      // encoding: [0x5f,0xe6,0x02,0x72]
3200// CHECK: ands     w19, w20, #0x33333333      // encoding: [0x93,0xe6,0x00,0x72]
3201// CHECK: ands     w21, w22, #0x99999999      // encoding: [0xd5,0xe6,0x01,0x72]
3202
3203        // 2 bit replication width
3204        tst w3, #0xaaaaaaaa
3205        tst wzr, #0x55555555
3206// CHECK: {{ands wzr,|tst}} w3, #0xaaaaaaaa       // encoding: [0x7f,0xf0,0x01,0x72]
3207// CHECK: {{ands wzr,|tst}} wzr, #0x55555555      // encoding: [0xff,0xf3,0x00,0x72]
3208
3209        // 64 bit replication-width
3210        eor x3, x5, #0xffffffffc000000
3211        and x9, x10, #0x00007fffffffffff
3212        orr x11, x12, #0x8000000000000fff
3213// CHECK: eor      x3, x5, #0xffffffffc000000 // encoding: [0xa3,0x84,0x66,0xd2]
3214// CHECK: and      x9, x10, #0x7fffffffffff   // encoding: [0x49,0xb9,0x40,0x92]
3215// CHECK: orr      x11, x12, #0x8000000000000fff // encoding: [0x8b,0x31,0x41,0xb2]
3216
3217        // 32 bit replication-width
3218        orr x3, x9, #0xffff0000ffff0000
3219        orr sp, x10, #0xe00000ffe00000ff
3220        orr x9, x10, #0x000003ff000003ff
3221// CHECK: orr      x3, x9, #0xffff0000ffff0000 // encoding: [0x23,0x3d,0x10,0xb2]
3222// CHECK: orr      sp, x10, #0xe00000ffe00000ff // encoding: [0x5f,0x29,0x03,0xb2]
3223// CHECK: orr      x9, x10, #0x3ff000003ff    // encoding: [0x49,0x25,0x00,0xb2]
3224
3225        // 16 bit replication-width
3226        and x14, x15, #0x8000800080008000
3227        and x12, x13, #0xffc3ffc3ffc3ffc3
3228        and x11, xzr, #0x0003000300030003
3229// CHECK: and      x14, x15, #0x8000800080008000 // encoding: [0xee,0x81,0x01,0x92]
3230// CHECK: and      x12, x13, #0xffc3ffc3ffc3ffc3 // encoding: [0xac,0xad,0x0a,0x92]
3231// CHECK: and      x11, xzr, #0x3000300030003 // encoding: [0xeb,0x87,0x00,0x92]
3232
3233        // 8 bit replication-width
3234        eor x3, x6, #0xe0e0e0e0e0e0e0e0
3235        eor sp, xzr, #0x0303030303030303
3236        eor x16, x17, #0x8181818181818181
3237// CHECK: eor      x3, x6, #0xe0e0e0e0e0e0e0e0 // encoding: [0xc3,0xc8,0x03,0xd2]
3238// CHECK: eor      sp, xzr, #0x303030303030303 // encoding: [0xff,0xc7,0x00,0xd2]
3239// CHECK: eor      x16, x17, #0x8181818181818181 // encoding: [0x30,0xc6,0x01,0xd2]
3240
3241        // 4 bit replication-width
3242        ands xzr, x18, #0xcccccccccccccccc
3243        ands x19, x20, #0x3333333333333333
3244        ands x21, x22, #0x9999999999999999
3245// CHECK: {{ands xzr,|tst}} x18, #0xcccccccccccccccc // encoding: [0x5f,0xe6,0x02,0xf2]
3246// CHECK: ands     x19, x20, #0x3333333333333333 // encoding: [0x93,0xe6,0x00,0xf2]
3247// CHECK: ands     x21, x22, #0x9999999999999999 // encoding: [0xd5,0xe6,0x01,0xf2]
3248
3249        // 2 bit replication-width
3250        tst x3, #0xaaaaaaaaaaaaaaaa
3251        tst xzr, #0x5555555555555555
3252// CHECK: {{ands xzr,|tst}} x3, #0xaaaaaaaaaaaaaaaa    // encoding: [0x7f,0xf0,0x01,0xf2]
3253// CHECK: {{ands xzr,|tst}} xzr, #0x5555555555555555   // encoding: [0xff,0xf3,0x00,0xf2]
3254
3255        mov w3, #0xf000f
3256        mov x10, #0xaaaaaaaaaaaaaaaa
3257// CHECK: orr      w3, wzr, #0xf000f          // encoding: [0xe3,0x8f,0x00,0x32]
3258// CHECK: orr x10, xzr, #0xaaaaaaaaaaaaaaaa // encoding: [0xea,0xf3,0x01,0xb2]
3259
3260        // The Imm field of logicalImm operations has to be truncated to the
3261        // register width, i.e. 32 bits
3262        and w2, w3, #-3
3263        orr w0, w1, #~2
3264        eor w16, w17, #-7
3265        ands w19, w20, #~15
3266// CHECK: and	w2, w3, #0xfffffffd     // encoding: [0x62,0x78,0x1e,0x12]
3267// CHECK: orr	w0, w1, #0xfffffffd     // encoding: [0x20,0x78,0x1e,0x32]
3268// CHECK: eor	w16, w17, #0xfffffff9   // encoding: [0x30,0x76,0x1d,0x52]
3269// CHECK: ands	w19, w20, #0xfffffff0   // encoding: [0x93,0x6e,0x1c,0x72]
3270
3271//------------------------------------------------------------------------------
3272// Logical (shifted register)
3273//------------------------------------------------------------------------------
3274
3275        and w12, w23, w21
3276        and w16, w15, w1, lsl #1
3277        and w9, w4, w10, lsl #31
3278        and w3, w30, w11, lsl #0
3279        and x3, x5, x7, lsl #63
3280// CHECK: and      w12, w23, w21              // encoding: [0xec,0x02,0x15,0x0a]
3281// CHECK: and      w16, w15, w1, lsl #1       // encoding: [0xf0,0x05,0x01,0x0a]
3282// CHECK: and      w9, w4, w10, lsl #31       // encoding: [0x89,0x7c,0x0a,0x0a]
3283// CHECK: and      w3, w30, w11               // encoding: [0xc3,0x03,0x0b,0x0a]
3284// CHECK: and      x3, x5, x7, lsl #63        // encoding: [0xa3,0xfc,0x07,0x8a]
3285
3286        and x5, x14, x19, asr #4
3287        and w3, w17, w19, ror #31
3288        and w0, w2, wzr, lsr #17
3289        and w3, w30, w11, asr #0
3290// CHECK: and      x5, x14, x19, asr #4       // encoding: [0xc5,0x11,0x93,0x8a]
3291// CHECK: and      w3, w17, w19, ror #31      // encoding: [0x23,0x7e,0xd3,0x0a]
3292// CHECK: and      w0, w2, wzr, lsr #17       // encoding: [0x40,0x44,0x5f,0x0a]
3293// CHECK: and      w3, w30, w11, asr #0       // encoding: [0xc3,0x03,0x8b,0x0a]
3294
3295        and xzr, x4, x26, lsl #0
3296        and w3, wzr, w20, ror #0
3297        and x7, x20, xzr, asr #63
3298// CHECK: and      xzr, x4, x26               // encoding: [0x9f,0x00,0x1a,0x8a]
3299// CHECK: and      w3, wzr, w20, ror #0       // encoding: [0xe3,0x03,0xd4,0x0a]
3300// CHECK: and      x7, x20, xzr, asr #63      // encoding: [0x87,0xfe,0x9f,0x8a]
3301
3302        bic x13, x20, x14, lsl #47
3303        bic w2, w7, w9
3304        orr w2, w7, w0, asr #31
3305        orr x8, x9, x10, lsl #12
3306        orn x3, x5, x7, asr #0
3307        orn w2, w5, w29
3308// CHECK: bic      x13, x20, x14, lsl #47     // encoding: [0x8d,0xbe,0x2e,0x8a]
3309// CHECK: bic      w2, w7, w9                 // encoding: [0xe2,0x00,0x29,0x0a]
3310// CHECK: orr      w2, w7, w0, asr #31        // encoding: [0xe2,0x7c,0x80,0x2a]
3311// CHECK: orr      x8, x9, x10, lsl #12       // encoding: [0x28,0x31,0x0a,0xaa]
3312// CHECK: orn      x3, x5, x7, asr #0         // encoding: [0xa3,0x00,0xa7,0xaa]
3313// CHECK: orn      w2, w5, w29                // encoding: [0xa2,0x00,0x3d,0x2a]
3314
3315        ands w7, wzr, w9, lsl #1
3316        ands x3, x5, x20, ror #63
3317        bics w3, w5, w7, lsl #0
3318        bics x3, xzr, x3, lsl #1
3319// CHECK: ands     w7, wzr, w9, lsl #1        // encoding: [0xe7,0x07,0x09,0x6a]
3320// CHECK: ands     x3, x5, x20, ror #63       // encoding: [0xa3,0xfc,0xd4,0xea]
3321// CHECK: bics     w3, w5, w7                 // encoding: [0xa3,0x00,0x27,0x6a]
3322// CHECK: bics     x3, xzr, x3, lsl #1        // encoding: [0xe3,0x07,0x23,0xea]
3323
3324        tst w3, w7, lsl #31
3325        tst x2, x20, asr #0
3326// CHECK: tst      w3, w7, lsl #31            // encoding: [0x7f,0x7c,0x07,0x6a]
3327// CHECK: tst      x2, x20, asr #0            // encoding: [0x5f,0x00,0x94,0xea]
3328
3329        mov x3, x6
3330        mov x3, xzr
3331        mov wzr, w2
3332        mov w3, w5
3333// CHECK: mov      x3, x6                     // encoding: [0xe3,0x03,0x06,0xaa]
3334// CHECK: mov      x3, xzr                    // encoding: [0xe3,0x03,0x1f,0xaa]
3335// CHECK: mov      wzr, w2                    // encoding: [0xff,0x03,0x02,0x2a]
3336// CHECK: mov      w3, w5                     // encoding: [0xe3,0x03,0x05,0x2a]
3337
3338//------------------------------------------------------------------------------
3339// Move wide (immediate)
3340//------------------------------------------------------------------------------
3341
3342        movz w1, #65535, lsl #0
3343        movz w2, #0, lsl #16
3344        movn w2, #1234, lsl #0
3345// CHECK: movz     w1, #{{65535|0xffff}}      // encoding: [0xe1,0xff,0x9f,0x52]
3346// CHECK: movz     w2, #0, lsl #16            // encoding: [0x02,0x00,0xa0,0x52]
3347// CHECK: movn     w2, #{{1234|0x4d2}}        // encoding: [0x42,0x9a,0x80,0x12]
3348
3349        movz x2, #1234, lsl #32
3350        movk xzr, #4321, lsl #48
3351// CHECK: movz     x2, #{{1234|0x4d2}}, lsl #32   // encoding: [0x42,0x9a,0xc0,0xd2]
3352// CHECK: movk     xzr, #{{4321|0x10e1}}, lsl #48 // encoding: [0x3f,0x1c,0xe2,0xf2]
3353
3354        movz x2, #:abs_g0:sym
3355        movk w3, #:abs_g0_nc:sym
3356
3357// CHECK: movz    x2, #:abs_g0:sym        // encoding: [0bAAA00010,A,0b100AAAAA,0xd2]
3358// CHECK-NEXT:                                 //   fixup A - offset: 0, value: :abs_g0:sym, kind: fixup_aarch64_movw
3359// CHECK: movk    w3, #:abs_g0_nc:sym     // encoding: [0bAAA00011,A,0b100AAAAA,0x72]
3360// CHECK-NEXT:                                 //   fixup A - offset: 0, value: :abs_g0_nc:sym, kind: fixup_aarch64_movw
3361
3362        movz x4, #:abs_g1:sym
3363        movk w5, #:abs_g1_nc:sym
3364
3365// CHECK: movz    x4, #:abs_g1:sym        // encoding: [0bAAA00100,A,0b101AAAAA,0xd2]
3366// CHECK-NEXT:                                 //   fixup A - offset: 0, value: :abs_g1:sym, kind: fixup_aarch64_movw
3367// CHECK: movk    w5, #:abs_g1_nc:sym     // encoding: [0bAAA00101,A,0b101AAAAA,0x72]
3368// CHECK-NEXT:                                 //   fixup A - offset: 0, value: :abs_g1_nc:sym, kind: fixup_aarch64_movw
3369
3370        movz x6, #:abs_g2:sym
3371        movk x7, #:abs_g2_nc:sym
3372
3373// CHECK: movz    x6, #:abs_g2:sym        // encoding: [0bAAA00110,A,0b110AAAAA,0xd2]
3374// CHECK-NEXT:                                 //   fixup A - offset: 0, value: :abs_g2:sym, kind: fixup_aarch64_movw
3375// CHECK: movk    x7, #:abs_g2_nc:sym     // encoding: [0bAAA00111,A,0b110AAAAA,0xf2]
3376// CHECK-NEXT:                                 //   fixup A - offset: 0, value: :abs_g2_nc:sym, kind: fixup_aarch64_movw
3377
3378        movz x8, #:abs_g3:sym
3379        movk x9, #:abs_g3:sym
3380
3381// CHECK: movz    x8, #:abs_g3:sym        // encoding: [0bAAA01000,A,0b111AAAAA,0xd2]
3382// CHECK-NEXT:                                 //   fixup A - offset: 0, value: :abs_g3:sym, kind: fixup_aarch64_movw
3383// CHECK: movk    x9, #:abs_g3:sym        // encoding: [0bAAA01001,A,0b111AAAAA,0xf2]
3384// CHECK-NEXT:                                 //   fixup A - offset: 0, value: :abs_g3:sym, kind: fixup_aarch64_movw
3385
3386
3387        movn x30, #:abs_g0_s:sym
3388        movz x19, #:abs_g0_s:sym
3389        movn w10, #:abs_g0_s:sym
3390        movz w25, #:abs_g0_s:sym
3391
3392// CHECK: movn    x30, #:abs_g0_s:sym     // encoding: [0bAAA11110,A,0b100AAAAA,0x92]
3393// CHECK-NEXT:                                 //   fixup A - offset: 0, value: :abs_g0_s:sym, kind: fixup_aarch64_movw
3394// CHECK: movz    x19, #:abs_g0_s:sym     // encoding: [0bAAA10011,A,0b100AAAAA,0xd2]
3395// CHECK-NEXT:                                 //   fixup A - offset: 0, value: :abs_g0_s:sym, kind: fixup_aarch64_movw
3396// CHECK: movn    w10, #:abs_g0_s:sym     // encoding: [0bAAA01010,A,0b100AAAAA,0x12]
3397// CHECK-NEXT:                                 //   fixup A - offset: 0, value: :abs_g0_s:sym, kind: fixup_aarch64_movw
3398// CHECK: movz    w25, #:abs_g0_s:sym     // encoding: [0bAAA11001,A,0b100AAAAA,0x52]
3399// CHECK-NEXT:                                 //   fixup A - offset: 0, value: :abs_g0_s:sym, kind: fixup_aarch64_movw
3400
3401        movn x30, #:abs_g1_s:sym
3402        movz x19, #:abs_g1_s:sym
3403        movn w10, #:abs_g1_s:sym
3404        movz w25, #:abs_g1_s:sym
3405
3406// CHECK: movn    x30, #:abs_g1_s:sym     // encoding: [0bAAA11110,A,0b101AAAAA,0x92]
3407// CHECK-NEXT:                                 //   fixup A - offset: 0, value: :abs_g1_s:sym, kind: fixup_aarch64_movw
3408// CHECK: movz    x19, #:abs_g1_s:sym     // encoding: [0bAAA10011,A,0b101AAAAA,0xd2]
3409// CHECK-NEXT:                                 //   fixup A - offset: 0, value: :abs_g1_s:sym, kind: fixup_aarch64_movw
3410// CHECK: movn    w10, #:abs_g1_s:sym     // encoding: [0bAAA01010,A,0b101AAAAA,0x12]
3411// CHECK-NEXT:                                 //   fixup A - offset: 0, value: :abs_g1_s:sym, kind: fixup_aarch64_movw
3412// CHECK: movz    w25, #:abs_g1_s:sym     // encoding: [0bAAA11001,A,0b101AAAAA,0x52]
3413// CHECK-NEXT:                                 //   fixup A - offset: 0, value: :abs_g1_s:sym, kind: fixup_aarch64_movw
3414
3415        movn x30, #:abs_g2_s:sym
3416        movz x19, #:abs_g2_s:sym
3417
3418// CHECK: movn    x30, #:abs_g2_s:sym     // encoding: [0bAAA11110,A,0b110AAAAA,0x92]
3419// CHECK-NEXT:                                 //   fixup A - offset: 0, value: :abs_g2_s:sym, kind: fixup_aarch64_movw
3420// CHECK: movz    x19, #:abs_g2_s:sym     // encoding: [0bAAA10011,A,0b110AAAAA,0xd2]
3421// CHECK-NEXT:                                 //   fixup A - offset: 0, value: :abs_g2_s:sym, kind: fixup_aarch64_movw
3422
3423//------------------------------------------------------------------------------
3424// PC-relative addressing
3425//------------------------------------------------------------------------------
3426
3427        adr x2, loc
3428        adr xzr, loc
3429
3430// CHECK: adr    x2, loc                 // encoding: [0x02'A',A,A,0x10'A']
3431// CHECK:                                 //   fixup A - offset: 0, value: loc, kind: fixup_aarch64_pcrel_adr_imm21
3432// CHECK: adr    xzr, loc                // encoding: [0x1f'A',A,A,0x10'A']
3433// CHECK:                                 //   fixup A - offset: 0, value: loc, kind: fixup_aarch64_pcrel_adr_imm21
3434
3435        adrp x29, loc
3436
3437// CHECK: adrp    x29, loc                // encoding: [0x1d'A',A,A,0x90'A']
3438// CHECK:                                 //   fixup A - offset: 0, value: loc, kind: fixup_aarch64_pcrel_adrp_imm21
3439        adrp x30, #4096
3440        adr x20, #0
3441        adr x9, #-1
3442        adr x5, #1048575
3443// CHECK: adrp    x30, #4096              // encoding: [0x1e,0x00,0x00,0xb0]
3444// CHECK: adr     x20, #0                 // encoding: [0x14,0x00,0x00,0x10]
3445// CHECK: adr     x9, #-1                 // encoding: [0xe9,0xff,0xff,0x70]
3446// CHECK: adr     x5, #1048575            // encoding: [0xe5,0xff,0x7f,0x70]
3447
3448        adr x9, #1048575
3449        adr x2, #-1048576
3450        adrp x9, #4294963200
3451        adrp x20, #-4294967296
3452// CHECK: adr     x9, #1048575            // encoding: [0xe9,0xff,0x7f,0x70]
3453// CHECK: adr     x2, #-1048576           // encoding: [0x02,0x00,0x80,0x10]
3454// CHECK: adrp    x9, #4294963200         // encoding: [0xe9,0xff,0x7f,0xf0]
3455// CHECK: adrp    x20, #-4294967296       // encoding: [0x14,0x00,0x80,0x90]
3456
3457//------------------------------------------------------------------------------
3458// System
3459//------------------------------------------------------------------------------
3460
3461        hint #0
3462        hint #127
3463// CHECK: nop                             // encoding: [0x1f,0x20,0x03,0xd5]
3464// CHECK: hint    #{{127|0x7f}}           // encoding: [0xff,0x2f,0x03,0xd5]
3465
3466        nop
3467        yield
3468        wfe
3469        wfi
3470        sev
3471        sevl
3472// CHECK: nop                             // encoding: [0x1f,0x20,0x03,0xd5]
3473// CHECK: yield                           // encoding: [0x3f,0x20,0x03,0xd5]
3474// CHECK: wfe                             // encoding: [0x5f,0x20,0x03,0xd5]
3475// CHECK: wfi                             // encoding: [0x7f,0x20,0x03,0xd5]
3476// CHECK: sev                             // encoding: [0x9f,0x20,0x03,0xd5]
3477// CHECK: sevl                            // encoding: [0xbf,0x20,0x03,0xd5]
3478
3479        clrex
3480        clrex #0
3481        clrex #7
3482        clrex #15
3483// CHECK: clrex                           // encoding: [0x5f,0x3f,0x03,0xd5]
3484// CHECK: clrex   #0                      // encoding: [0x5f,0x30,0x03,0xd5]
3485// CHECK: clrex   #7                      // encoding: [0x5f,0x37,0x03,0xd5]
3486// CHECK: clrex                           // encoding: [0x5f,0x3f,0x03,0xd5]
3487
3488        dsb #0
3489        dsb #12
3490        dsb #15
3491        dsb oshld
3492        dsb oshst
3493        dsb osh
3494        dsb nshld
3495        dsb nshst
3496        dsb nsh
3497        dsb ishld
3498        dsb ishst
3499        dsb ish
3500        dsb ld
3501        dsb st
3502        dsb sy
3503// CHECK: dsb     #0                      // encoding: [0x9f,0x30,0x03,0xd5]
3504// CHECK: dsb     #12                     // encoding: [0x9f,0x3c,0x03,0xd5]
3505// CHECK: dsb     sy                      // encoding: [0x9f,0x3f,0x03,0xd5]
3506// CHECK: dsb     oshld                   // encoding: [0x9f,0x31,0x03,0xd5]
3507// CHECK: dsb     oshst                   // encoding: [0x9f,0x32,0x03,0xd5]
3508// CHECK: dsb     osh                     // encoding: [0x9f,0x33,0x03,0xd5]
3509// CHECK: dsb     nshld                   // encoding: [0x9f,0x35,0x03,0xd5]
3510// CHECK: dsb     nshst                   // encoding: [0x9f,0x36,0x03,0xd5]
3511// CHECK: dsb     nsh                     // encoding: [0x9f,0x37,0x03,0xd5]
3512// CHECK: dsb     ishld                   // encoding: [0x9f,0x39,0x03,0xd5]
3513// CHECK: dsb     ishst                   // encoding: [0x9f,0x3a,0x03,0xd5]
3514// CHECK: dsb     ish                     // encoding: [0x9f,0x3b,0x03,0xd5]
3515// CHECK: dsb     ld                      // encoding: [0x9f,0x3d,0x03,0xd5]
3516// CHECK: dsb     st                      // encoding: [0x9f,0x3e,0x03,0xd5]
3517// CHECK: dsb     sy                      // encoding: [0x9f,0x3f,0x03,0xd5]
3518
3519        dmb #0
3520        dmb #12
3521        dmb #15
3522        dmb oshld
3523        dmb oshst
3524        dmb osh
3525        dmb nshld
3526        dmb nshst
3527        dmb nsh
3528        dmb ishld
3529        dmb ishst
3530        dmb ish
3531        dmb ld
3532        dmb st
3533        dmb sy
3534// CHECK: dmb     #0                      // encoding: [0xbf,0x30,0x03,0xd5]
3535// CHECK: dmb     #12                     // encoding: [0xbf,0x3c,0x03,0xd5]
3536// CHECK: dmb     sy                      // encoding: [0xbf,0x3f,0x03,0xd5]
3537// CHECK: dmb     oshld                   // encoding: [0xbf,0x31,0x03,0xd5]
3538// CHECK: dmb     oshst                   // encoding: [0xbf,0x32,0x03,0xd5]
3539// CHECK: dmb     osh                     // encoding: [0xbf,0x33,0x03,0xd5]
3540// CHECK: dmb     nshld                   // encoding: [0xbf,0x35,0x03,0xd5]
3541// CHECK: dmb     nshst                   // encoding: [0xbf,0x36,0x03,0xd5]
3542// CHECK: dmb     nsh                     // encoding: [0xbf,0x37,0x03,0xd5]
3543// CHECK: dmb     ishld                   // encoding: [0xbf,0x39,0x03,0xd5]
3544// CHECK: dmb     ishst                   // encoding: [0xbf,0x3a,0x03,0xd5]
3545// CHECK: dmb     ish                     // encoding: [0xbf,0x3b,0x03,0xd5]
3546// CHECK: dmb     ld                      // encoding: [0xbf,0x3d,0x03,0xd5]
3547// CHECK: dmb     st                      // encoding: [0xbf,0x3e,0x03,0xd5]
3548// CHECK: dmb     sy                      // encoding: [0xbf,0x3f,0x03,0xd5]
3549
3550        isb sy
3551        isb
3552        isb #12
3553// CHECK: isb                             // encoding: [0xdf,0x3f,0x03,0xd5]
3554// CHECK: isb                             // encoding: [0xdf,0x3f,0x03,0xd5]
3555// CHECK: isb     #12                     // encoding: [0xdf,0x3c,0x03,0xd5]
3556
3557
3558        msr spsel, #0
3559        msr daifset, #15
3560        msr daifclr, #12
3561// CHECK: msr     {{spsel|SPSEL}}, #0               // encoding: [0xbf,0x40,0x00,0xd5]
3562// CHECK: msr     {{daifset|DAIFSET}}, #15            // encoding: [0xdf,0x4f,0x03,0xd5]
3563// CHECK: msr     {{daifclr|DAIFCLR}}, #12            // encoding: [0xff,0x4c,0x03,0xd5]
3564
3565        sys #7, c5, c9, #7, x5
3566        sys #0, c15, c15, #2
3567// CHECK: sys     #7, c5, c9, #7, x5      // encoding: [0xe5,0x59,0x0f,0xd5]
3568// CHECK: sys     #0, c15, c15, #2   // encoding: [0x5f,0xff,0x08,0xd5]
3569
3570        sysl x9, #7, c5, c9, #7
3571        sysl x1, #0, c15, c15, #2
3572// CHECK: sysl    x9, #7, c5, c9, #7      // encoding: [0xe9,0x59,0x2f,0xd5]
3573// CHECK: sysl    x1, #0, c15, c15, #2    // encoding: [0x41,0xff,0x28,0xd5]
3574
3575        ic ialluis
3576        ic iallu
3577        ic ivau, x9
3578// CHECK:         ic      ialluis                 // encoding: [0x1f,0x71,0x08,0xd5]
3579// CHECK:         ic      iallu                   // encoding: [0x1f,0x75,0x08,0xd5]
3580// CHECK:         ic      ivau, x9                // encoding: [0x29,0x75,0x0b,0xd5]
3581
3582        dc zva, x12
3583        dc ivac, xzr
3584        dc isw, x2
3585        dc cvac, x9
3586        dc csw, x10
3587        dc cvau, x0
3588        dc civac, x3
3589        dc cisw, x30
3590// CHECK:         dc      zva, x12                // encoding: [0x2c,0x74,0x0b,0xd5]
3591// CHECK:         dc      ivac, xzr               // encoding: [0x3f,0x76,0x08,0xd5]
3592// CHECK:         dc      isw, x2                 // encoding: [0x42,0x76,0x08,0xd5]
3593// CHECK:         dc      cvac, x9                // encoding: [0x29,0x7a,0x0b,0xd5]
3594// CHECK:         dc      csw, x10                // encoding: [0x4a,0x7a,0x08,0xd5]
3595// CHECK:         dc      cvau, x0                // encoding: [0x20,0x7b,0x0b,0xd5]
3596// CHECK:         dc      civac, x3               // encoding: [0x23,0x7e,0x0b,0xd5]
3597// CHECK:         dc      cisw, x30               // encoding: [0x5e,0x7e,0x08,0xd5]
3598
3599        at S1E1R, x19
3600        at S1E2R, x19
3601        at S1E3R, x19
3602        at S1E1W, x19
3603        at S1E2W, x19
3604        at S1E3W, x19
3605        at S1E0R, x19
3606        at S1E0W, x19
3607        at S12E1R, x20
3608        at S12E1W, x20
3609        at S12E0R, x20
3610        at S12E0W, x20
3611// CHECK: at      s1e1r, x19              // encoding: [0x13,0x78,0x08,0xd5]
3612// CHECK: at      s1e2r, x19              // encoding: [0x13,0x78,0x0c,0xd5]
3613// CHECK: at      s1e3r, x19              // encoding: [0x13,0x78,0x0e,0xd5]
3614// CHECK: at      s1e1w, x19              // encoding: [0x33,0x78,0x08,0xd5]
3615// CHECK: at      s1e2w, x19              // encoding: [0x33,0x78,0x0c,0xd5]
3616// CHECK: at      s1e3w, x19              // encoding: [0x33,0x78,0x0e,0xd5]
3617// CHECK: at      s1e0r, x19              // encoding: [0x53,0x78,0x08,0xd5]
3618// CHECK: at      s1e0w, x19              // encoding: [0x73,0x78,0x08,0xd5]
3619// CHECK: at      s12e1r, x20             // encoding: [0x94,0x78,0x0c,0xd5]
3620// CHECK: at      s12e1w, x20             // encoding: [0xb4,0x78,0x0c,0xd5]
3621// CHECK: at      s12e0r, x20             // encoding: [0xd4,0x78,0x0c,0xd5]
3622// CHECK: at      s12e0w, x20             // encoding: [0xf4,0x78,0x0c,0xd5]
3623
3624        tlbi IPAS2E1IS, x4
3625        tlbi IPAS2LE1IS, x9
3626        tlbi VMALLE1IS
3627        tlbi ALLE2IS
3628        tlbi ALLE3IS
3629        tlbi VAE1IS, x1
3630        tlbi VAE2IS, x2
3631        tlbi VAE3IS, x3
3632        tlbi ASIDE1IS, x5
3633        tlbi VAAE1IS, x9
3634        tlbi ALLE1IS
3635        tlbi VALE1IS, x10
3636        tlbi VALE2IS, x11
3637        tlbi VALE3IS, x13
3638        tlbi VMALLS12E1IS
3639        tlbi VAALE1IS, x14
3640        tlbi IPAS2E1, x15
3641        tlbi IPAS2LE1, x16
3642        tlbi VMALLE1
3643        tlbi ALLE2
3644        tlbi ALLE3
3645        tlbi VAE1, x17
3646        tlbi VAE2, x18
3647        tlbi VAE3, x19
3648        tlbi ASIDE1, x20
3649        tlbi VAAE1, x21
3650        tlbi ALLE1
3651        tlbi VALE1, x22
3652        tlbi VALE2, x23
3653        tlbi VALE3, x24
3654        tlbi VMALLS12E1
3655        tlbi VAALE1, x25
3656// CHECK: tlbi    ipas2e1is, x4           // encoding: [0x24,0x80,0x0c,0xd5]
3657// CHECK: tlbi    ipas2le1is, x9          // encoding: [0xa9,0x80,0x0c,0xd5]
3658// CHECK: tlbi    vmalle1is               // encoding: [0x1f,0x83,0x08,0xd5]
3659// CHECK: tlbi    alle2is                 // encoding: [0x1f,0x83,0x0c,0xd5]
3660// CHECK: tlbi    alle3is                 // encoding: [0x1f,0x83,0x0e,0xd5]
3661// CHECK: tlbi    vae1is, x1              // encoding: [0x21,0x83,0x08,0xd5]
3662// CHECK: tlbi    vae2is, x2              // encoding: [0x22,0x83,0x0c,0xd5]
3663// CHECK: tlbi    vae3is, x3              // encoding: [0x23,0x83,0x0e,0xd5]
3664// CHECK: tlbi    aside1is, x5            // encoding: [0x45,0x83,0x08,0xd5]
3665// CHECK: tlbi    vaae1is, x9             // encoding: [0x69,0x83,0x08,0xd5]
3666// CHECK: tlbi    alle1is                 // encoding: [0x9f,0x83,0x0c,0xd5]
3667// CHECK: tlbi    vale1is, x10            // encoding: [0xaa,0x83,0x08,0xd5]
3668// CHECK: tlbi    vale2is, x11            // encoding: [0xab,0x83,0x0c,0xd5]
3669// CHECK: tlbi    vale3is, x13            // encoding: [0xad,0x83,0x0e,0xd5]
3670// CHECK: tlbi    vmalls12e1is            // encoding: [0xdf,0x83,0x0c,0xd5]
3671// CHECK: tlbi    vaale1is, x14           // encoding: [0xee,0x83,0x08,0xd5]
3672// CHECK: tlbi    ipas2e1, x15            // encoding: [0x2f,0x84,0x0c,0xd5]
3673// CHECK: tlbi    ipas2le1, x16           // encoding: [0xb0,0x84,0x0c,0xd5]
3674// CHECK: tlbi    vmalle1                 // encoding: [0x1f,0x87,0x08,0xd5]
3675// CHECK: tlbi    alle2                   // encoding: [0x1f,0x87,0x0c,0xd5]
3676// CHECK: tlbi    alle3                   // encoding: [0x1f,0x87,0x0e,0xd5]
3677// CHECK: tlbi    vae1, x17               // encoding: [0x31,0x87,0x08,0xd5]
3678// CHECK: tlbi    vae2, x18               // encoding: [0x32,0x87,0x0c,0xd5]
3679// CHECK: tlbi    vae3, x19               // encoding: [0x33,0x87,0x0e,0xd5]
3680// CHECK: tlbi    aside1, x20             // encoding: [0x54,0x87,0x08,0xd5]
3681// CHECK: tlbi    vaae1, x21              // encoding: [0x75,0x87,0x08,0xd5]
3682// CHECK: tlbi    alle1                   // encoding: [0x9f,0x87,0x0c,0xd5]
3683// CHECK: tlbi    vale1, x22              // encoding: [0xb6,0x87,0x08,0xd5]
3684// CHECK: tlbi    vale2, x23              // encoding: [0xb7,0x87,0x0c,0xd5]
3685// CHECK: tlbi    vale3, x24              // encoding: [0xb8,0x87,0x0e,0xd5]
3686// CHECK: tlbi    vmalls12e1              // encoding: [0xdf,0x87,0x0c,0xd5]
3687// CHECK: tlbi    vaale1, x25             // encoding: [0xf9,0x87,0x08,0xd5]
3688
3689	msr TEECR32_EL1, x12
3690	msr OSDTRRX_EL1, x12
3691	msr MDCCINT_EL1, x12
3692	msr MDSCR_EL1, x12
3693	msr OSDTRTX_EL1, x12
3694	msr DBGDTR_EL0, x12
3695	msr DBGDTRTX_EL0, x12
3696	msr OSECCR_EL1, x12
3697	msr DBGVCR32_EL2, x12
3698	msr DBGBVR0_EL1, x12
3699	msr DBGBVR1_EL1, x12
3700	msr DBGBVR2_EL1, x12
3701	msr DBGBVR3_EL1, x12
3702	msr DBGBVR4_EL1, x12
3703	msr DBGBVR5_EL1, x12
3704	msr DBGBVR6_EL1, x12
3705	msr DBGBVR7_EL1, x12
3706	msr DBGBVR8_EL1, x12
3707	msr DBGBVR9_EL1, x12
3708	msr DBGBVR10_EL1, x12
3709	msr DBGBVR11_EL1, x12
3710	msr DBGBVR12_EL1, x12
3711	msr DBGBVR13_EL1, x12
3712	msr DBGBVR14_EL1, x12
3713	msr DBGBVR15_EL1, x12
3714	msr DBGBCR0_EL1, x12
3715	msr DBGBCR1_EL1, x12
3716	msr DBGBCR2_EL1, x12
3717	msr DBGBCR3_EL1, x12
3718	msr DBGBCR4_EL1, x12
3719	msr DBGBCR5_EL1, x12
3720	msr DBGBCR6_EL1, x12
3721	msr DBGBCR7_EL1, x12
3722	msr DBGBCR8_EL1, x12
3723	msr DBGBCR9_EL1, x12
3724	msr DBGBCR10_EL1, x12
3725	msr DBGBCR11_EL1, x12
3726	msr DBGBCR12_EL1, x12
3727	msr DBGBCR13_EL1, x12
3728	msr DBGBCR14_EL1, x12
3729	msr DBGBCR15_EL1, x12
3730	msr DBGWVR0_EL1, x12
3731	msr DBGWVR1_EL1, x12
3732	msr DBGWVR2_EL1, x12
3733	msr DBGWVR3_EL1, x12
3734	msr DBGWVR4_EL1, x12
3735	msr DBGWVR5_EL1, x12
3736	msr DBGWVR6_EL1, x12
3737	msr DBGWVR7_EL1, x12
3738	msr DBGWVR8_EL1, x12
3739	msr DBGWVR9_EL1, x12
3740	msr DBGWVR10_EL1, x12
3741	msr DBGWVR11_EL1, x12
3742	msr DBGWVR12_EL1, x12
3743	msr DBGWVR13_EL1, x12
3744	msr DBGWVR14_EL1, x12
3745	msr DBGWVR15_EL1, x12
3746	msr DBGWCR0_EL1, x12
3747	msr DBGWCR1_EL1, x12
3748	msr DBGWCR2_EL1, x12
3749	msr DBGWCR3_EL1, x12
3750	msr DBGWCR4_EL1, x12
3751	msr DBGWCR5_EL1, x12
3752	msr DBGWCR6_EL1, x12
3753	msr DBGWCR7_EL1, x12
3754	msr DBGWCR8_EL1, x12
3755	msr DBGWCR9_EL1, x12
3756	msr DBGWCR10_EL1, x12
3757	msr DBGWCR11_EL1, x12
3758	msr DBGWCR12_EL1, x12
3759	msr DBGWCR13_EL1, x12
3760	msr DBGWCR14_EL1, x12
3761	msr DBGWCR15_EL1, x12
3762	msr TEEHBR32_EL1, x12
3763	msr OSLAR_EL1, x12
3764	msr OSDLR_EL1, x12
3765	msr DBGPRCR_EL1, x12
3766	msr DBGCLAIMSET_EL1, x12
3767	msr DBGCLAIMCLR_EL1, x12
3768	msr CSSELR_EL1, x12
3769	msr VPIDR_EL2, x12
3770	msr VMPIDR_EL2, x12
3771	msr SCTLR_EL1, x12
3772	msr SCTLR_EL2, x12
3773	msr SCTLR_EL3, x12
3774	msr ACTLR_EL1, x12
3775	msr ACTLR_EL2, x12
3776	msr ACTLR_EL3, x12
3777	msr CPACR_EL1, x12
3778	msr HCR_EL2, x12
3779	msr SCR_EL3, x12
3780	msr MDCR_EL2, x12
3781	msr SDER32_EL3, x12
3782	msr CPTR_EL2, x12
3783	msr CPTR_EL3, x12
3784	msr HSTR_EL2, x12
3785	msr HACR_EL2, x12
3786	msr MDCR_EL3, x12
3787	msr TTBR0_EL1, x12
3788	msr TTBR0_EL2, x12
3789	msr TTBR0_EL3, x12
3790	msr TTBR1_EL1, x12
3791	msr TCR_EL1, x12
3792	msr TCR_EL2, x12
3793	msr TCR_EL3, x12
3794	msr VTTBR_EL2, x12
3795	msr VTCR_EL2, x12
3796	msr DACR32_EL2, x12
3797	msr SPSR_EL1, x12
3798	msr SPSR_EL2, x12
3799	msr SPSR_EL3, x12
3800	msr ELR_EL1, x12
3801	msr ELR_EL2, x12
3802	msr ELR_EL3, x12
3803	msr SP_EL0, x12
3804	msr SP_EL1, x12
3805	msr SP_EL2, x12
3806	msr SPSel, x12
3807	msr NZCV, x12
3808	msr DAIF, x12
3809	msr CurrentEL, x12
3810	msr SPSR_irq, x12
3811	msr SPSR_abt, x12
3812	msr SPSR_und, x12
3813	msr SPSR_fiq, x12
3814	msr FPCR, x12
3815	msr FPSR, x12
3816	msr DSPSR_EL0, x12
3817	msr DLR_EL0, x12
3818	msr IFSR32_EL2, x12
3819	msr AFSR0_EL1, x12
3820	msr AFSR0_EL2, x12
3821	msr AFSR0_EL3, x12
3822	msr AFSR1_EL1, x12
3823	msr AFSR1_EL2, x12
3824	msr AFSR1_EL3, x12
3825	msr ESR_EL1, x12
3826	msr ESR_EL2, x12
3827	msr ESR_EL3, x12
3828	msr FPEXC32_EL2, x12
3829	msr FAR_EL1, x12
3830	msr FAR_EL2, x12
3831	msr FAR_EL3, x12
3832	msr HPFAR_EL2, x12
3833	msr PAR_EL1, x12
3834	msr PMCR_EL0, x12
3835	msr PMCNTENSET_EL0, x12
3836	msr PMCNTENCLR_EL0, x12
3837	msr PMOVSCLR_EL0, x12
3838	msr PMSELR_EL0, x12
3839	msr PMCCNTR_EL0, x12
3840	msr PMXEVTYPER_EL0, x12
3841	msr PMXEVCNTR_EL0, x12
3842	msr PMUSERENR_EL0, x12
3843	msr PMINTENSET_EL1, x12
3844	msr PMINTENCLR_EL1, x12
3845	msr PMOVSSET_EL0, x12
3846	msr MAIR_EL1, x12
3847	msr MAIR_EL2, x12
3848	msr MAIR_EL3, x12
3849	msr AMAIR_EL1, x12
3850	msr AMAIR_EL2, x12
3851	msr AMAIR_EL3, x12
3852	msr VBAR_EL1, x12
3853	msr VBAR_EL2, x12
3854	msr VBAR_EL3, x12
3855	msr RMR_EL1, x12
3856	msr RMR_EL2, x12
3857	msr RMR_EL3, x12
3858	msr CONTEXTIDR_EL1, x12
3859	msr TPIDR_EL0, x12
3860	msr TPIDR_EL2, x12
3861	msr TPIDR_EL3, x12
3862	msr TPIDRRO_EL0, x12
3863	msr TPIDR_EL1, x12
3864	msr CNTFRQ_EL0, x12
3865	msr CNTVOFF_EL2, x12
3866	msr CNTKCTL_EL1, x12
3867	msr CNTHCTL_EL2, x12
3868	msr CNTP_TVAL_EL0, x12
3869	msr CNTHP_TVAL_EL2, x12
3870	msr CNTPS_TVAL_EL1, x12
3871	msr CNTP_CTL_EL0, x12
3872	msr CNTHP_CTL_EL2, x12
3873	msr CNTPS_CTL_EL1, x12
3874	msr CNTP_CVAL_EL0, x12
3875	msr CNTHP_CVAL_EL2, x12
3876	msr CNTPS_CVAL_EL1, x12
3877	msr CNTV_TVAL_EL0, x12
3878	msr CNTV_CTL_EL0, x12
3879	msr CNTV_CVAL_EL0, x12
3880	msr PMEVCNTR0_EL0, x12
3881	msr PMEVCNTR1_EL0, x12
3882	msr PMEVCNTR2_EL0, x12
3883	msr PMEVCNTR3_EL0, x12
3884	msr PMEVCNTR4_EL0, x12
3885	msr PMEVCNTR5_EL0, x12
3886	msr PMEVCNTR6_EL0, x12
3887	msr PMEVCNTR7_EL0, x12
3888	msr PMEVCNTR8_EL0, x12
3889	msr PMEVCNTR9_EL0, x12
3890	msr PMEVCNTR10_EL0, x12
3891	msr PMEVCNTR11_EL0, x12
3892	msr PMEVCNTR12_EL0, x12
3893	msr PMEVCNTR13_EL0, x12
3894	msr PMEVCNTR14_EL0, x12
3895	msr PMEVCNTR15_EL0, x12
3896	msr PMEVCNTR16_EL0, x12
3897	msr PMEVCNTR17_EL0, x12
3898	msr PMEVCNTR18_EL0, x12
3899	msr PMEVCNTR19_EL0, x12
3900	msr PMEVCNTR20_EL0, x12
3901	msr PMEVCNTR21_EL0, x12
3902	msr PMEVCNTR22_EL0, x12
3903	msr PMEVCNTR23_EL0, x12
3904	msr PMEVCNTR24_EL0, x12
3905	msr PMEVCNTR25_EL0, x12
3906	msr PMEVCNTR26_EL0, x12
3907	msr PMEVCNTR27_EL0, x12
3908	msr PMEVCNTR28_EL0, x12
3909	msr PMEVCNTR29_EL0, x12
3910	msr PMEVCNTR30_EL0, x12
3911	msr PMCCFILTR_EL0, x12
3912	msr PMEVTYPER0_EL0, x12
3913	msr PMEVTYPER1_EL0, x12
3914	msr PMEVTYPER2_EL0, x12
3915	msr PMEVTYPER3_EL0, x12
3916	msr PMEVTYPER4_EL0, x12
3917	msr PMEVTYPER5_EL0, x12
3918	msr PMEVTYPER6_EL0, x12
3919	msr PMEVTYPER7_EL0, x12
3920	msr PMEVTYPER8_EL0, x12
3921	msr PMEVTYPER9_EL0, x12
3922	msr PMEVTYPER10_EL0, x12
3923	msr PMEVTYPER11_EL0, x12
3924	msr PMEVTYPER12_EL0, x12
3925	msr PMEVTYPER13_EL0, x12
3926	msr PMEVTYPER14_EL0, x12
3927	msr PMEVTYPER15_EL0, x12
3928	msr PMEVTYPER16_EL0, x12
3929	msr PMEVTYPER17_EL0, x12
3930	msr PMEVTYPER18_EL0, x12
3931	msr PMEVTYPER19_EL0, x12
3932	msr PMEVTYPER20_EL0, x12
3933	msr PMEVTYPER21_EL0, x12
3934	msr PMEVTYPER22_EL0, x12
3935	msr PMEVTYPER23_EL0, x12
3936	msr PMEVTYPER24_EL0, x12
3937	msr PMEVTYPER25_EL0, x12
3938	msr PMEVTYPER26_EL0, x12
3939	msr PMEVTYPER27_EL0, x12
3940	msr PMEVTYPER28_EL0, x12
3941	msr PMEVTYPER29_EL0, x12
3942	msr PMEVTYPER30_EL0, x12
3943// CHECK: msr      {{teecr32_el1|TEECR32_EL1}}, x12           // encoding: [0x0c,0x00,0x12,0xd5]
3944// CHECK: msr      {{osdtrrx_el1|OSDTRRX_EL1}}, x12           // encoding: [0x4c,0x00,0x10,0xd5]
3945// CHECK: msr      {{mdccint_el1|MDCCINT_EL1}}, x12           // encoding: [0x0c,0x02,0x10,0xd5]
3946// CHECK: msr      {{mdscr_el1|MDSCR_EL1}}, x12             // encoding: [0x4c,0x02,0x10,0xd5]
3947// CHECK: msr      {{osdtrtx_el1|OSDTRTX_EL1}}, x12           // encoding: [0x4c,0x03,0x10,0xd5]
3948// CHECK: msr      {{dbgdtr_el0|DBGDTR_EL0}}, x12            // encoding: [0x0c,0x04,0x13,0xd5]
3949// CHECK: msr      {{dbgdtrtx_el0|DBGDTRTX_EL0}}, x12          // encoding: [0x0c,0x05,0x13,0xd5]
3950// CHECK: msr      {{oseccr_el1|OSECCR_EL1}}, x12            // encoding: [0x4c,0x06,0x10,0xd5]
3951// CHECK: msr      {{dbgvcr32_el2|DBGVCR32_EL2}}, x12          // encoding: [0x0c,0x07,0x14,0xd5]
3952// CHECK: msr      {{dbgbvr0_el1|DBGBVR0_EL1}}, x12           // encoding: [0x8c,0x00,0x10,0xd5]
3953// CHECK: msr      {{dbgbvr1_el1|DBGBVR1_EL1}}, x12           // encoding: [0x8c,0x01,0x10,0xd5]
3954// CHECK: msr      {{dbgbvr2_el1|DBGBVR2_EL1}}, x12           // encoding: [0x8c,0x02,0x10,0xd5]
3955// CHECK: msr      {{dbgbvr3_el1|DBGBVR3_EL1}}, x12           // encoding: [0x8c,0x03,0x10,0xd5]
3956// CHECK: msr      {{dbgbvr4_el1|DBGBVR4_EL1}}, x12           // encoding: [0x8c,0x04,0x10,0xd5]
3957// CHECK: msr      {{dbgbvr5_el1|DBGBVR5_EL1}}, x12           // encoding: [0x8c,0x05,0x10,0xd5]
3958// CHECK: msr      {{dbgbvr6_el1|DBGBVR6_EL1}}, x12           // encoding: [0x8c,0x06,0x10,0xd5]
3959// CHECK: msr      {{dbgbvr7_el1|DBGBVR7_EL1}}, x12           // encoding: [0x8c,0x07,0x10,0xd5]
3960// CHECK: msr      {{dbgbvr8_el1|DBGBVR8_EL1}}, x12           // encoding: [0x8c,0x08,0x10,0xd5]
3961// CHECK: msr      {{dbgbvr9_el1|DBGBVR9_EL1}}, x12           // encoding: [0x8c,0x09,0x10,0xd5]
3962// CHECK: msr      {{dbgbvr10_el1|DBGBVR10_EL1}}, x12          // encoding: [0x8c,0x0a,0x10,0xd5]
3963// CHECK: msr      {{dbgbvr11_el1|DBGBVR11_EL1}}, x12          // encoding: [0x8c,0x0b,0x10,0xd5]
3964// CHECK: msr      {{dbgbvr12_el1|DBGBVR12_EL1}}, x12          // encoding: [0x8c,0x0c,0x10,0xd5]
3965// CHECK: msr      {{dbgbvr13_el1|DBGBVR13_EL1}}, x12          // encoding: [0x8c,0x0d,0x10,0xd5]
3966// CHECK: msr      {{dbgbvr14_el1|DBGBVR14_EL1}}, x12          // encoding: [0x8c,0x0e,0x10,0xd5]
3967// CHECK: msr      {{dbgbvr15_el1|DBGBVR15_EL1}}, x12          // encoding: [0x8c,0x0f,0x10,0xd5]
3968// CHECK: msr      {{dbgbcr0_el1|DBGBCR0_EL1}}, x12           // encoding: [0xac,0x00,0x10,0xd5]
3969// CHECK: msr      {{dbgbcr1_el1|DBGBCR1_EL1}}, x12           // encoding: [0xac,0x01,0x10,0xd5]
3970// CHECK: msr      {{dbgbcr2_el1|DBGBCR2_EL1}}, x12           // encoding: [0xac,0x02,0x10,0xd5]
3971// CHECK: msr      {{dbgbcr3_el1|DBGBCR3_EL1}}, x12           // encoding: [0xac,0x03,0x10,0xd5]
3972// CHECK: msr      {{dbgbcr4_el1|DBGBCR4_EL1}}, x12           // encoding: [0xac,0x04,0x10,0xd5]
3973// CHECK: msr      {{dbgbcr5_el1|DBGBCR5_EL1}}, x12           // encoding: [0xac,0x05,0x10,0xd5]
3974// CHECK: msr      {{dbgbcr6_el1|DBGBCR6_EL1}}, x12           // encoding: [0xac,0x06,0x10,0xd5]
3975// CHECK: msr      {{dbgbcr7_el1|DBGBCR7_EL1}}, x12           // encoding: [0xac,0x07,0x10,0xd5]
3976// CHECK: msr      {{dbgbcr8_el1|DBGBCR8_EL1}}, x12           // encoding: [0xac,0x08,0x10,0xd5]
3977// CHECK: msr      {{dbgbcr9_el1|DBGBCR9_EL1}}, x12           // encoding: [0xac,0x09,0x10,0xd5]
3978// CHECK: msr      {{dbgbcr10_el1|DBGBCR10_EL1}}, x12          // encoding: [0xac,0x0a,0x10,0xd5]
3979// CHECK: msr      {{dbgbcr11_el1|DBGBCR11_EL1}}, x12          // encoding: [0xac,0x0b,0x10,0xd5]
3980// CHECK: msr      {{dbgbcr12_el1|DBGBCR12_EL1}}, x12          // encoding: [0xac,0x0c,0x10,0xd5]
3981// CHECK: msr      {{dbgbcr13_el1|DBGBCR13_EL1}}, x12          // encoding: [0xac,0x0d,0x10,0xd5]
3982// CHECK: msr      {{dbgbcr14_el1|DBGBCR14_EL1}}, x12          // encoding: [0xac,0x0e,0x10,0xd5]
3983// CHECK: msr      {{dbgbcr15_el1|DBGBCR15_EL1}}, x12          // encoding: [0xac,0x0f,0x10,0xd5]
3984// CHECK: msr      {{dbgwvr0_el1|DBGWVR0_EL1}}, x12           // encoding: [0xcc,0x00,0x10,0xd5]
3985// CHECK: msr      {{dbgwvr1_el1|DBGWVR1_EL1}}, x12           // encoding: [0xcc,0x01,0x10,0xd5]
3986// CHECK: msr      {{dbgwvr2_el1|DBGWVR2_EL1}}, x12           // encoding: [0xcc,0x02,0x10,0xd5]
3987// CHECK: msr      {{dbgwvr3_el1|DBGWVR3_EL1}}, x12           // encoding: [0xcc,0x03,0x10,0xd5]
3988// CHECK: msr      {{dbgwvr4_el1|DBGWVR4_EL1}}, x12           // encoding: [0xcc,0x04,0x10,0xd5]
3989// CHECK: msr      {{dbgwvr5_el1|DBGWVR5_EL1}}, x12           // encoding: [0xcc,0x05,0x10,0xd5]
3990// CHECK: msr      {{dbgwvr6_el1|DBGWVR6_EL1}}, x12           // encoding: [0xcc,0x06,0x10,0xd5]
3991// CHECK: msr      {{dbgwvr7_el1|DBGWVR7_EL1}}, x12           // encoding: [0xcc,0x07,0x10,0xd5]
3992// CHECK: msr      {{dbgwvr8_el1|DBGWVR8_EL1}}, x12           // encoding: [0xcc,0x08,0x10,0xd5]
3993// CHECK: msr      {{dbgwvr9_el1|DBGWVR9_EL1}}, x12           // encoding: [0xcc,0x09,0x10,0xd5]
3994// CHECK: msr      {{dbgwvr10_el1|DBGWVR10_EL1}}, x12          // encoding: [0xcc,0x0a,0x10,0xd5]
3995// CHECK: msr      {{dbgwvr11_el1|DBGWVR11_EL1}}, x12          // encoding: [0xcc,0x0b,0x10,0xd5]
3996// CHECK: msr      {{dbgwvr12_el1|DBGWVR12_EL1}}, x12          // encoding: [0xcc,0x0c,0x10,0xd5]
3997// CHECK: msr      {{dbgwvr13_el1|DBGWVR13_EL1}}, x12          // encoding: [0xcc,0x0d,0x10,0xd5]
3998// CHECK: msr      {{dbgwvr14_el1|DBGWVR14_EL1}}, x12          // encoding: [0xcc,0x0e,0x10,0xd5]
3999// CHECK: msr      {{dbgwvr15_el1|DBGWVR15_EL1}}, x12          // encoding: [0xcc,0x0f,0x10,0xd5]
4000// CHECK: msr      {{dbgwcr0_el1|DBGWCR0_EL1}}, x12           // encoding: [0xec,0x00,0x10,0xd5]
4001// CHECK: msr      {{dbgwcr1_el1|DBGWCR1_EL1}}, x12           // encoding: [0xec,0x01,0x10,0xd5]
4002// CHECK: msr      {{dbgwcr2_el1|DBGWCR2_EL1}}, x12           // encoding: [0xec,0x02,0x10,0xd5]
4003// CHECK: msr      {{dbgwcr3_el1|DBGWCR3_EL1}}, x12           // encoding: [0xec,0x03,0x10,0xd5]
4004// CHECK: msr      {{dbgwcr4_el1|DBGWCR4_EL1}}, x12           // encoding: [0xec,0x04,0x10,0xd5]
4005// CHECK: msr      {{dbgwcr5_el1|DBGWCR5_EL1}}, x12           // encoding: [0xec,0x05,0x10,0xd5]
4006// CHECK: msr      {{dbgwcr6_el1|DBGWCR6_EL1}}, x12           // encoding: [0xec,0x06,0x10,0xd5]
4007// CHECK: msr      {{dbgwcr7_el1|DBGWCR7_EL1}}, x12           // encoding: [0xec,0x07,0x10,0xd5]
4008// CHECK: msr      {{dbgwcr8_el1|DBGWCR8_EL1}}, x12           // encoding: [0xec,0x08,0x10,0xd5]
4009// CHECK: msr      {{dbgwcr9_el1|DBGWCR9_EL1}}, x12           // encoding: [0xec,0x09,0x10,0xd5]
4010// CHECK: msr      {{dbgwcr10_el1|DBGWCR10_EL1}}, x12          // encoding: [0xec,0x0a,0x10,0xd5]
4011// CHECK: msr      {{dbgwcr11_el1|DBGWCR11_EL1}}, x12          // encoding: [0xec,0x0b,0x10,0xd5]
4012// CHECK: msr      {{dbgwcr12_el1|DBGWCR12_EL1}}, x12          // encoding: [0xec,0x0c,0x10,0xd5]
4013// CHECK: msr      {{dbgwcr13_el1|DBGWCR13_EL1}}, x12          // encoding: [0xec,0x0d,0x10,0xd5]
4014// CHECK: msr      {{dbgwcr14_el1|DBGWCR14_EL1}}, x12          // encoding: [0xec,0x0e,0x10,0xd5]
4015// CHECK: msr      {{dbgwcr15_el1|DBGWCR15_EL1}}, x12          // encoding: [0xec,0x0f,0x10,0xd5]
4016// CHECK: msr      {{teehbr32_el1|TEEHBR32_EL1}}, x12          // encoding: [0x0c,0x10,0x12,0xd5]
4017// CHECK: msr      {{oslar_el1|OSLAR_EL1}}, x12             // encoding: [0x8c,0x10,0x10,0xd5]
4018// CHECK: msr      {{osdlr_el1|OSDLR_EL1}}, x12             // encoding: [0x8c,0x13,0x10,0xd5]
4019// CHECK: msr      {{dbgprcr_el1|DBGPRCR_EL1}}, x12           // encoding: [0x8c,0x14,0x10,0xd5]
4020// CHECK: msr      {{dbgclaimset_el1|DBGCLAIMSET_EL1}}, x12       // encoding: [0xcc,0x78,0x10,0xd5]
4021// CHECK: msr      {{dbgclaimclr_el1|DBGCLAIMCLR_EL1}}, x12       // encoding: [0xcc,0x79,0x10,0xd5]
4022// CHECK: msr      {{csselr_el1|CSSELR_EL1}}, x12            // encoding: [0x0c,0x00,0x1a,0xd5]
4023// CHECK: msr      {{vpidr_el2|VPIDR_EL2}}, x12             // encoding: [0x0c,0x00,0x1c,0xd5]
4024// CHECK: msr      {{vmpidr_el2|VMPIDR_EL2}}, x12            // encoding: [0xac,0x00,0x1c,0xd5]
4025// CHECK: msr      {{sctlr_el1|SCTLR_EL1}}, x12             // encoding: [0x0c,0x10,0x18,0xd5]
4026// CHECK: msr      {{sctlr_el2|SCTLR_EL2}}, x12             // encoding: [0x0c,0x10,0x1c,0xd5]
4027// CHECK: msr      {{sctlr_el3|SCTLR_EL3}}, x12             // encoding: [0x0c,0x10,0x1e,0xd5]
4028// CHECK: msr      {{actlr_el1|ACTLR_EL1}}, x12             // encoding: [0x2c,0x10,0x18,0xd5]
4029// CHECK: msr      {{actlr_el2|ACTLR_EL2}}, x12             // encoding: [0x2c,0x10,0x1c,0xd5]
4030// CHECK: msr      {{actlr_el3|ACTLR_EL3}}, x12             // encoding: [0x2c,0x10,0x1e,0xd5]
4031// CHECK: msr      {{cpacr_el1|CPACR_EL1}}, x12             // encoding: [0x4c,0x10,0x18,0xd5]
4032// CHECK: msr      {{hcr_el2|HCR_EL2}}, x12               // encoding: [0x0c,0x11,0x1c,0xd5]
4033// CHECK: msr      {{scr_el3|SCR_EL3}}, x12               // encoding: [0x0c,0x11,0x1e,0xd5]
4034// CHECK: msr      {{mdcr_el2|MDCR_EL2}}, x12              // encoding: [0x2c,0x11,0x1c,0xd5]
4035// CHECK: msr      {{sder32_el3|SDER32_EL3}}, x12            // encoding: [0x2c,0x11,0x1e,0xd5]
4036// CHECK: msr      {{cptr_el2|CPTR_EL2}}, x12              // encoding: [0x4c,0x11,0x1c,0xd5]
4037// CHECK: msr      {{cptr_el3|CPTR_EL3}}, x12              // encoding: [0x4c,0x11,0x1e,0xd5]
4038// CHECK: msr      {{hstr_el2|HSTR_EL2}}, x12              // encoding: [0x6c,0x11,0x1c,0xd5]
4039// CHECK: msr      {{hacr_el2|HACR_EL2}}, x12              // encoding: [0xec,0x11,0x1c,0xd5]
4040// CHECK: msr      {{mdcr_el3|MDCR_EL3}}, x12              // encoding: [0x2c,0x13,0x1e,0xd5]
4041// CHECK: msr      {{ttbr0_el1|TTBR0_EL1}}, x12             // encoding: [0x0c,0x20,0x18,0xd5]
4042// CHECK: msr      {{ttbr0_el2|TTBR0_EL2}}, x12             // encoding: [0x0c,0x20,0x1c,0xd5]
4043// CHECK: msr      {{ttbr0_el3|TTBR0_EL3}}, x12             // encoding: [0x0c,0x20,0x1e,0xd5]
4044// CHECK: msr      {{ttbr1_el1|TTBR1_EL1}}, x12             // encoding: [0x2c,0x20,0x18,0xd5]
4045// CHECK: msr      {{tcr_el1|TCR_EL1}}, x12               // encoding: [0x4c,0x20,0x18,0xd5]
4046// CHECK: msr      {{tcr_el2|TCR_EL2}}, x12               // encoding: [0x4c,0x20,0x1c,0xd5]
4047// CHECK: msr      {{tcr_el3|TCR_EL3}}, x12               // encoding: [0x4c,0x20,0x1e,0xd5]
4048// CHECK: msr      {{vttbr_el2|VTTBR_EL2}}, x12             // encoding: [0x0c,0x21,0x1c,0xd5]
4049// CHECK: msr      {{vtcr_el2|VTCR_EL2}}, x12              // encoding: [0x4c,0x21,0x1c,0xd5]
4050// CHECK: msr      {{dacr32_el2|DACR32_EL2}}, x12            // encoding: [0x0c,0x30,0x1c,0xd5]
4051// CHECK: msr      {{spsr_el1|SPSR_EL1}}, x12              // encoding: [0x0c,0x40,0x18,0xd5]
4052// CHECK: msr      {{spsr_el2|SPSR_EL2}}, x12              // encoding: [0x0c,0x40,0x1c,0xd5]
4053// CHECK: msr      {{spsr_el3|SPSR_EL3}}, x12              // encoding: [0x0c,0x40,0x1e,0xd5]
4054// CHECK: msr      {{elr_el1|ELR_EL1}}, x12               // encoding: [0x2c,0x40,0x18,0xd5]
4055// CHECK: msr      {{elr_el2|ELR_EL2}}, x12               // encoding: [0x2c,0x40,0x1c,0xd5]
4056// CHECK: msr      {{elr_el3|ELR_EL3}}, x12               // encoding: [0x2c,0x40,0x1e,0xd5]
4057// CHECK: msr      {{sp_el0|SP_EL0}}, x12                // encoding: [0x0c,0x41,0x18,0xd5]
4058// CHECK: msr      {{sp_el1|SP_EL1}}, x12                // encoding: [0x0c,0x41,0x1c,0xd5]
4059// CHECK: msr      {{sp_el2|SP_EL2}}, x12                // encoding: [0x0c,0x41,0x1e,0xd5]
4060// CHECK: msr      {{spsel|SPSEL}}, x12                 // encoding: [0x0c,0x42,0x18,0xd5]
4061// CHECK: msr      {{nzcv|NZCV}}, x12                  // encoding: [0x0c,0x42,0x1b,0xd5]
4062// CHECK: msr      {{daif|DAIF}}, x12                  // encoding: [0x2c,0x42,0x1b,0xd5]
4063// CHECK: msr      {{currentel|CURRENTEL}}, x12             // encoding: [0x4c,0x42,0x18,0xd5]
4064// CHECK: msr      {{spsr_irq|SPSR_IRQ}}, x12              // encoding: [0x0c,0x43,0x1c,0xd5]
4065// CHECK: msr      {{spsr_abt|SPSR_ABT}}, x12              // encoding: [0x2c,0x43,0x1c,0xd5]
4066// CHECK: msr      {{spsr_und|SPSR_UND}}, x12              // encoding: [0x4c,0x43,0x1c,0xd5]
4067// CHECK: msr      {{spsr_fiq|SPSR_FIQ}}, x12              // encoding: [0x6c,0x43,0x1c,0xd5]
4068// CHECK: msr      {{fpcr|FPCR}}, x12                  // encoding: [0x0c,0x44,0x1b,0xd5]
4069// CHECK: msr      {{fpsr|FPSR}}, x12                  // encoding: [0x2c,0x44,0x1b,0xd5]
4070// CHECK: msr      {{dspsr_el0|DSPSR_EL0}}, x12             // encoding: [0x0c,0x45,0x1b,0xd5]
4071// CHECK: msr      {{dlr_el0|DLR_EL0}}, x12               // encoding: [0x2c,0x45,0x1b,0xd5]
4072// CHECK: msr      {{ifsr32_el2|IFSR32_EL2}}, x12            // encoding: [0x2c,0x50,0x1c,0xd5]
4073// CHECK: msr      {{afsr0_el1|AFSR0_EL1}}, x12             // encoding: [0x0c,0x51,0x18,0xd5]
4074// CHECK: msr      {{afsr0_el2|AFSR0_EL2}}, x12             // encoding: [0x0c,0x51,0x1c,0xd5]
4075// CHECK: msr      {{afsr0_el3|AFSR0_EL3}}, x12             // encoding: [0x0c,0x51,0x1e,0xd5]
4076// CHECK: msr      {{afsr1_el1|AFSR1_EL1}}, x12             // encoding: [0x2c,0x51,0x18,0xd5]
4077// CHECK: msr      {{afsr1_el2|AFSR1_EL2}}, x12             // encoding: [0x2c,0x51,0x1c,0xd5]
4078// CHECK: msr      {{afsr1_el3|AFSR1_EL3}}, x12             // encoding: [0x2c,0x51,0x1e,0xd5]
4079// CHECK: msr      {{esr_el1|ESR_EL1}}, x12               // encoding: [0x0c,0x52,0x18,0xd5]
4080// CHECK: msr      {{esr_el2|ESR_EL2}}, x12               // encoding: [0x0c,0x52,0x1c,0xd5]
4081// CHECK: msr      {{esr_el3|ESR_EL3}}, x12               // encoding: [0x0c,0x52,0x1e,0xd5]
4082// CHECK: msr      {{fpexc32_el2|FPEXC32_EL2}}, x12           // encoding: [0x0c,0x53,0x1c,0xd5]
4083// CHECK: msr      {{far_el1|FAR_EL1}}, x12               // encoding: [0x0c,0x60,0x18,0xd5]
4084// CHECK: msr      {{far_el2|FAR_EL2}}, x12               // encoding: [0x0c,0x60,0x1c,0xd5]
4085// CHECK: msr      {{far_el3|FAR_EL3}}, x12               // encoding: [0x0c,0x60,0x1e,0xd5]
4086// CHECK: msr      {{hpfar_el2|HPFAR_EL2}}, x12             // encoding: [0x8c,0x60,0x1c,0xd5]
4087// CHECK: msr      {{par_el1|PAR_EL1}}, x12               // encoding: [0x0c,0x74,0x18,0xd5]
4088// CHECK: msr      {{pmcr_el0|PMCR_EL0}}, x12              // encoding: [0x0c,0x9c,0x1b,0xd5]
4089// CHECK: msr      {{pmcntenset_el0|PMCNTENSET_EL0}}, x12        // encoding: [0x2c,0x9c,0x1b,0xd5]
4090// CHECK: msr      {{pmcntenclr_el0|PMCNTENCLR_EL0}}, x12        // encoding: [0x4c,0x9c,0x1b,0xd5]
4091// CHECK: msr      {{pmovsclr_el0|PMOVSCLR_EL0}}, x12          // encoding: [0x6c,0x9c,0x1b,0xd5]
4092// CHECK: msr      {{pmselr_el0|PMSELR_EL0}}, x12            // encoding: [0xac,0x9c,0x1b,0xd5]
4093// CHECK: msr      {{pmccntr_el0|PMCCNTR_EL0}}, x12           // encoding: [0x0c,0x9d,0x1b,0xd5]
4094// CHECK: msr      {{pmxevtyper_el0|PMXEVTYPER_EL0}}, x12        // encoding: [0x2c,0x9d,0x1b,0xd5]
4095// CHECK: msr      {{pmxevcntr_el0|PMXEVCNTR_EL0}}, x12         // encoding: [0x4c,0x9d,0x1b,0xd5]
4096// CHECK: msr      {{pmuserenr_el0|PMUSERENR_EL0}}, x12         // encoding: [0x0c,0x9e,0x1b,0xd5]
4097// CHECK: msr      {{pmintenset_el1|PMINTENSET_EL1}}, x12        // encoding: [0x2c,0x9e,0x18,0xd5]
4098// CHECK: msr      {{pmintenclr_el1|PMINTENCLR_EL1}}, x12        // encoding: [0x4c,0x9e,0x18,0xd5]
4099// CHECK: msr      {{pmovsset_el0|PMOVSSET_EL0}}, x12          // encoding: [0x6c,0x9e,0x1b,0xd5]
4100// CHECK: msr      {{mair_el1|MAIR_EL1}}, x12              // encoding: [0x0c,0xa2,0x18,0xd5]
4101// CHECK: msr      {{mair_el2|MAIR_EL2}}, x12              // encoding: [0x0c,0xa2,0x1c,0xd5]
4102// CHECK: msr      {{mair_el3|MAIR_EL3}}, x12              // encoding: [0x0c,0xa2,0x1e,0xd5]
4103// CHECK: msr      {{amair_el1|AMAIR_EL1}}, x12             // encoding: [0x0c,0xa3,0x18,0xd5]
4104// CHECK: msr      {{amair_el2|AMAIR_EL2}}, x12             // encoding: [0x0c,0xa3,0x1c,0xd5]
4105// CHECK: msr      {{amair_el3|AMAIR_EL3}}, x12             // encoding: [0x0c,0xa3,0x1e,0xd5]
4106// CHECK: msr      {{vbar_el1|VBAR_EL1}}, x12              // encoding: [0x0c,0xc0,0x18,0xd5]
4107// CHECK: msr      {{vbar_el2|VBAR_EL2}}, x12              // encoding: [0x0c,0xc0,0x1c,0xd5]
4108// CHECK: msr      {{vbar_el3|VBAR_EL3}}, x12              // encoding: [0x0c,0xc0,0x1e,0xd5]
4109// CHECK: msr      {{rmr_el1|RMR_EL1}}, x12               // encoding: [0x4c,0xc0,0x18,0xd5]
4110// CHECK: msr      {{rmr_el2|RMR_EL2}}, x12               // encoding: [0x4c,0xc0,0x1c,0xd5]
4111// CHECK: msr      {{rmr_el3|RMR_EL3}}, x12               // encoding: [0x4c,0xc0,0x1e,0xd5]
4112// CHECK: msr      {{contextidr_el1|CONTEXTIDR_EL1}}, x12        // encoding: [0x2c,0xd0,0x18,0xd5]
4113// CHECK: msr      {{tpidr_el0|TPIDR_EL0}}, x12             // encoding: [0x4c,0xd0,0x1b,0xd5]
4114// CHECK: msr      {{tpidr_el2|TPIDR_EL2}}, x12             // encoding: [0x4c,0xd0,0x1c,0xd5]
4115// CHECK: msr      {{tpidr_el3|TPIDR_EL3}}, x12             // encoding: [0x4c,0xd0,0x1e,0xd5]
4116// CHECK: msr      {{tpidrro_el0|TPIDRRO_EL0}}, x12           // encoding: [0x6c,0xd0,0x1b,0xd5]
4117// CHECK: msr      {{tpidr_el1|TPIDR_EL1}}, x12             // encoding: [0x8c,0xd0,0x18,0xd5]
4118// CHECK: msr      {{cntfrq_el0|CNTFRQ_EL0}}, x12            // encoding: [0x0c,0xe0,0x1b,0xd5]
4119// CHECK: msr      {{cntvoff_el2|CNTVOFF_EL2}}, x12           // encoding: [0x6c,0xe0,0x1c,0xd5]
4120// CHECK: msr      {{cntkctl_el1|CNTKCTL_EL1}}, x12           // encoding: [0x0c,0xe1,0x18,0xd5]
4121// CHECK: msr      {{cnthctl_el2|CNTHCTL_EL2}}, x12           // encoding: [0x0c,0xe1,0x1c,0xd5]
4122// CHECK: msr      {{cntp_tval_el0|CNTP_TVAL_EL0}}, x12         // encoding: [0x0c,0xe2,0x1b,0xd5]
4123// CHECK: msr      {{cnthp_tval_el2|CNTHP_TVAL_EL2}}, x12        // encoding: [0x0c,0xe2,0x1c,0xd5]
4124// CHECK: msr      {{cntps_tval_el1|CNTPS_TVAL_EL1}}, x12        // encoding: [0x0c,0xe2,0x1f,0xd5]
4125// CHECK: msr      {{cntp_ctl_el0|CNTP_CTL_EL0}}, x12          // encoding: [0x2c,0xe2,0x1b,0xd5]
4126// CHECK: msr      {{cnthp_ctl_el2|CNTHP_CTL_EL2}}, x12         // encoding: [0x2c,0xe2,0x1c,0xd5]
4127// CHECK: msr      {{cntps_ctl_el1|CNTPS_CTL_EL1}}, x12         // encoding: [0x2c,0xe2,0x1f,0xd5]
4128// CHECK: msr      {{cntp_cval_el0|CNTP_CVAL_EL0}}, x12         // encoding: [0x4c,0xe2,0x1b,0xd5]
4129// CHECK: msr      {{cnthp_cval_el2|CNTHP_CVAL_EL2}}, x12        // encoding: [0x4c,0xe2,0x1c,0xd5]
4130// CHECK: msr      {{cntps_cval_el1|CNTPS_CVAL_EL1}}, x12        // encoding: [0x4c,0xe2,0x1f,0xd5]
4131// CHECK: msr      {{cntv_tval_el0|CNTV_TVAL_EL0}}, x12         // encoding: [0x0c,0xe3,0x1b,0xd5]
4132// CHECK: msr      {{cntv_ctl_el0|CNTV_CTL_EL0}}, x12          // encoding: [0x2c,0xe3,0x1b,0xd5]
4133// CHECK: msr      {{cntv_cval_el0|CNTV_CVAL_EL0}}, x12         // encoding: [0x4c,0xe3,0x1b,0xd5]
4134// CHECK: msr      {{pmevcntr0_el0|PMEVCNTR0_EL0}}, x12         // encoding: [0x0c,0xe8,0x1b,0xd5]
4135// CHECK: msr      {{pmevcntr1_el0|PMEVCNTR1_EL0}}, x12         // encoding: [0x2c,0xe8,0x1b,0xd5]
4136// CHECK: msr      {{pmevcntr2_el0|PMEVCNTR2_EL0}}, x12         // encoding: [0x4c,0xe8,0x1b,0xd5]
4137// CHECK: msr      {{pmevcntr3_el0|PMEVCNTR3_EL0}}, x12         // encoding: [0x6c,0xe8,0x1b,0xd5]
4138// CHECK: msr      {{pmevcntr4_el0|PMEVCNTR4_EL0}}, x12         // encoding: [0x8c,0xe8,0x1b,0xd5]
4139// CHECK: msr      {{pmevcntr5_el0|PMEVCNTR5_EL0}}, x12         // encoding: [0xac,0xe8,0x1b,0xd5]
4140// CHECK: msr      {{pmevcntr6_el0|PMEVCNTR6_EL0}}, x12         // encoding: [0xcc,0xe8,0x1b,0xd5]
4141// CHECK: msr      {{pmevcntr7_el0|PMEVCNTR7_EL0}}, x12         // encoding: [0xec,0xe8,0x1b,0xd5]
4142// CHECK: msr      {{pmevcntr8_el0|PMEVCNTR8_EL0}}, x12         // encoding: [0x0c,0xe9,0x1b,0xd5]
4143// CHECK: msr      {{pmevcntr9_el0|PMEVCNTR9_EL0}}, x12         // encoding: [0x2c,0xe9,0x1b,0xd5]
4144// CHECK: msr      {{pmevcntr10_el0|PMEVCNTR10_EL0}}, x12        // encoding: [0x4c,0xe9,0x1b,0xd5]
4145// CHECK: msr      {{pmevcntr11_el0|PMEVCNTR11_EL0}}, x12        // encoding: [0x6c,0xe9,0x1b,0xd5]
4146// CHECK: msr      {{pmevcntr12_el0|PMEVCNTR12_EL0}}, x12        // encoding: [0x8c,0xe9,0x1b,0xd5]
4147// CHECK: msr      {{pmevcntr13_el0|PMEVCNTR13_EL0}}, x12        // encoding: [0xac,0xe9,0x1b,0xd5]
4148// CHECK: msr      {{pmevcntr14_el0|PMEVCNTR14_EL0}}, x12        // encoding: [0xcc,0xe9,0x1b,0xd5]
4149// CHECK: msr      {{pmevcntr15_el0|PMEVCNTR15_EL0}}, x12        // encoding: [0xec,0xe9,0x1b,0xd5]
4150// CHECK: msr      {{pmevcntr16_el0|PMEVCNTR16_EL0}}, x12        // encoding: [0x0c,0xea,0x1b,0xd5]
4151// CHECK: msr      {{pmevcntr17_el0|PMEVCNTR17_EL0}}, x12        // encoding: [0x2c,0xea,0x1b,0xd5]
4152// CHECK: msr      {{pmevcntr18_el0|PMEVCNTR18_EL0}}, x12        // encoding: [0x4c,0xea,0x1b,0xd5]
4153// CHECK: msr      {{pmevcntr19_el0|PMEVCNTR19_EL0}}, x12        // encoding: [0x6c,0xea,0x1b,0xd5]
4154// CHECK: msr      {{pmevcntr20_el0|PMEVCNTR20_EL0}}, x12        // encoding: [0x8c,0xea,0x1b,0xd5]
4155// CHECK: msr      {{pmevcntr21_el0|PMEVCNTR21_EL0}}, x12        // encoding: [0xac,0xea,0x1b,0xd5]
4156// CHECK: msr      {{pmevcntr22_el0|PMEVCNTR22_EL0}}, x12        // encoding: [0xcc,0xea,0x1b,0xd5]
4157// CHECK: msr      {{pmevcntr23_el0|PMEVCNTR23_EL0}}, x12        // encoding: [0xec,0xea,0x1b,0xd5]
4158// CHECK: msr      {{pmevcntr24_el0|PMEVCNTR24_EL0}}, x12        // encoding: [0x0c,0xeb,0x1b,0xd5]
4159// CHECK: msr      {{pmevcntr25_el0|PMEVCNTR25_EL0}}, x12        // encoding: [0x2c,0xeb,0x1b,0xd5]
4160// CHECK: msr      {{pmevcntr26_el0|PMEVCNTR26_EL0}}, x12        // encoding: [0x4c,0xeb,0x1b,0xd5]
4161// CHECK: msr      {{pmevcntr27_el0|PMEVCNTR27_EL0}}, x12        // encoding: [0x6c,0xeb,0x1b,0xd5]
4162// CHECK: msr      {{pmevcntr28_el0|PMEVCNTR28_EL0}}, x12        // encoding: [0x8c,0xeb,0x1b,0xd5]
4163// CHECK: msr      {{pmevcntr29_el0|PMEVCNTR29_EL0}}, x12        // encoding: [0xac,0xeb,0x1b,0xd5]
4164// CHECK: msr      {{pmevcntr30_el0|PMEVCNTR30_EL0}}, x12        // encoding: [0xcc,0xeb,0x1b,0xd5]
4165// CHECK: msr      {{pmccfiltr_el0|PMCCFILTR_EL0}}, x12         // encoding: [0xec,0xef,0x1b,0xd5]
4166// CHECK: msr      {{pmevtyper0_el0|PMEVTYPER0_EL0}}, x12        // encoding: [0x0c,0xec,0x1b,0xd5]
4167// CHECK: msr      {{pmevtyper1_el0|PMEVTYPER1_EL0}}, x12        // encoding: [0x2c,0xec,0x1b,0xd5]
4168// CHECK: msr      {{pmevtyper2_el0|PMEVTYPER2_EL0}}, x12        // encoding: [0x4c,0xec,0x1b,0xd5]
4169// CHECK: msr      {{pmevtyper3_el0|PMEVTYPER3_EL0}}, x12        // encoding: [0x6c,0xec,0x1b,0xd5]
4170// CHECK: msr      {{pmevtyper4_el0|PMEVTYPER4_EL0}}, x12        // encoding: [0x8c,0xec,0x1b,0xd5]
4171// CHECK: msr      {{pmevtyper5_el0|PMEVTYPER5_EL0}}, x12        // encoding: [0xac,0xec,0x1b,0xd5]
4172// CHECK: msr      {{pmevtyper6_el0|PMEVTYPER6_EL0}}, x12        // encoding: [0xcc,0xec,0x1b,0xd5]
4173// CHECK: msr      {{pmevtyper7_el0|PMEVTYPER7_EL0}}, x12        // encoding: [0xec,0xec,0x1b,0xd5]
4174// CHECK: msr      {{pmevtyper8_el0|PMEVTYPER8_EL0}}, x12        // encoding: [0x0c,0xed,0x1b,0xd5]
4175// CHECK: msr      {{pmevtyper9_el0|PMEVTYPER9_EL0}}, x12        // encoding: [0x2c,0xed,0x1b,0xd5]
4176// CHECK: msr      {{pmevtyper10_el0|PMEVTYPER10_EL0}}, x12       // encoding: [0x4c,0xed,0x1b,0xd5]
4177// CHECK: msr      {{pmevtyper11_el0|PMEVTYPER11_EL0}}, x12       // encoding: [0x6c,0xed,0x1b,0xd5]
4178// CHECK: msr      {{pmevtyper12_el0|PMEVTYPER12_EL0}}, x12       // encoding: [0x8c,0xed,0x1b,0xd5]
4179// CHECK: msr      {{pmevtyper13_el0|PMEVTYPER13_EL0}}, x12       // encoding: [0xac,0xed,0x1b,0xd5]
4180// CHECK: msr      {{pmevtyper14_el0|PMEVTYPER14_EL0}}, x12       // encoding: [0xcc,0xed,0x1b,0xd5]
4181// CHECK: msr      {{pmevtyper15_el0|PMEVTYPER15_EL0}}, x12       // encoding: [0xec,0xed,0x1b,0xd5]
4182// CHECK: msr      {{pmevtyper16_el0|PMEVTYPER16_EL0}}, x12       // encoding: [0x0c,0xee,0x1b,0xd5]
4183// CHECK: msr      {{pmevtyper17_el0|PMEVTYPER17_EL0}}, x12       // encoding: [0x2c,0xee,0x1b,0xd5]
4184// CHECK: msr      {{pmevtyper18_el0|PMEVTYPER18_EL0}}, x12       // encoding: [0x4c,0xee,0x1b,0xd5]
4185// CHECK: msr      {{pmevtyper19_el0|PMEVTYPER19_EL0}}, x12       // encoding: [0x6c,0xee,0x1b,0xd5]
4186// CHECK: msr      {{pmevtyper20_el0|PMEVTYPER20_EL0}}, x12       // encoding: [0x8c,0xee,0x1b,0xd5]
4187// CHECK: msr      {{pmevtyper21_el0|PMEVTYPER21_EL0}}, x12       // encoding: [0xac,0xee,0x1b,0xd5]
4188// CHECK: msr      {{pmevtyper22_el0|PMEVTYPER22_EL0}}, x12       // encoding: [0xcc,0xee,0x1b,0xd5]
4189// CHECK: msr      {{pmevtyper23_el0|PMEVTYPER23_EL0}}, x12       // encoding: [0xec,0xee,0x1b,0xd5]
4190// CHECK: msr      {{pmevtyper24_el0|PMEVTYPER24_EL0}}, x12       // encoding: [0x0c,0xef,0x1b,0xd5]
4191// CHECK: msr      {{pmevtyper25_el0|PMEVTYPER25_EL0}}, x12       // encoding: [0x2c,0xef,0x1b,0xd5]
4192// CHECK: msr      {{pmevtyper26_el0|PMEVTYPER26_EL0}}, x12       // encoding: [0x4c,0xef,0x1b,0xd5]
4193// CHECK: msr      {{pmevtyper27_el0|PMEVTYPER27_EL0}}, x12       // encoding: [0x6c,0xef,0x1b,0xd5]
4194// CHECK: msr      {{pmevtyper28_el0|PMEVTYPER28_EL0}}, x12       // encoding: [0x8c,0xef,0x1b,0xd5]
4195// CHECK: msr      {{pmevtyper29_el0|PMEVTYPER29_EL0}}, x12       // encoding: [0xac,0xef,0x1b,0xd5]
4196// CHECK: msr      {{pmevtyper30_el0|PMEVTYPER30_EL0}}, x12       // encoding: [0xcc,0xef,0x1b,0xd5]
4197
4198	mrs x9, TEECR32_EL1
4199	mrs x9, OSDTRRX_EL1
4200	mrs x9, MDCCSR_EL0
4201	mrs x9, MDCCINT_EL1
4202	mrs x9, MDSCR_EL1
4203	mrs x9, OSDTRTX_EL1
4204	mrs x9, DBGDTR_EL0
4205	mrs x9, DBGDTRRX_EL0
4206	mrs x9, OSECCR_EL1
4207	mrs x9, DBGVCR32_EL2
4208	mrs x9, DBGBVR0_EL1
4209	mrs x9, DBGBVR1_EL1
4210	mrs x9, DBGBVR2_EL1
4211	mrs x9, DBGBVR3_EL1
4212	mrs x9, DBGBVR4_EL1
4213	mrs x9, DBGBVR5_EL1
4214	mrs x9, DBGBVR6_EL1
4215	mrs x9, DBGBVR7_EL1
4216	mrs x9, DBGBVR8_EL1
4217	mrs x9, DBGBVR9_EL1
4218	mrs x9, DBGBVR10_EL1
4219	mrs x9, DBGBVR11_EL1
4220	mrs x9, DBGBVR12_EL1
4221	mrs x9, DBGBVR13_EL1
4222	mrs x9, DBGBVR14_EL1
4223	mrs x9, DBGBVR15_EL1
4224	mrs x9, DBGBCR0_EL1
4225	mrs x9, DBGBCR1_EL1
4226	mrs x9, DBGBCR2_EL1
4227	mrs x9, DBGBCR3_EL1
4228	mrs x9, DBGBCR4_EL1
4229	mrs x9, DBGBCR5_EL1
4230	mrs x9, DBGBCR6_EL1
4231	mrs x9, DBGBCR7_EL1
4232	mrs x9, DBGBCR8_EL1
4233	mrs x9, DBGBCR9_EL1
4234	mrs x9, DBGBCR10_EL1
4235	mrs x9, DBGBCR11_EL1
4236	mrs x9, DBGBCR12_EL1
4237	mrs x9, DBGBCR13_EL1
4238	mrs x9, DBGBCR14_EL1
4239	mrs x9, DBGBCR15_EL1
4240	mrs x9, DBGWVR0_EL1
4241	mrs x9, DBGWVR1_EL1
4242	mrs x9, DBGWVR2_EL1
4243	mrs x9, DBGWVR3_EL1
4244	mrs x9, DBGWVR4_EL1
4245	mrs x9, DBGWVR5_EL1
4246	mrs x9, DBGWVR6_EL1
4247	mrs x9, DBGWVR7_EL1
4248	mrs x9, DBGWVR8_EL1
4249	mrs x9, DBGWVR9_EL1
4250	mrs x9, DBGWVR10_EL1
4251	mrs x9, DBGWVR11_EL1
4252	mrs x9, DBGWVR12_EL1
4253	mrs x9, DBGWVR13_EL1
4254	mrs x9, DBGWVR14_EL1
4255	mrs x9, DBGWVR15_EL1
4256	mrs x9, DBGWCR0_EL1
4257	mrs x9, DBGWCR1_EL1
4258	mrs x9, DBGWCR2_EL1
4259	mrs x9, DBGWCR3_EL1
4260	mrs x9, DBGWCR4_EL1
4261	mrs x9, DBGWCR5_EL1
4262	mrs x9, DBGWCR6_EL1
4263	mrs x9, DBGWCR7_EL1
4264	mrs x9, DBGWCR8_EL1
4265	mrs x9, DBGWCR9_EL1
4266	mrs x9, DBGWCR10_EL1
4267	mrs x9, DBGWCR11_EL1
4268	mrs x9, DBGWCR12_EL1
4269	mrs x9, DBGWCR13_EL1
4270	mrs x9, DBGWCR14_EL1
4271	mrs x9, DBGWCR15_EL1
4272	mrs x9, MDRAR_EL1
4273	mrs x9, TEEHBR32_EL1
4274	mrs x9, OSLSR_EL1
4275	mrs x9, OSDLR_EL1
4276	mrs x9, DBGPRCR_EL1
4277	mrs x9, DBGCLAIMSET_EL1
4278	mrs x9, DBGCLAIMCLR_EL1
4279	mrs x9, DBGAUTHSTATUS_EL1
4280	mrs x9, MIDR_EL1
4281	mrs x9, CCSIDR_EL1
4282	mrs x9, CSSELR_EL1
4283	mrs x9, VPIDR_EL2
4284	mrs x9, CLIDR_EL1
4285	mrs x9, CTR_EL0
4286	mrs x9, MPIDR_EL1
4287	mrs x9, VMPIDR_EL2
4288	mrs x9, REVIDR_EL1
4289	mrs x9, AIDR_EL1
4290	mrs x9, DCZID_EL0
4291	mrs x9, ID_PFR0_EL1
4292	mrs x9, ID_PFR1_EL1
4293	mrs x9, ID_DFR0_EL1
4294	mrs x9, ID_AFR0_EL1
4295	mrs x9, ID_MMFR0_EL1
4296	mrs x9, ID_MMFR1_EL1
4297	mrs x9, ID_MMFR2_EL1
4298	mrs x9, ID_MMFR3_EL1
4299	mrs x9, ID_ISAR0_EL1
4300	mrs x9, ID_ISAR1_EL1
4301	mrs x9, ID_ISAR2_EL1
4302	mrs x9, ID_ISAR3_EL1
4303	mrs x9, ID_ISAR4_EL1
4304	mrs x9, ID_ISAR5_EL1
4305	mrs x9, MVFR0_EL1
4306	mrs x9, MVFR1_EL1
4307	mrs x9, MVFR2_EL1
4308	mrs x9, ID_AA64PFR0_EL1
4309	mrs x9, ID_AA64PFR1_EL1
4310	mrs x9, ID_AA64DFR0_EL1
4311	mrs x9, ID_AA64DFR1_EL1
4312	mrs x9, ID_AA64AFR0_EL1
4313	mrs x9, ID_AA64AFR1_EL1
4314	mrs x9, ID_AA64ISAR0_EL1
4315	mrs x9, ID_AA64ISAR1_EL1
4316	mrs x9, ID_AA64MMFR0_EL1
4317	mrs x9, ID_AA64MMFR1_EL1
4318	mrs x9, SCTLR_EL1
4319	mrs x9, SCTLR_EL2
4320	mrs x9, SCTLR_EL3
4321	mrs x9, ACTLR_EL1
4322	mrs x9, ACTLR_EL2
4323	mrs x9, ACTLR_EL3
4324	mrs x9, CPACR_EL1
4325	mrs x9, HCR_EL2
4326	mrs x9, SCR_EL3
4327	mrs x9, MDCR_EL2
4328	mrs x9, SDER32_EL3
4329	mrs x9, CPTR_EL2
4330	mrs x9, CPTR_EL3
4331	mrs x9, HSTR_EL2
4332	mrs x9, HACR_EL2
4333	mrs x9, MDCR_EL3
4334	mrs x9, TTBR0_EL1
4335	mrs x9, TTBR0_EL2
4336	mrs x9, TTBR0_EL3
4337	mrs x9, TTBR1_EL1
4338	mrs x9, TCR_EL1
4339	mrs x9, TCR_EL2
4340	mrs x9, TCR_EL3
4341	mrs x9, VTTBR_EL2
4342	mrs x9, VTCR_EL2
4343	mrs x9, DACR32_EL2
4344	mrs x9, SPSR_EL1
4345	mrs x9, SPSR_EL2
4346	mrs x9, SPSR_EL3
4347	mrs x9, ELR_EL1
4348	mrs x9, ELR_EL2
4349	mrs x9, ELR_EL3
4350	mrs x9, SP_EL0
4351	mrs x9, SP_EL1
4352	mrs x9, SP_EL2
4353	mrs x9, SPSel
4354	mrs x9, NZCV
4355	mrs x9, DAIF
4356	mrs x9, CurrentEL
4357	mrs x9, SPSR_irq
4358	mrs x9, SPSR_abt
4359	mrs x9, SPSR_und
4360	mrs x9, SPSR_fiq
4361	mrs x9, FPCR
4362	mrs x9, FPSR
4363	mrs x9, DSPSR_EL0
4364	mrs x9, DLR_EL0
4365	mrs x9, IFSR32_EL2
4366	mrs x9, AFSR0_EL1
4367	mrs x9, AFSR0_EL2
4368	mrs x9, AFSR0_EL3
4369	mrs x9, AFSR1_EL1
4370	mrs x9, AFSR1_EL2
4371	mrs x9, AFSR1_EL3
4372	mrs x9, ESR_EL1
4373	mrs x9, ESR_EL2
4374	mrs x9, ESR_EL3
4375	mrs x9, FPEXC32_EL2
4376	mrs x9, FAR_EL1
4377	mrs x9, FAR_EL2
4378	mrs x9, FAR_EL3
4379	mrs x9, HPFAR_EL2
4380	mrs x9, PAR_EL1
4381	mrs x9, PMCR_EL0
4382	mrs x9, PMCNTENSET_EL0
4383	mrs x9, PMCNTENCLR_EL0
4384	mrs x9, PMOVSCLR_EL0
4385	mrs x9, PMSELR_EL0
4386	mrs x9, PMCEID0_EL0
4387	mrs x9, PMCEID1_EL0
4388	mrs x9, PMCCNTR_EL0
4389	mrs x9, PMXEVTYPER_EL0
4390	mrs x9, PMXEVCNTR_EL0
4391	mrs x9, PMUSERENR_EL0
4392	mrs x9, PMINTENSET_EL1
4393	mrs x9, PMINTENCLR_EL1
4394	mrs x9, PMOVSSET_EL0
4395	mrs x9, MAIR_EL1
4396	mrs x9, MAIR_EL2
4397	mrs x9, MAIR_EL3
4398	mrs x9, AMAIR_EL1
4399	mrs x9, AMAIR_EL2
4400	mrs x9, AMAIR_EL3
4401	mrs x9, VBAR_EL1
4402	mrs x9, VBAR_EL2
4403	mrs x9, VBAR_EL3
4404	mrs x9, RVBAR_EL1
4405	mrs x9, RVBAR_EL2
4406	mrs x9, RVBAR_EL3
4407	mrs x9, RMR_EL1
4408	mrs x9, RMR_EL2
4409	mrs x9, RMR_EL3
4410	mrs x9, ISR_EL1
4411	mrs x9, CONTEXTIDR_EL1
4412	mrs x9, TPIDR_EL0
4413	mrs x9, TPIDR_EL2
4414	mrs x9, TPIDR_EL3
4415	mrs x9, TPIDRRO_EL0
4416	mrs x9, TPIDR_EL1
4417	mrs x9, CNTFRQ_EL0
4418	mrs x9, CNTPCT_EL0
4419	mrs x9, CNTVCT_EL0
4420	mrs x9, CNTVOFF_EL2
4421	mrs x9, CNTKCTL_EL1
4422	mrs x9, CNTHCTL_EL2
4423	mrs x9, CNTP_TVAL_EL0
4424	mrs x9, CNTHP_TVAL_EL2
4425	mrs x9, CNTPS_TVAL_EL1
4426	mrs x9, CNTP_CTL_EL0
4427	mrs x9, CNTHP_CTL_EL2
4428	mrs x9, CNTPS_CTL_EL1
4429	mrs x9, CNTP_CVAL_EL0
4430	mrs x9, CNTHP_CVAL_EL2
4431	mrs x9, CNTPS_CVAL_EL1
4432	mrs x9, CNTV_TVAL_EL0
4433	mrs x9, CNTV_CTL_EL0
4434	mrs x9, CNTV_CVAL_EL0
4435	mrs x9, PMEVCNTR0_EL0
4436	mrs x9, PMEVCNTR1_EL0
4437	mrs x9, PMEVCNTR2_EL0
4438	mrs x9, PMEVCNTR3_EL0
4439	mrs x9, PMEVCNTR4_EL0
4440	mrs x9, PMEVCNTR5_EL0
4441	mrs x9, PMEVCNTR6_EL0
4442	mrs x9, PMEVCNTR7_EL0
4443	mrs x9, PMEVCNTR8_EL0
4444	mrs x9, PMEVCNTR9_EL0
4445	mrs x9, PMEVCNTR10_EL0
4446	mrs x9, PMEVCNTR11_EL0
4447	mrs x9, PMEVCNTR12_EL0
4448	mrs x9, PMEVCNTR13_EL0
4449	mrs x9, PMEVCNTR14_EL0
4450	mrs x9, PMEVCNTR15_EL0
4451	mrs x9, PMEVCNTR16_EL0
4452	mrs x9, PMEVCNTR17_EL0
4453	mrs x9, PMEVCNTR18_EL0
4454	mrs x9, PMEVCNTR19_EL0
4455	mrs x9, PMEVCNTR20_EL0
4456	mrs x9, PMEVCNTR21_EL0
4457	mrs x9, PMEVCNTR22_EL0
4458	mrs x9, PMEVCNTR23_EL0
4459	mrs x9, PMEVCNTR24_EL0
4460	mrs x9, PMEVCNTR25_EL0
4461	mrs x9, PMEVCNTR26_EL0
4462	mrs x9, PMEVCNTR27_EL0
4463	mrs x9, PMEVCNTR28_EL0
4464	mrs x9, PMEVCNTR29_EL0
4465	mrs x9, PMEVCNTR30_EL0
4466	mrs x9, PMCCFILTR_EL0
4467	mrs x9, PMEVTYPER0_EL0
4468	mrs x9, PMEVTYPER1_EL0
4469	mrs x9, PMEVTYPER2_EL0
4470	mrs x9, PMEVTYPER3_EL0
4471	mrs x9, PMEVTYPER4_EL0
4472	mrs x9, PMEVTYPER5_EL0
4473	mrs x9, PMEVTYPER6_EL0
4474	mrs x9, PMEVTYPER7_EL0
4475	mrs x9, PMEVTYPER8_EL0
4476	mrs x9, PMEVTYPER9_EL0
4477	mrs x9, PMEVTYPER10_EL0
4478	mrs x9, PMEVTYPER11_EL0
4479	mrs x9, PMEVTYPER12_EL0
4480	mrs x9, PMEVTYPER13_EL0
4481	mrs x9, PMEVTYPER14_EL0
4482	mrs x9, PMEVTYPER15_EL0
4483	mrs x9, PMEVTYPER16_EL0
4484	mrs x9, PMEVTYPER17_EL0
4485	mrs x9, PMEVTYPER18_EL0
4486	mrs x9, PMEVTYPER19_EL0
4487	mrs x9, PMEVTYPER20_EL0
4488	mrs x9, PMEVTYPER21_EL0
4489	mrs x9, PMEVTYPER22_EL0
4490	mrs x9, PMEVTYPER23_EL0
4491	mrs x9, PMEVTYPER24_EL0
4492	mrs x9, PMEVTYPER25_EL0
4493	mrs x9, PMEVTYPER26_EL0
4494	mrs x9, PMEVTYPER27_EL0
4495	mrs x9, PMEVTYPER28_EL0
4496	mrs x9, PMEVTYPER29_EL0
4497	mrs x9, PMEVTYPER30_EL0
4498// CHECK: mrs      x9, {{teecr32_el1|TEECR32_EL1}}            // encoding: [0x09,0x00,0x32,0xd5]
4499// CHECK: mrs      x9, {{osdtrrx_el1|OSDTRRX_EL1}}            // encoding: [0x49,0x00,0x30,0xd5]
4500// CHECK: mrs      x9, {{mdccsr_el0|MDCCSR_EL0}}             // encoding: [0x09,0x01,0x33,0xd5]
4501// CHECK: mrs      x9, {{mdccint_el1|MDCCINT_EL1}}            // encoding: [0x09,0x02,0x30,0xd5]
4502// CHECK: mrs      x9, {{mdscr_el1|MDSCR_EL1}}              // encoding: [0x49,0x02,0x30,0xd5]
4503// CHECK: mrs      x9, {{osdtrtx_el1|OSDTRTX_EL1}}            // encoding: [0x49,0x03,0x30,0xd5]
4504// CHECK: mrs      x9, {{dbgdtr_el0|DBGDTR_EL0}}             // encoding: [0x09,0x04,0x33,0xd5]
4505// CHECK: mrs      x9, {{dbgdtrrx_el0|DBGDTRRX_EL0}}           // encoding: [0x09,0x05,0x33,0xd5]
4506// CHECK: mrs      x9, {{oseccr_el1|OSECCR_EL1}}             // encoding: [0x49,0x06,0x30,0xd5]
4507// CHECK: mrs      x9, {{dbgvcr32_el2|DBGVCR32_EL2}}           // encoding: [0x09,0x07,0x34,0xd5]
4508// CHECK: mrs      x9, {{dbgbvr0_el1|DBGBVR0_EL1}}            // encoding: [0x89,0x00,0x30,0xd5]
4509// CHECK: mrs      x9, {{dbgbvr1_el1|DBGBVR1_EL1}}            // encoding: [0x89,0x01,0x30,0xd5]
4510// CHECK: mrs      x9, {{dbgbvr2_el1|DBGBVR2_EL1}}            // encoding: [0x89,0x02,0x30,0xd5]
4511// CHECK: mrs      x9, {{dbgbvr3_el1|DBGBVR3_EL1}}            // encoding: [0x89,0x03,0x30,0xd5]
4512// CHECK: mrs      x9, {{dbgbvr4_el1|DBGBVR4_EL1}}            // encoding: [0x89,0x04,0x30,0xd5]
4513// CHECK: mrs      x9, {{dbgbvr5_el1|DBGBVR5_EL1}}            // encoding: [0x89,0x05,0x30,0xd5]
4514// CHECK: mrs      x9, {{dbgbvr6_el1|DBGBVR6_EL1}}            // encoding: [0x89,0x06,0x30,0xd5]
4515// CHECK: mrs      x9, {{dbgbvr7_el1|DBGBVR7_EL1}}            // encoding: [0x89,0x07,0x30,0xd5]
4516// CHECK: mrs      x9, {{dbgbvr8_el1|DBGBVR8_EL1}}            // encoding: [0x89,0x08,0x30,0xd5]
4517// CHECK: mrs      x9, {{dbgbvr9_el1|DBGBVR9_EL1}}            // encoding: [0x89,0x09,0x30,0xd5]
4518// CHECK: mrs      x9, {{dbgbvr10_el1|DBGBVR10_EL1}}           // encoding: [0x89,0x0a,0x30,0xd5]
4519// CHECK: mrs      x9, {{dbgbvr11_el1|DBGBVR11_EL1}}           // encoding: [0x89,0x0b,0x30,0xd5]
4520// CHECK: mrs      x9, {{dbgbvr12_el1|DBGBVR12_EL1}}           // encoding: [0x89,0x0c,0x30,0xd5]
4521// CHECK: mrs      x9, {{dbgbvr13_el1|DBGBVR13_EL1}}           // encoding: [0x89,0x0d,0x30,0xd5]
4522// CHECK: mrs      x9, {{dbgbvr14_el1|DBGBVR14_EL1}}           // encoding: [0x89,0x0e,0x30,0xd5]
4523// CHECK: mrs      x9, {{dbgbvr15_el1|DBGBVR15_EL1}}           // encoding: [0x89,0x0f,0x30,0xd5]
4524// CHECK: mrs      x9, {{dbgbcr0_el1|DBGBCR0_EL1}}            // encoding: [0xa9,0x00,0x30,0xd5]
4525// CHECK: mrs      x9, {{dbgbcr1_el1|DBGBCR1_EL1}}            // encoding: [0xa9,0x01,0x30,0xd5]
4526// CHECK: mrs      x9, {{dbgbcr2_el1|DBGBCR2_EL1}}            // encoding: [0xa9,0x02,0x30,0xd5]
4527// CHECK: mrs      x9, {{dbgbcr3_el1|DBGBCR3_EL1}}            // encoding: [0xa9,0x03,0x30,0xd5]
4528// CHECK: mrs      x9, {{dbgbcr4_el1|DBGBCR4_EL1}}            // encoding: [0xa9,0x04,0x30,0xd5]
4529// CHECK: mrs      x9, {{dbgbcr5_el1|DBGBCR5_EL1}}            // encoding: [0xa9,0x05,0x30,0xd5]
4530// CHECK: mrs      x9, {{dbgbcr6_el1|DBGBCR6_EL1}}            // encoding: [0xa9,0x06,0x30,0xd5]
4531// CHECK: mrs      x9, {{dbgbcr7_el1|DBGBCR7_EL1}}            // encoding: [0xa9,0x07,0x30,0xd5]
4532// CHECK: mrs      x9, {{dbgbcr8_el1|DBGBCR8_EL1}}            // encoding: [0xa9,0x08,0x30,0xd5]
4533// CHECK: mrs      x9, {{dbgbcr9_el1|DBGBCR9_EL1}}            // encoding: [0xa9,0x09,0x30,0xd5]
4534// CHECK: mrs      x9, {{dbgbcr10_el1|DBGBCR10_EL1}}           // encoding: [0xa9,0x0a,0x30,0xd5]
4535// CHECK: mrs      x9, {{dbgbcr11_el1|DBGBCR11_EL1}}           // encoding: [0xa9,0x0b,0x30,0xd5]
4536// CHECK: mrs      x9, {{dbgbcr12_el1|DBGBCR12_EL1}}           // encoding: [0xa9,0x0c,0x30,0xd5]
4537// CHECK: mrs      x9, {{dbgbcr13_el1|DBGBCR13_EL1}}           // encoding: [0xa9,0x0d,0x30,0xd5]
4538// CHECK: mrs      x9, {{dbgbcr14_el1|DBGBCR14_EL1}}           // encoding: [0xa9,0x0e,0x30,0xd5]
4539// CHECK: mrs      x9, {{dbgbcr15_el1|DBGBCR15_EL1}}           // encoding: [0xa9,0x0f,0x30,0xd5]
4540// CHECK: mrs      x9, {{dbgwvr0_el1|DBGWVR0_EL1}}            // encoding: [0xc9,0x00,0x30,0xd5]
4541// CHECK: mrs      x9, {{dbgwvr1_el1|DBGWVR1_EL1}}            // encoding: [0xc9,0x01,0x30,0xd5]
4542// CHECK: mrs      x9, {{dbgwvr2_el1|DBGWVR2_EL1}}            // encoding: [0xc9,0x02,0x30,0xd5]
4543// CHECK: mrs      x9, {{dbgwvr3_el1|DBGWVR3_EL1}}            // encoding: [0xc9,0x03,0x30,0xd5]
4544// CHECK: mrs      x9, {{dbgwvr4_el1|DBGWVR4_EL1}}            // encoding: [0xc9,0x04,0x30,0xd5]
4545// CHECK: mrs      x9, {{dbgwvr5_el1|DBGWVR5_EL1}}            // encoding: [0xc9,0x05,0x30,0xd5]
4546// CHECK: mrs      x9, {{dbgwvr6_el1|DBGWVR6_EL1}}            // encoding: [0xc9,0x06,0x30,0xd5]
4547// CHECK: mrs      x9, {{dbgwvr7_el1|DBGWVR7_EL1}}            // encoding: [0xc9,0x07,0x30,0xd5]
4548// CHECK: mrs      x9, {{dbgwvr8_el1|DBGWVR8_EL1}}            // encoding: [0xc9,0x08,0x30,0xd5]
4549// CHECK: mrs      x9, {{dbgwvr9_el1|DBGWVR9_EL1}}            // encoding: [0xc9,0x09,0x30,0xd5]
4550// CHECK: mrs      x9, {{dbgwvr10_el1|DBGWVR10_EL1}}           // encoding: [0xc9,0x0a,0x30,0xd5]
4551// CHECK: mrs      x9, {{dbgwvr11_el1|DBGWVR11_EL1}}           // encoding: [0xc9,0x0b,0x30,0xd5]
4552// CHECK: mrs      x9, {{dbgwvr12_el1|DBGWVR12_EL1}}           // encoding: [0xc9,0x0c,0x30,0xd5]
4553// CHECK: mrs      x9, {{dbgwvr13_el1|DBGWVR13_EL1}}           // encoding: [0xc9,0x0d,0x30,0xd5]
4554// CHECK: mrs      x9, {{dbgwvr14_el1|DBGWVR14_EL1}}           // encoding: [0xc9,0x0e,0x30,0xd5]
4555// CHECK: mrs      x9, {{dbgwvr15_el1|DBGWVR15_EL1}}           // encoding: [0xc9,0x0f,0x30,0xd5]
4556// CHECK: mrs      x9, {{dbgwcr0_el1|DBGWCR0_EL1}}            // encoding: [0xe9,0x00,0x30,0xd5]
4557// CHECK: mrs      x9, {{dbgwcr1_el1|DBGWCR1_EL1}}            // encoding: [0xe9,0x01,0x30,0xd5]
4558// CHECK: mrs      x9, {{dbgwcr2_el1|DBGWCR2_EL1}}            // encoding: [0xe9,0x02,0x30,0xd5]
4559// CHECK: mrs      x9, {{dbgwcr3_el1|DBGWCR3_EL1}}            // encoding: [0xe9,0x03,0x30,0xd5]
4560// CHECK: mrs      x9, {{dbgwcr4_el1|DBGWCR4_EL1}}            // encoding: [0xe9,0x04,0x30,0xd5]
4561// CHECK: mrs      x9, {{dbgwcr5_el1|DBGWCR5_EL1}}            // encoding: [0xe9,0x05,0x30,0xd5]
4562// CHECK: mrs      x9, {{dbgwcr6_el1|DBGWCR6_EL1}}            // encoding: [0xe9,0x06,0x30,0xd5]
4563// CHECK: mrs      x9, {{dbgwcr7_el1|DBGWCR7_EL1}}            // encoding: [0xe9,0x07,0x30,0xd5]
4564// CHECK: mrs      x9, {{dbgwcr8_el1|DBGWCR8_EL1}}            // encoding: [0xe9,0x08,0x30,0xd5]
4565// CHECK: mrs      x9, {{dbgwcr9_el1|DBGWCR9_EL1}}            // encoding: [0xe9,0x09,0x30,0xd5]
4566// CHECK: mrs      x9, {{dbgwcr10_el1|DBGWCR10_EL1}}           // encoding: [0xe9,0x0a,0x30,0xd5]
4567// CHECK: mrs      x9, {{dbgwcr11_el1|DBGWCR11_EL1}}           // encoding: [0xe9,0x0b,0x30,0xd5]
4568// CHECK: mrs      x9, {{dbgwcr12_el1|DBGWCR12_EL1}}           // encoding: [0xe9,0x0c,0x30,0xd5]
4569// CHECK: mrs      x9, {{dbgwcr13_el1|DBGWCR13_EL1}}           // encoding: [0xe9,0x0d,0x30,0xd5]
4570// CHECK: mrs      x9, {{dbgwcr14_el1|DBGWCR14_EL1}}           // encoding: [0xe9,0x0e,0x30,0xd5]
4571// CHECK: mrs      x9, {{dbgwcr15_el1|DBGWCR15_EL1}}           // encoding: [0xe9,0x0f,0x30,0xd5]
4572// CHECK: mrs      x9, {{mdrar_el1|MDRAR_EL1}}              // encoding: [0x09,0x10,0x30,0xd5]
4573// CHECK: mrs      x9, {{teehbr32_el1|TEEHBR32_EL1}}           // encoding: [0x09,0x10,0x32,0xd5]
4574// CHECK: mrs      x9, {{oslsr_el1|OSLSR_EL1}}              // encoding: [0x89,0x11,0x30,0xd5]
4575// CHECK: mrs      x9, {{osdlr_el1|OSDLR_EL1}}              // encoding: [0x89,0x13,0x30,0xd5]
4576// CHECK: mrs      x9, {{dbgprcr_el1|DBGPRCR_EL1}}            // encoding: [0x89,0x14,0x30,0xd5]
4577// CHECK: mrs      x9, {{dbgclaimset_el1|DBGCLAIMSET_EL1}}        // encoding: [0xc9,0x78,0x30,0xd5]
4578// CHECK: mrs      x9, {{dbgclaimclr_el1|DBGCLAIMCLR_EL1}}        // encoding: [0xc9,0x79,0x30,0xd5]
4579// CHECK: mrs      x9, {{dbgauthstatus_el1|DBGAUTHSTATUS_EL1}}      // encoding: [0xc9,0x7e,0x30,0xd5]
4580// CHECK: mrs      x9, {{midr_el1|MIDR_EL1}}               // encoding: [0x09,0x00,0x38,0xd5]
4581// CHECK: mrs      x9, {{ccsidr_el1|CCSIDR_EL1}}             // encoding: [0x09,0x00,0x39,0xd5]
4582// CHECK: mrs      x9, {{csselr_el1|CSSELR_EL1}}             // encoding: [0x09,0x00,0x3a,0xd5]
4583// CHECK: mrs      x9, {{vpidr_el2|VPIDR_EL2}}              // encoding: [0x09,0x00,0x3c,0xd5]
4584// CHECK: mrs      x9, {{clidr_el1|CLIDR_EL1}}              // encoding: [0x29,0x00,0x39,0xd5]
4585// CHECK: mrs      x9, {{ctr_el0|CTR_EL0}}                // encoding: [0x29,0x00,0x3b,0xd5]
4586// CHECK: mrs      x9, {{mpidr_el1|MPIDR_EL1}}              // encoding: [0xa9,0x00,0x38,0xd5]
4587// CHECK: mrs      x9, {{vmpidr_el2|VMPIDR_EL2}}             // encoding: [0xa9,0x00,0x3c,0xd5]
4588// CHECK: mrs      x9, {{revidr_el1|REVIDR_EL1}}             // encoding: [0xc9,0x00,0x38,0xd5]
4589// CHECK: mrs      x9, {{aidr_el1|AIDR_EL1}}               // encoding: [0xe9,0x00,0x39,0xd5]
4590// CHECK: mrs      x9, {{dczid_el0|DCZID_EL0}}              // encoding: [0xe9,0x00,0x3b,0xd5]
4591// CHECK: mrs      x9, {{id_pfr0_el1|ID_PFR0_EL1}}            // encoding: [0x09,0x01,0x38,0xd5]
4592// CHECK: mrs      x9, {{id_pfr1_el1|ID_PFR1_EL1}}            // encoding: [0x29,0x01,0x38,0xd5]
4593// CHECK: mrs      x9, {{id_dfr0_el1|ID_DFR0_EL1}}            // encoding: [0x49,0x01,0x38,0xd5]
4594// CHECK: mrs      x9, {{id_afr0_el1|ID_AFR0_EL1}}            // encoding: [0x69,0x01,0x38,0xd5]
4595// CHECK: mrs      x9, {{id_mmfr0_el1|ID_MMFR0_EL1}}           // encoding: [0x89,0x01,0x38,0xd5]
4596// CHECK: mrs      x9, {{id_mmfr1_el1|ID_MMFR1_EL1}}           // encoding: [0xa9,0x01,0x38,0xd5]
4597// CHECK: mrs      x9, {{id_mmfr2_el1|ID_MMFR2_EL1}}           // encoding: [0xc9,0x01,0x38,0xd5]
4598// CHECK: mrs      x9, {{id_mmfr3_el1|ID_MMFR3_EL1}}           // encoding: [0xe9,0x01,0x38,0xd5]
4599// CHECK: mrs      x9, {{id_isar0_el1|ID_ISAR0_EL1}}           // encoding: [0x09,0x02,0x38,0xd5]
4600// CHECK: mrs      x9, {{id_isar1_el1|ID_ISAR1_EL1}}           // encoding: [0x29,0x02,0x38,0xd5]
4601// CHECK: mrs      x9, {{id_isar2_el1|ID_ISAR2_EL1}}           // encoding: [0x49,0x02,0x38,0xd5]
4602// CHECK: mrs      x9, {{id_isar3_el1|ID_ISAR3_EL1}}           // encoding: [0x69,0x02,0x38,0xd5]
4603// CHECK: mrs      x9, {{id_isar4_el1|ID_ISAR4_EL1}}           // encoding: [0x89,0x02,0x38,0xd5]
4604// CHECK: mrs      x9, {{id_isar5_el1|ID_ISAR5_EL1}}           // encoding: [0xa9,0x02,0x38,0xd5]
4605// CHECK: mrs      x9, {{mvfr0_el1|MVFR0_EL1}}              // encoding: [0x09,0x03,0x38,0xd5]
4606// CHECK: mrs      x9, {{mvfr1_el1|MVFR1_EL1}}              // encoding: [0x29,0x03,0x38,0xd5]
4607// CHECK: mrs      x9, {{mvfr2_el1|MVFR2_EL1}}              // encoding: [0x49,0x03,0x38,0xd5]
4608// CHECK: mrs      x9, {{id_aa64pfr0_el1|ID_AA64PFR0_EL1}}        // encoding: [0x09,0x04,0x38,0xd5]
4609// CHECK: mrs      x9, {{id_aa64pfr1_el1|ID_AA64PFR1_EL1}}        // encoding: [0x29,0x04,0x38,0xd5]
4610// CHECK: mrs      x9, {{id_aa64dfr0_el1|ID_AA64DFR0_EL1}}        // encoding: [0x09,0x05,0x38,0xd5]
4611// CHECK: mrs      x9, {{id_aa64dfr1_el1|ID_AA64DFR1_EL1}}        // encoding: [0x29,0x05,0x38,0xd5]
4612// CHECK: mrs      x9, {{id_aa64afr0_el1|ID_AA64AFR0_EL1}}        // encoding: [0x89,0x05,0x38,0xd5]
4613// CHECK: mrs      x9, {{id_aa64afr1_el1|ID_AA64AFR1_EL1}}        // encoding: [0xa9,0x05,0x38,0xd5]
4614// CHECK: mrs      x9, {{id_aa64isar0_el1|ID_AA64ISAR0_EL1}}       // encoding: [0x09,0x06,0x38,0xd5]
4615// CHECK: mrs      x9, {{id_aa64isar1_el1|ID_AA64ISAR1_EL1}}       // encoding: [0x29,0x06,0x38,0xd5]
4616// CHECK: mrs      x9, {{id_aa64mmfr0_el1|ID_AA64MMFR0_EL1}}       // encoding: [0x09,0x07,0x38,0xd5]
4617// CHECK: mrs      x9, {{id_aa64mmfr1_el1|ID_AA64MMFR1_EL1}}       // encoding: [0x29,0x07,0x38,0xd5]
4618// CHECK: mrs      x9, {{sctlr_el1|SCTLR_EL1}}              // encoding: [0x09,0x10,0x38,0xd5]
4619// CHECK: mrs      x9, {{sctlr_el2|SCTLR_EL2}}              // encoding: [0x09,0x10,0x3c,0xd5]
4620// CHECK: mrs      x9, {{sctlr_el3|SCTLR_EL3}}              // encoding: [0x09,0x10,0x3e,0xd5]
4621// CHECK: mrs      x9, {{actlr_el1|ACTLR_EL1}}              // encoding: [0x29,0x10,0x38,0xd5]
4622// CHECK: mrs      x9, {{actlr_el2|ACTLR_EL2}}              // encoding: [0x29,0x10,0x3c,0xd5]
4623// CHECK: mrs      x9, {{actlr_el3|ACTLR_EL3}}              // encoding: [0x29,0x10,0x3e,0xd5]
4624// CHECK: mrs      x9, {{cpacr_el1|CPACR_EL1}}              // encoding: [0x49,0x10,0x38,0xd5]
4625// CHECK: mrs      x9, {{hcr_el2|HCR_EL2}}                // encoding: [0x09,0x11,0x3c,0xd5]
4626// CHECK: mrs      x9, {{scr_el3|SCR_EL3}}                // encoding: [0x09,0x11,0x3e,0xd5]
4627// CHECK: mrs      x9, {{mdcr_el2|MDCR_EL2}}               // encoding: [0x29,0x11,0x3c,0xd5]
4628// CHECK: mrs      x9, {{sder32_el3|SDER32_EL3}}             // encoding: [0x29,0x11,0x3e,0xd5]
4629// CHECK: mrs      x9, {{cptr_el2|CPTR_EL2}}               // encoding: [0x49,0x11,0x3c,0xd5]
4630// CHECK: mrs      x9, {{cptr_el3|CPTR_EL3}}               // encoding: [0x49,0x11,0x3e,0xd5]
4631// CHECK: mrs      x9, {{hstr_el2|HSTR_EL2}}               // encoding: [0x69,0x11,0x3c,0xd5]
4632// CHECK: mrs      x9, {{hacr_el2|HACR_EL2}}               // encoding: [0xe9,0x11,0x3c,0xd5]
4633// CHECK: mrs      x9, {{mdcr_el3|MDCR_EL3}}               // encoding: [0x29,0x13,0x3e,0xd5]
4634// CHECK: mrs      x9, {{ttbr0_el1|TTBR0_EL1}}              // encoding: [0x09,0x20,0x38,0xd5]
4635// CHECK: mrs      x9, {{ttbr0_el2|TTBR0_EL2}}              // encoding: [0x09,0x20,0x3c,0xd5]
4636// CHECK: mrs      x9, {{ttbr0_el3|TTBR0_EL3}}              // encoding: [0x09,0x20,0x3e,0xd5]
4637// CHECK: mrs      x9, {{ttbr1_el1|TTBR1_EL1}}              // encoding: [0x29,0x20,0x38,0xd5]
4638// CHECK: mrs      x9, {{tcr_el1|TCR_EL1}}                // encoding: [0x49,0x20,0x38,0xd5]
4639// CHECK: mrs      x9, {{tcr_el2|TCR_EL2}}                // encoding: [0x49,0x20,0x3c,0xd5]
4640// CHECK: mrs      x9, {{tcr_el3|TCR_EL3}}                // encoding: [0x49,0x20,0x3e,0xd5]
4641// CHECK: mrs      x9, {{vttbr_el2|VTTBR_EL2}}              // encoding: [0x09,0x21,0x3c,0xd5]
4642// CHECK: mrs      x9, {{vtcr_el2|VTCR_EL2}}               // encoding: [0x49,0x21,0x3c,0xd5]
4643// CHECK: mrs      x9, {{dacr32_el2|DACR32_EL2}}             // encoding: [0x09,0x30,0x3c,0xd5]
4644// CHECK: mrs      x9, {{spsr_el1|SPSR_EL1}}               // encoding: [0x09,0x40,0x38,0xd5]
4645// CHECK: mrs      x9, {{spsr_el2|SPSR_EL2}}               // encoding: [0x09,0x40,0x3c,0xd5]
4646// CHECK: mrs      x9, {{spsr_el3|SPSR_EL3}}               // encoding: [0x09,0x40,0x3e,0xd5]
4647// CHECK: mrs      x9, {{elr_el1|ELR_EL1}}                // encoding: [0x29,0x40,0x38,0xd5]
4648// CHECK: mrs      x9, {{elr_el2|ELR_EL2}}                // encoding: [0x29,0x40,0x3c,0xd5]
4649// CHECK: mrs      x9, {{elr_el3|ELR_EL3}}                // encoding: [0x29,0x40,0x3e,0xd5]
4650// CHECK: mrs      x9, {{sp_el0|SP_EL0}}                 // encoding: [0x09,0x41,0x38,0xd5]
4651// CHECK: mrs      x9, {{sp_el1|SP_EL1}}                 // encoding: [0x09,0x41,0x3c,0xd5]
4652// CHECK: mrs      x9, {{sp_el2|SP_EL2}}                 // encoding: [0x09,0x41,0x3e,0xd5]
4653// CHECK: mrs      x9, {{spsel|SPSEL}}                  // encoding: [0x09,0x42,0x38,0xd5]
4654// CHECK: mrs      x9, {{nzcv|NZCV}}                   // encoding: [0x09,0x42,0x3b,0xd5]
4655// CHECK: mrs      x9, {{daif|DAIF}}                   // encoding: [0x29,0x42,0x3b,0xd5]
4656// CHECK: mrs      x9, {{currentel|CURRENTEL}}              // encoding: [0x49,0x42,0x38,0xd5]
4657// CHECK: mrs      x9, {{spsr_irq|SPSR_IRQ}}               // encoding: [0x09,0x43,0x3c,0xd5]
4658// CHECK: mrs      x9, {{spsr_abt|SPSR_ABT}}               // encoding: [0x29,0x43,0x3c,0xd5]
4659// CHECK: mrs      x9, {{spsr_und|SPSR_UND}}               // encoding: [0x49,0x43,0x3c,0xd5]
4660// CHECK: mrs      x9, {{spsr_fiq|SPSR_FIQ}}               // encoding: [0x69,0x43,0x3c,0xd5]
4661// CHECK: mrs      x9, {{fpcr|FPCR}}                   // encoding: [0x09,0x44,0x3b,0xd5]
4662// CHECK: mrs      x9, {{fpsr|FPSR}}                   // encoding: [0x29,0x44,0x3b,0xd5]
4663// CHECK: mrs      x9, {{dspsr_el0|DSPSR_EL0}}              // encoding: [0x09,0x45,0x3b,0xd5]
4664// CHECK: mrs      x9, {{dlr_el0|DLR_EL0}}                // encoding: [0x29,0x45,0x3b,0xd5]
4665// CHECK: mrs      x9, {{ifsr32_el2|IFSR32_EL2}}             // encoding: [0x29,0x50,0x3c,0xd5]
4666// CHECK: mrs      x9, {{afsr0_el1|AFSR0_EL1}}              // encoding: [0x09,0x51,0x38,0xd5]
4667// CHECK: mrs      x9, {{afsr0_el2|AFSR0_EL2}}              // encoding: [0x09,0x51,0x3c,0xd5]
4668// CHECK: mrs      x9, {{afsr0_el3|AFSR0_EL3}}              // encoding: [0x09,0x51,0x3e,0xd5]
4669// CHECK: mrs      x9, {{afsr1_el1|AFSR1_EL1}}              // encoding: [0x29,0x51,0x38,0xd5]
4670// CHECK: mrs      x9, {{afsr1_el2|AFSR1_EL2}}              // encoding: [0x29,0x51,0x3c,0xd5]
4671// CHECK: mrs      x9, {{afsr1_el3|AFSR1_EL3}}              // encoding: [0x29,0x51,0x3e,0xd5]
4672// CHECK: mrs      x9, {{esr_el1|ESR_EL1}}                // encoding: [0x09,0x52,0x38,0xd5]
4673// CHECK: mrs      x9, {{esr_el2|ESR_EL2}}                // encoding: [0x09,0x52,0x3c,0xd5]
4674// CHECK: mrs      x9, {{esr_el3|ESR_EL3}}                // encoding: [0x09,0x52,0x3e,0xd5]
4675// CHECK: mrs      x9, {{fpexc32_el2|FPEXC32_EL2}}            // encoding: [0x09,0x53,0x3c,0xd5]
4676// CHECK: mrs      x9, {{far_el1|FAR_EL1}}                // encoding: [0x09,0x60,0x38,0xd5]
4677// CHECK: mrs      x9, {{far_el2|FAR_EL2}}                // encoding: [0x09,0x60,0x3c,0xd5]
4678// CHECK: mrs      x9, {{far_el3|FAR_EL3}}                // encoding: [0x09,0x60,0x3e,0xd5]
4679// CHECK: mrs      x9, {{hpfar_el2|HPFAR_EL2}}              // encoding: [0x89,0x60,0x3c,0xd5]
4680// CHECK: mrs      x9, {{par_el1|PAR_EL1}}                // encoding: [0x09,0x74,0x38,0xd5]
4681// CHECK: mrs      x9, {{pmcr_el0|PMCR_EL0}}               // encoding: [0x09,0x9c,0x3b,0xd5]
4682// CHECK: mrs      x9, {{pmcntenset_el0|PMCNTENSET_EL0}}         // encoding: [0x29,0x9c,0x3b,0xd5]
4683// CHECK: mrs      x9, {{pmcntenclr_el0|PMCNTENCLR_EL0}}         // encoding: [0x49,0x9c,0x3b,0xd5]
4684// CHECK: mrs      x9, {{pmovsclr_el0|PMOVSCLR_EL0}}           // encoding: [0x69,0x9c,0x3b,0xd5]
4685// CHECK: mrs      x9, {{pmselr_el0|PMSELR_EL0}}             // encoding: [0xa9,0x9c,0x3b,0xd5]
4686// CHECK: mrs      x9, {{pmceid0_el0|PMCEID0_EL0}}            // encoding: [0xc9,0x9c,0x3b,0xd5]
4687// CHECK: mrs      x9, {{pmceid1_el0|PMCEID1_EL0}}            // encoding: [0xe9,0x9c,0x3b,0xd5]
4688// CHECK: mrs      x9, {{pmccntr_el0|PMCCNTR_EL0}}            // encoding: [0x09,0x9d,0x3b,0xd5]
4689// CHECK: mrs      x9, {{pmxevtyper_el0|PMXEVTYPER_EL0}}         // encoding: [0x29,0x9d,0x3b,0xd5]
4690// CHECK: mrs      x9, {{pmxevcntr_el0|PMXEVCNTR_EL0}}          // encoding: [0x49,0x9d,0x3b,0xd5]
4691// CHECK: mrs      x9, {{pmuserenr_el0|PMUSERENR_EL0}}          // encoding: [0x09,0x9e,0x3b,0xd5]
4692// CHECK: mrs      x9, {{pmintenset_el1|PMINTENSET_EL1}}         // encoding: [0x29,0x9e,0x38,0xd5]
4693// CHECK: mrs      x9, {{pmintenclr_el1|PMINTENCLR_EL1}}         // encoding: [0x49,0x9e,0x38,0xd5]
4694// CHECK: mrs      x9, {{pmovsset_el0|PMOVSSET_EL0}}           // encoding: [0x69,0x9e,0x3b,0xd5]
4695// CHECK: mrs      x9, {{mair_el1|MAIR_EL1}}               // encoding: [0x09,0xa2,0x38,0xd5]
4696// CHECK: mrs      x9, {{mair_el2|MAIR_EL2}}               // encoding: [0x09,0xa2,0x3c,0xd5]
4697// CHECK: mrs      x9, {{mair_el3|MAIR_EL3}}               // encoding: [0x09,0xa2,0x3e,0xd5]
4698// CHECK: mrs      x9, {{amair_el1|AMAIR_EL1}}              // encoding: [0x09,0xa3,0x38,0xd5]
4699// CHECK: mrs      x9, {{amair_el2|AMAIR_EL2}}              // encoding: [0x09,0xa3,0x3c,0xd5]
4700// CHECK: mrs      x9, {{amair_el3|AMAIR_EL3}}              // encoding: [0x09,0xa3,0x3e,0xd5]
4701// CHECK: mrs      x9, {{vbar_el1|VBAR_EL1}}               // encoding: [0x09,0xc0,0x38,0xd5]
4702// CHECK: mrs      x9, {{vbar_el2|VBAR_EL2}}               // encoding: [0x09,0xc0,0x3c,0xd5]
4703// CHECK: mrs      x9, {{vbar_el3|VBAR_EL3}}               // encoding: [0x09,0xc0,0x3e,0xd5]
4704// CHECK: mrs      x9, {{rvbar_el1|RVBAR_EL1}}              // encoding: [0x29,0xc0,0x38,0xd5]
4705// CHECK: mrs      x9, {{rvbar_el2|RVBAR_EL2}}              // encoding: [0x29,0xc0,0x3c,0xd5]
4706// CHECK: mrs      x9, {{rvbar_el3|RVBAR_EL3}}              // encoding: [0x29,0xc0,0x3e,0xd5]
4707// CHECK: mrs      x9, {{rmr_el1|RMR_EL1}}                // encoding: [0x49,0xc0,0x38,0xd5]
4708// CHECK: mrs      x9, {{rmr_el2|RMR_EL2}}                // encoding: [0x49,0xc0,0x3c,0xd5]
4709// CHECK: mrs      x9, {{rmr_el3|RMR_EL3}}                // encoding: [0x49,0xc0,0x3e,0xd5]
4710// CHECK: mrs      x9, {{isr_el1|ISR_EL1}}                // encoding: [0x09,0xc1,0x38,0xd5]
4711// CHECK: mrs      x9, {{contextidr_el1|CONTEXTIDR_EL1}}         // encoding: [0x29,0xd0,0x38,0xd5]
4712// CHECK: mrs      x9, {{tpidr_el0|TPIDR_EL0}}              // encoding: [0x49,0xd0,0x3b,0xd5]
4713// CHECK: mrs      x9, {{tpidr_el2|TPIDR_EL2}}              // encoding: [0x49,0xd0,0x3c,0xd5]
4714// CHECK: mrs      x9, {{tpidr_el3|TPIDR_EL3}}              // encoding: [0x49,0xd0,0x3e,0xd5]
4715// CHECK: mrs      x9, {{tpidrro_el0|TPIDRRO_EL0}}            // encoding: [0x69,0xd0,0x3b,0xd5]
4716// CHECK: mrs      x9, {{tpidr_el1|TPIDR_EL1}}              // encoding: [0x89,0xd0,0x38,0xd5]
4717// CHECK: mrs      x9, {{cntfrq_el0|CNTFRQ_EL0}}             // encoding: [0x09,0xe0,0x3b,0xd5]
4718// CHECK: mrs      x9, {{cntpct_el0|CNTPCT_EL0}}             // encoding: [0x29,0xe0,0x3b,0xd5]
4719// CHECK: mrs      x9, {{cntvct_el0|CNTVCT_EL0}}             // encoding: [0x49,0xe0,0x3b,0xd5]
4720// CHECK: mrs      x9, {{cntvoff_el2|CNTVOFF_EL2}}            // encoding: [0x69,0xe0,0x3c,0xd5]
4721// CHECK: mrs      x9, {{cntkctl_el1|CNTKCTL_EL1}}            // encoding: [0x09,0xe1,0x38,0xd5]
4722// CHECK: mrs      x9, {{cnthctl_el2|CNTHCTL_EL2}}            // encoding: [0x09,0xe1,0x3c,0xd5]
4723// CHECK: mrs      x9, {{cntp_tval_el0|CNTP_TVAL_EL0}}          // encoding: [0x09,0xe2,0x3b,0xd5]
4724// CHECK: mrs      x9, {{cnthp_tval_el2|CNTHP_TVAL_EL2}}         // encoding: [0x09,0xe2,0x3c,0xd5]
4725// CHECK: mrs      x9, {{cntps_tval_el1|CNTPS_TVAL_EL1}}         // encoding: [0x09,0xe2,0x3f,0xd5]
4726// CHECK: mrs      x9, {{cntp_ctl_el0|CNTP_CTL_EL0}}           // encoding: [0x29,0xe2,0x3b,0xd5]
4727// CHECK: mrs      x9, {{cnthp_ctl_el2|CNTHP_CTL_EL2}}          // encoding: [0x29,0xe2,0x3c,0xd5]
4728// CHECK: mrs      x9, {{cntps_ctl_el1|CNTPS_CTL_EL1}}          // encoding: [0x29,0xe2,0x3f,0xd5]
4729// CHECK: mrs      x9, {{cntp_cval_el0|CNTP_CVAL_EL0}}          // encoding: [0x49,0xe2,0x3b,0xd5]
4730// CHECK: mrs      x9, {{cnthp_cval_el2|CNTHP_CVAL_EL2}}         // encoding: [0x49,0xe2,0x3c,0xd5]
4731// CHECK: mrs      x9, {{cntps_cval_el1|CNTPS_CVAL_EL1}}         // encoding: [0x49,0xe2,0x3f,0xd5]
4732// CHECK: mrs      x9, {{cntv_tval_el0|CNTV_TVAL_EL0}}          // encoding: [0x09,0xe3,0x3b,0xd5]
4733// CHECK: mrs      x9, {{cntv_ctl_el0|CNTV_CTL_EL0}}           // encoding: [0x29,0xe3,0x3b,0xd5]
4734// CHECK: mrs      x9, {{cntv_cval_el0|CNTV_CVAL_EL0}}          // encoding: [0x49,0xe3,0x3b,0xd5]
4735// CHECK: mrs      x9, {{pmevcntr0_el0|PMEVCNTR0_EL0}}          // encoding: [0x09,0xe8,0x3b,0xd5]
4736// CHECK: mrs      x9, {{pmevcntr1_el0|PMEVCNTR1_EL0}}          // encoding: [0x29,0xe8,0x3b,0xd5]
4737// CHECK: mrs      x9, {{pmevcntr2_el0|PMEVCNTR2_EL0}}          // encoding: [0x49,0xe8,0x3b,0xd5]
4738// CHECK: mrs      x9, {{pmevcntr3_el0|PMEVCNTR3_EL0}}          // encoding: [0x69,0xe8,0x3b,0xd5]
4739// CHECK: mrs      x9, {{pmevcntr4_el0|PMEVCNTR4_EL0}}          // encoding: [0x89,0xe8,0x3b,0xd5]
4740// CHECK: mrs      x9, {{pmevcntr5_el0|PMEVCNTR5_EL0}}          // encoding: [0xa9,0xe8,0x3b,0xd5]
4741// CHECK: mrs      x9, {{pmevcntr6_el0|PMEVCNTR6_EL0}}          // encoding: [0xc9,0xe8,0x3b,0xd5]
4742// CHECK: mrs      x9, {{pmevcntr7_el0|PMEVCNTR7_EL0}}          // encoding: [0xe9,0xe8,0x3b,0xd5]
4743// CHECK: mrs      x9, {{pmevcntr8_el0|PMEVCNTR8_EL0}}          // encoding: [0x09,0xe9,0x3b,0xd5]
4744// CHECK: mrs      x9, {{pmevcntr9_el0|PMEVCNTR9_EL0}}          // encoding: [0x29,0xe9,0x3b,0xd5]
4745// CHECK: mrs      x9, {{pmevcntr10_el0|PMEVCNTR10_EL0}}         // encoding: [0x49,0xe9,0x3b,0xd5]
4746// CHECK: mrs      x9, {{pmevcntr11_el0|PMEVCNTR11_EL0}}         // encoding: [0x69,0xe9,0x3b,0xd5]
4747// CHECK: mrs      x9, {{pmevcntr12_el0|PMEVCNTR12_EL0}}         // encoding: [0x89,0xe9,0x3b,0xd5]
4748// CHECK: mrs      x9, {{pmevcntr13_el0|PMEVCNTR13_EL0}}         // encoding: [0xa9,0xe9,0x3b,0xd5]
4749// CHECK: mrs      x9, {{pmevcntr14_el0|PMEVCNTR14_EL0}}         // encoding: [0xc9,0xe9,0x3b,0xd5]
4750// CHECK: mrs      x9, {{pmevcntr15_el0|PMEVCNTR15_EL0}}         // encoding: [0xe9,0xe9,0x3b,0xd5]
4751// CHECK: mrs      x9, {{pmevcntr16_el0|PMEVCNTR16_EL0}}         // encoding: [0x09,0xea,0x3b,0xd5]
4752// CHECK: mrs      x9, {{pmevcntr17_el0|PMEVCNTR17_EL0}}         // encoding: [0x29,0xea,0x3b,0xd5]
4753// CHECK: mrs      x9, {{pmevcntr18_el0|PMEVCNTR18_EL0}}         // encoding: [0x49,0xea,0x3b,0xd5]
4754// CHECK: mrs      x9, {{pmevcntr19_el0|PMEVCNTR19_EL0}}         // encoding: [0x69,0xea,0x3b,0xd5]
4755// CHECK: mrs      x9, {{pmevcntr20_el0|PMEVCNTR20_EL0}}         // encoding: [0x89,0xea,0x3b,0xd5]
4756// CHECK: mrs      x9, {{pmevcntr21_el0|PMEVCNTR21_EL0}}         // encoding: [0xa9,0xea,0x3b,0xd5]
4757// CHECK: mrs      x9, {{pmevcntr22_el0|PMEVCNTR22_EL0}}         // encoding: [0xc9,0xea,0x3b,0xd5]
4758// CHECK: mrs      x9, {{pmevcntr23_el0|PMEVCNTR23_EL0}}         // encoding: [0xe9,0xea,0x3b,0xd5]
4759// CHECK: mrs      x9, {{pmevcntr24_el0|PMEVCNTR24_EL0}}         // encoding: [0x09,0xeb,0x3b,0xd5]
4760// CHECK: mrs      x9, {{pmevcntr25_el0|PMEVCNTR25_EL0}}         // encoding: [0x29,0xeb,0x3b,0xd5]
4761// CHECK: mrs      x9, {{pmevcntr26_el0|PMEVCNTR26_EL0}}         // encoding: [0x49,0xeb,0x3b,0xd5]
4762// CHECK: mrs      x9, {{pmevcntr27_el0|PMEVCNTR27_EL0}}         // encoding: [0x69,0xeb,0x3b,0xd5]
4763// CHECK: mrs      x9, {{pmevcntr28_el0|PMEVCNTR28_EL0}}         // encoding: [0x89,0xeb,0x3b,0xd5]
4764// CHECK: mrs      x9, {{pmevcntr29_el0|PMEVCNTR29_EL0}}         // encoding: [0xa9,0xeb,0x3b,0xd5]
4765// CHECK: mrs      x9, {{pmevcntr30_el0|PMEVCNTR30_EL0}}         // encoding: [0xc9,0xeb,0x3b,0xd5]
4766// CHECK: mrs      x9, {{pmccfiltr_el0|PMCCFILTR_EL0}}          // encoding: [0xe9,0xef,0x3b,0xd5]
4767// CHECK: mrs      x9, {{pmevtyper0_el0|PMEVTYPER0_EL0}}         // encoding: [0x09,0xec,0x3b,0xd5]
4768// CHECK: mrs      x9, {{pmevtyper1_el0|PMEVTYPER1_EL0}}         // encoding: [0x29,0xec,0x3b,0xd5]
4769// CHECK: mrs      x9, {{pmevtyper2_el0|PMEVTYPER2_EL0}}         // encoding: [0x49,0xec,0x3b,0xd5]
4770// CHECK: mrs      x9, {{pmevtyper3_el0|PMEVTYPER3_EL0}}         // encoding: [0x69,0xec,0x3b,0xd5]
4771// CHECK: mrs      x9, {{pmevtyper4_el0|PMEVTYPER4_EL0}}         // encoding: [0x89,0xec,0x3b,0xd5]
4772// CHECK: mrs      x9, {{pmevtyper5_el0|PMEVTYPER5_EL0}}         // encoding: [0xa9,0xec,0x3b,0xd5]
4773// CHECK: mrs      x9, {{pmevtyper6_el0|PMEVTYPER6_EL0}}         // encoding: [0xc9,0xec,0x3b,0xd5]
4774// CHECK: mrs      x9, {{pmevtyper7_el0|PMEVTYPER7_EL0}}         // encoding: [0xe9,0xec,0x3b,0xd5]
4775// CHECK: mrs      x9, {{pmevtyper8_el0|PMEVTYPER8_EL0}}         // encoding: [0x09,0xed,0x3b,0xd5]
4776// CHECK: mrs      x9, {{pmevtyper9_el0|PMEVTYPER9_EL0}}         // encoding: [0x29,0xed,0x3b,0xd5]
4777// CHECK: mrs      x9, {{pmevtyper10_el0|PMEVTYPER10_EL0}}        // encoding: [0x49,0xed,0x3b,0xd5]
4778// CHECK: mrs      x9, {{pmevtyper11_el0|PMEVTYPER11_EL0}}        // encoding: [0x69,0xed,0x3b,0xd5]
4779// CHECK: mrs      x9, {{pmevtyper12_el0|PMEVTYPER12_EL0}}        // encoding: [0x89,0xed,0x3b,0xd5]
4780// CHECK: mrs      x9, {{pmevtyper13_el0|PMEVTYPER13_EL0}}        // encoding: [0xa9,0xed,0x3b,0xd5]
4781// CHECK: mrs      x9, {{pmevtyper14_el0|PMEVTYPER14_EL0}}        // encoding: [0xc9,0xed,0x3b,0xd5]
4782// CHECK: mrs      x9, {{pmevtyper15_el0|PMEVTYPER15_EL0}}        // encoding: [0xe9,0xed,0x3b,0xd5]
4783// CHECK: mrs      x9, {{pmevtyper16_el0|PMEVTYPER16_EL0}}        // encoding: [0x09,0xee,0x3b,0xd5]
4784// CHECK: mrs      x9, {{pmevtyper17_el0|PMEVTYPER17_EL0}}        // encoding: [0x29,0xee,0x3b,0xd5]
4785// CHECK: mrs      x9, {{pmevtyper18_el0|PMEVTYPER18_EL0}}        // encoding: [0x49,0xee,0x3b,0xd5]
4786// CHECK: mrs      x9, {{pmevtyper19_el0|PMEVTYPER19_EL0}}        // encoding: [0x69,0xee,0x3b,0xd5]
4787// CHECK: mrs      x9, {{pmevtyper20_el0|PMEVTYPER20_EL0}}        // encoding: [0x89,0xee,0x3b,0xd5]
4788// CHECK: mrs      x9, {{pmevtyper21_el0|PMEVTYPER21_EL0}}        // encoding: [0xa9,0xee,0x3b,0xd5]
4789// CHECK: mrs      x9, {{pmevtyper22_el0|PMEVTYPER22_EL0}}        // encoding: [0xc9,0xee,0x3b,0xd5]
4790// CHECK: mrs      x9, {{pmevtyper23_el0|PMEVTYPER23_EL0}}        // encoding: [0xe9,0xee,0x3b,0xd5]
4791// CHECK: mrs      x9, {{pmevtyper24_el0|PMEVTYPER24_EL0}}        // encoding: [0x09,0xef,0x3b,0xd5]
4792// CHECK: mrs      x9, {{pmevtyper25_el0|PMEVTYPER25_EL0}}        // encoding: [0x29,0xef,0x3b,0xd5]
4793// CHECK: mrs      x9, {{pmevtyper26_el0|PMEVTYPER26_EL0}}        // encoding: [0x49,0xef,0x3b,0xd5]
4794// CHECK: mrs      x9, {{pmevtyper27_el0|PMEVTYPER27_EL0}}        // encoding: [0x69,0xef,0x3b,0xd5]
4795// CHECK: mrs      x9, {{pmevtyper28_el0|PMEVTYPER28_EL0}}        // encoding: [0x89,0xef,0x3b,0xd5]
4796// CHECK: mrs      x9, {{pmevtyper29_el0|PMEVTYPER29_EL0}}        // encoding: [0xa9,0xef,0x3b,0xd5]
4797// CHECK: mrs      x9, {{pmevtyper30_el0|PMEVTYPER30_EL0}}        // encoding: [0xc9,0xef,0x3b,0xd5]
4798
4799        mrs x12, s3_7_c15_c1_5
4800        mrs x13, s3_2_c11_c15_7
4801        mrs x14, s1_3_c9_c2_1
4802        msr s3_0_c15_c0_0, x12
4803        msr s3_7_c11_c13_7, x5
4804        msr s1_3_c9_c2_1, x4
4805// CHECK: mrs     x12, {{s3_7_c15_c1_5|S3_7_C15_C1_5}}      // encoding: [0xac,0xf1,0x3f,0xd5]
4806// CHECK: mrs     x13, {{s3_2_c11_c15_7|S3_2_C11_C15_7}}    // encoding: [0xed,0xbf,0x3a,0xd5]
4807// CHECK: mrs     x14, {{s1_3_c9_c2_1|S1_3_C9_C2_1}}        // encoding: [0x2e,0x92,0x2b,0xd5]
4808// CHECK: msr     {{s3_0_c15_c0_0|S3_0_C15_C0_0}}, x12      // encoding: [0x0c,0xf0,0x18,0xd5]
4809// CHECK: msr     {{s3_7_c11_c13_7|S3_7_C11_C13_7}}, x5     // encoding: [0xe5,0xbd,0x1f,0xd5]
4810// CHECK: msr     {{s1_3_c9_c2_1|S1_3_C9_C2_1}}, x4         // encoding: [0x24,0x92,0x0b,0xd5]
4811
4812//------------------------------------------------------------------------------
4813// Unconditional branch (immediate)
4814//------------------------------------------------------------------------------
4815
4816        tbz x5, #0, somewhere
4817        tbz xzr, #63, elsewhere
4818        tbnz x5, #45, nowhere
4819
4820// CHECK: tbz    w5, #0, somewhere       // encoding: [0bAAA00101,A,0b00000AAA,0x36]
4821// CHECK:                                //   fixup A - offset: 0, value: somewhere, kind: fixup_aarch64_pcrel_branch14
4822// CHECK: tbz    xzr, #63, elsewhere     // encoding: [0bAAA11111,A,0b11111AAA,0xb6]
4823// CHECK:                                //   fixup A - offset: 0, value: elsewhere, kind: fixup_aarch64_pcrel_branch14
4824// CHECK: tbnz   x5, #45, nowhere        // encoding: [0bAAA00101,A,0b01101AAA,0xb7]
4825// CHECK:                                //   fixup A - offset: 0, value: nowhere, kind: fixup_aarch64_pcrel_branch14
4826
4827
4828        tbnz w3, #2, there
4829        tbnz wzr, #31, nowhere
4830        tbz w5, #12, anywhere
4831
4832// CHECK: tbnz    w3, #2, there           // encoding: [0bAAA00011,A,0b00010AAA,0x37]
4833// CHECK:                                 //   fixup A - offset: 0, value: there, kind: fixup_aarch64_pcrel_branch14
4834// CHECK: tbnz    wzr, #31, nowhere       // encoding: [0bAAA11111,A,0b11111AAA,0x37]
4835// CHECK:                                 //   fixup A - offset: 0, value: nowhere, kind: fixup_aarch64_pcrel_branch14
4836// CHECK: tbz     w5, #12, anywhere       // encoding: [0bAAA00101,A,0b01100AAA,0x36]
4837// CHECK:                                 //   fixup A - offset: 0, value: anywhere, kind: fixup_aarch64_pcrel_branch14
4838
4839//------------------------------------------------------------------------------
4840// Unconditional branch (immediate)
4841//------------------------------------------------------------------------------
4842
4843        b somewhere
4844        bl elsewhere
4845
4846// CHECK: b    somewhere               // encoding: [A,A,A,0b000101AA]
4847// CHECK:                              //   fixup A - offset: 0, value: somewhere, kind: fixup_aarch64_pcrel_branch26
4848// CHECK: bl    elsewhere               // encoding: [A,A,A,0b100101AA]
4849// CHECK:                               //   fixup A - offset: 0, value: elsewhere, kind: fixup_aarch64_pcrel_call26
4850
4851        b #4
4852        bl #0
4853        b #134217724
4854        bl #-134217728
4855// CHECK: b       #4                      // encoding: [0x01,0x00,0x00,0x14]
4856// CHECK: bl      #0                      // encoding: [0x00,0x00,0x00,0x94]
4857// CHECK: b       #134217724              // encoding: [0xff,0xff,0xff,0x15]
4858// CHECK: bl      #-134217728             // encoding: [0x00,0x00,0x00,0x96]
4859
4860//------------------------------------------------------------------------------
4861// Unconditional branch (register)
4862//------------------------------------------------------------------------------
4863
4864        br x20
4865        blr xzr
4866        ret x10
4867// CHECK: br       x20                        // encoding: [0x80,0x02,0x1f,0xd6]
4868// CHECK: blr      xzr                        // encoding: [0xe0,0x03,0x3f,0xd6]
4869// CHECK: ret      x10                        // encoding: [0x40,0x01,0x5f,0xd6]
4870
4871        ret
4872        eret
4873        drps
4874// CHECK: ret                                 // encoding: [0xc0,0x03,0x5f,0xd6]
4875// CHECK: eret                                // encoding: [0xe0,0x03,0x9f,0xd6]
4876// CHECK: drps                                // encoding: [0xe0,0x03,0xbf,0xd6]
4877
4878