[AArch64] Add support for NEON scalar shift immediate instructions.
[oota-llvm.git] / lib / Target / AArch64 / AArch64InstrFormats.td
1 //===- AArch64InstrFormats.td - AArch64 Instruction Formats --*- tablegen -*-=//
2 //
3 //                     The LLVM Compiler Infrastructure
4 //
5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details.
7 //
8 //===----------------------------------------------------------------------===//
9 // This file describes AArch64 instruction formats, down to the level of the
10 // instruction's overall class.
11 //===----------------------------------------------------------------------===//
12
13
14 //===----------------------------------------------------------------------===//
15 // A64 Instruction Format Definitions.
16 //===----------------------------------------------------------------------===//
17
18 // A64 is currently the only instruction set supported by the AArch64
19 // architecture.
20 class A64Inst<dag outs, dag ins, string asmstr, list<dag> patterns,
21               InstrItinClass itin>
22     : Instruction {
23   // All A64 instructions are 32-bit. This field will be filled in
24   // gradually going down the hierarchy.
25   field bits<32> Inst;
26
27   field bits<32> Unpredictable = 0;
28   // SoftFail is the generic name for this field, but we alias it so
29   // as to make it more obvious what it means in ARM-land.
30   field bits<32> SoftFail = Unpredictable;
31
32   // LLVM-level model of the AArch64/A64 distinction.
33   let Namespace = "AArch64";
34   let DecoderNamespace = "A64";
35   let Size = 4;
36
37   // Set the templated fields
38   let OutOperandList = outs;
39   let InOperandList = ins;
40   let AsmString = asmstr;
41   let Pattern = patterns;
42   let Itinerary = itin;
43 }
44
45 class PseudoInst<dag outs, dag ins, list<dag> patterns> : Instruction {
46   let Namespace = "AArch64";
47
48   let OutOperandList = outs;
49   let InOperandList= ins;
50   let Pattern = patterns;
51   let isCodeGenOnly = 1;
52   let isPseudo = 1;
53 }
54
55 // Represents a pseudo-instruction that represents a single A64 instruction for
56 // whatever reason, the eventual result will be a 32-bit real instruction.
57 class A64PseudoInst<dag outs, dag ins, list<dag> patterns>
58   : PseudoInst<outs, ins, patterns> {
59   let Size = 4;
60 }
61
62 // As above, this will be a single A64 instruction, but we can actually give the
63 // expansion in TableGen.
64 class A64PseudoExpand<dag outs, dag ins, list<dag> patterns, dag Result>
65   : A64PseudoInst<outs, ins, patterns>,
66     PseudoInstExpansion<Result>;
67
68
69 // First, some common cross-hierarchy register formats.
70
71 class A64InstRd<dag outs, dag ins, string asmstr,
72                 list<dag> patterns, InstrItinClass itin>
73   : A64Inst<outs, ins, asmstr, patterns, itin> {
74   bits<5> Rd;
75
76   let Inst{4-0} = Rd;
77 }
78
79 class A64InstRt<dag outs, dag ins, string asmstr,
80                 list<dag> patterns, InstrItinClass itin>
81   : A64Inst<outs, ins, asmstr, patterns, itin> {
82   bits<5> Rt;
83
84   let Inst{4-0} = Rt;
85 }
86
87
88 class A64InstRdn<dag outs, dag ins, string asmstr,
89                  list<dag> patterns, InstrItinClass itin>
90     : A64InstRd<outs, ins, asmstr, patterns, itin> {
91   // Inherit rdt
92   bits<5> Rn;
93
94   let Inst{9-5} = Rn;
95 }
96
97 class A64InstRtn<dag outs, dag ins, string asmstr,
98                 list<dag> patterns, InstrItinClass itin>
99     : A64InstRt<outs, ins, asmstr, patterns, itin> {
100   // Inherit rdt
101   bits<5> Rn;
102
103   let Inst{9-5} = Rn;
104 }
105
106 // Instructions taking Rt,Rt2,Rn
107 class A64InstRtt2n<dag outs, dag ins, string asmstr,
108                    list<dag> patterns, InstrItinClass itin>
109   : A64InstRtn<outs, ins, asmstr, patterns, itin> {
110   bits<5> Rt2;
111
112   let Inst{14-10} = Rt2;
113 }
114
115 class A64InstRdnm<dag outs, dag ins, string asmstr,
116                   list<dag> patterns, InstrItinClass itin>
117   : A64InstRdn<outs, ins, asmstr, patterns, itin> {
118   bits<5> Rm;
119
120   let Inst{20-16} = Rm;
121 }
122
123 //===----------------------------------------------------------------------===//
124 //
125 // Actual A64 Instruction Formats
126 //
127
128 // Format for Add-subtract (extended register) instructions.
129 class A64I_addsubext<bit sf, bit op, bit S, bits<2> opt, bits<3> option,
130                      dag outs, dag ins, string asmstr, list<dag> patterns,
131                      InstrItinClass itin>
132     : A64InstRdnm<outs, ins, asmstr, patterns, itin> {
133     bits<3> Imm3;
134
135     let Inst{31} = sf;
136     let Inst{30} = op;
137     let Inst{29} = S;
138     let Inst{28-24} = 0b01011;
139     let Inst{23-22} = opt;
140     let Inst{21} = 0b1;
141     // Rm inherited in 20-16
142     let Inst{15-13} = option;
143     let Inst{12-10} = Imm3;
144     // Rn inherited in 9-5
145     // Rd inherited in 4-0
146 }
147
148 // Format for Add-subtract (immediate) instructions.
149 class A64I_addsubimm<bit sf, bit op, bit S, bits<2> shift,
150                      dag outs, dag ins, string asmstr,
151                      list<dag> patterns, InstrItinClass itin>
152   : A64InstRdn<outs, ins, asmstr, patterns, itin> {
153   bits<12> Imm12;
154
155   let Inst{31} = sf;
156   let Inst{30} = op;
157   let Inst{29} = S;
158   let Inst{28-24} = 0b10001;
159   let Inst{23-22} = shift;
160   let Inst{21-10} = Imm12;
161 }
162
163 // Format for Add-subtract (shifted register) instructions.
164 class A64I_addsubshift<bit sf, bit op, bit S, bits<2> shift,
165                        dag outs, dag ins, string asmstr, list<dag> patterns,
166                        InstrItinClass itin>
167     : A64InstRdnm<outs, ins, asmstr, patterns, itin> {
168     bits<6> Imm6;
169
170     let Inst{31} = sf;
171     let Inst{30} = op;
172     let Inst{29} = S;
173     let Inst{28-24} = 0b01011;
174     let Inst{23-22} = shift;
175     let Inst{21} = 0b0;
176     // Rm inherited in 20-16
177     let Inst{15-10} = Imm6;
178     // Rn inherited in 9-5
179     // Rd inherited in 4-0
180 }
181
182 // Format for Add-subtract (with carry) instructions.
183 class A64I_addsubcarry<bit sf, bit op, bit S, bits<6> opcode2,
184                        dag outs, dag ins, string asmstr, list<dag> patterns,
185                        InstrItinClass itin>
186     : A64InstRdnm<outs, ins, asmstr, patterns, itin> {
187     let Inst{31} = sf;
188     let Inst{30} = op;
189     let Inst{29} = S;
190     let Inst{28-21} = 0b11010000;
191     // Rm inherited in 20-16
192     let Inst{15-10} = opcode2;
193     // Rn inherited in 9-5
194     // Rd inherited in 4-0
195 }
196
197
198 // Format for Bitfield instructions
199 class A64I_bitfield<bit sf, bits<2> opc, bit n,
200                     dag outs, dag ins, string asmstr,
201                     list<dag> patterns, InstrItinClass itin>
202   : A64InstRdn<outs, ins, asmstr, patterns, itin> {
203   bits<6> ImmR;
204   bits<6> ImmS;
205
206   let Inst{31} = sf;
207   let Inst{30-29} = opc;
208   let Inst{28-23} = 0b100110;
209   let Inst{22} = n;
210   let Inst{21-16} = ImmR;
211   let Inst{15-10} = ImmS;
212   // Inherit Rn in 9-5
213   // Inherit Rd in 4-0
214 }
215
216 // Format for compare and branch (immediate) instructions.
217 class A64I_cmpbr<bit sf, bit op,
218                   dag outs, dag ins, string asmstr,
219                   list<dag> patterns, InstrItinClass itin>
220   : A64InstRt<outs, ins, asmstr, patterns, itin> {
221   bits<19> Label;
222
223   let Inst{31} = sf;
224   let Inst{30-25} = 0b011010;
225   let Inst{24} = op;
226   let Inst{23-5} = Label;
227   // Inherit Rt in 4-0
228 }
229
230 // Format for conditional branch (immediate) instructions.
231 class A64I_condbr<bit o1, bit o0,
232                   dag outs, dag ins, string asmstr,
233                   list<dag> patterns, InstrItinClass itin>
234   : A64Inst<outs, ins, asmstr, patterns, itin> {
235   bits<19> Label;
236   bits<4> Cond;
237
238   let Inst{31-25} = 0b0101010;
239   let Inst{24} = o1;
240   let Inst{23-5} = Label;
241   let Inst{4} = o0;
242   let Inst{3-0} = Cond;
243 }
244
245 // Format for conditional compare (immediate) instructions.
246 class A64I_condcmpimm<bit sf, bit op, bit o2, bit o3, bit s,
247                       dag outs, dag ins, string asmstr,
248                       list<dag> patterns, InstrItinClass itin>
249   : A64Inst<outs, ins, asmstr, patterns, itin> {
250   bits<5> Rn;
251   bits<5> UImm5;
252   bits<4> NZCVImm;
253   bits<4> Cond;
254
255   let Inst{31} = sf;
256   let Inst{30} = op;
257   let Inst{29} = s;
258   let Inst{28-21} = 0b11010010;
259   let Inst{20-16} = UImm5;
260   let Inst{15-12} = Cond;
261   let Inst{11} = 0b1;
262   let Inst{10} = o2;
263   let Inst{9-5} = Rn;
264   let Inst{4} = o3;
265   let Inst{3-0} = NZCVImm;
266 }
267
268 // Format for conditional compare (register) instructions.
269 class A64I_condcmpreg<bit sf, bit op, bit o2, bit o3, bit s,
270                       dag outs, dag ins, string asmstr,
271                       list<dag> patterns, InstrItinClass itin>
272   : A64Inst<outs, ins, asmstr, patterns, itin> {
273   bits<5> Rn;
274   bits<5> Rm;
275   bits<4> NZCVImm;
276   bits<4> Cond;
277
278
279   let Inst{31} = sf;
280   let Inst{30} = op;
281   let Inst{29} = s;
282   let Inst{28-21} = 0b11010010;
283   let Inst{20-16} = Rm;
284   let Inst{15-12} = Cond;
285   let Inst{11} = 0b0;
286   let Inst{10} = o2;
287   let Inst{9-5} = Rn;
288   let Inst{4} = o3;
289   let Inst{3-0} = NZCVImm;
290 }
291
292 // Format for conditional select instructions.
293 class A64I_condsel<bit sf, bit op, bit s, bits<2> op2,
294                    dag outs, dag ins, string asmstr,
295                    list<dag> patterns, InstrItinClass itin>
296   : A64InstRdnm<outs, ins, asmstr, patterns, itin> {
297   bits<4> Cond;
298
299   let Inst{31} = sf;
300   let Inst{30} = op;
301   let Inst{29} = s;
302   let Inst{28-21} = 0b11010100;
303   // Inherit Rm in 20-16
304   let Inst{15-12} = Cond;
305   let Inst{11-10} = op2;
306   // Inherit Rn in 9-5
307   // Inherit Rd in 4-0
308 }
309
310 // Format for data processing (1 source) instructions
311 class A64I_dp_1src<bit sf, bit S, bits<5> opcode2, bits<6> opcode,
312                 string asmstr, dag outs, dag ins,
313                 list<dag> patterns, InstrItinClass itin>
314   : A64InstRdn<outs, ins, asmstr, patterns, itin> {
315   let Inst{31} = sf;
316   let Inst{30} = 0b1;
317   let Inst{29} = S;
318   let Inst{28-21} = 0b11010110;
319   let Inst{20-16} = opcode2;
320   let Inst{15-10} = opcode;
321 }
322
323 // Format for data processing (2 source) instructions
324 class A64I_dp_2src<bit sf, bits<6> opcode, bit S,
325                 string asmstr, dag outs, dag ins,
326                 list<dag> patterns, InstrItinClass itin>
327   : A64InstRdnm<outs, ins, asmstr, patterns, itin> {
328   let Inst{31} = sf;
329   let Inst{30} = 0b0;
330   let Inst{29} = S;
331   let Inst{28-21} = 0b11010110;
332   let Inst{15-10} = opcode;
333 }
334
335 // Format for data-processing (3 source) instructions
336
337 class A64I_dp3<bit sf, bits<6> opcode,
338                dag outs, dag ins, string asmstr,
339                list<dag> patterns, InstrItinClass itin>
340   : A64InstRdnm<outs, ins, asmstr, patterns, itin> {
341   bits<5> Ra;
342
343   let Inst{31} = sf;
344   let Inst{30-29} = opcode{5-4};
345   let Inst{28-24} = 0b11011;
346   let Inst{23-21} = opcode{3-1};
347   // Inherits Rm in 20-16
348   let Inst{15} = opcode{0};
349   let Inst{14-10} = Ra;
350   // Inherits Rn in 9-5
351   // Inherits Rd in 4-0
352 }
353
354 // Format for exception generation instructions
355 class A64I_exception<bits<3> opc, bits<3> op2, bits<2> ll,
356                      dag outs, dag ins, string asmstr,
357                      list<dag> patterns, InstrItinClass itin>
358   : A64Inst<outs, ins, asmstr, patterns, itin> {
359   bits<16> UImm16;
360
361   let Inst{31-24} = 0b11010100;
362   let Inst{23-21} = opc;
363   let Inst{20-5} = UImm16;
364   let Inst{4-2} = op2;
365   let Inst{1-0} = ll;
366 }
367
368 // Format for extract (immediate) instructions
369 class A64I_extract<bit sf, bits<3> op, bit n,
370                    dag outs, dag ins, string asmstr,
371                    list<dag> patterns, InstrItinClass itin>
372   : A64InstRdnm<outs, ins, asmstr, patterns, itin> {
373   bits<6> LSB;
374
375   let Inst{31} = sf;
376   let Inst{30-29} = op{2-1};
377   let Inst{28-23} = 0b100111;
378   let Inst{22} = n;
379   let Inst{21} = op{0};
380   // Inherits Rm in bits 20-16
381   let Inst{15-10} = LSB;
382   // Inherits Rn in 9-5
383   // Inherits Rd in 4-0
384 }
385
386 let Predicates = [HasFPARMv8] in {
387
388 // Format for floating-point compare instructions.
389 class A64I_fpcmp<bit m, bit s, bits<2> type, bits<2> op, bits<5> opcode2,
390                 dag outs, dag ins, string asmstr,
391                 list<dag> patterns, InstrItinClass itin>
392   : A64Inst<outs, ins, asmstr, patterns, itin> {
393   bits<5> Rn;
394   bits<5> Rm;
395
396   let Inst{31} = m;
397   let Inst{30} = 0b0;
398   let Inst{29} = s;
399   let Inst{28-24} = 0b11110;
400   let Inst{23-22} = type;
401   let Inst{21} = 0b1;
402   let Inst{20-16} = Rm;
403   let Inst{15-14} = op;
404   let Inst{13-10} = 0b1000;
405   let Inst{9-5} = Rn;
406   let Inst{4-0} = opcode2;
407 }
408
409 // Format for floating-point conditional compare instructions.
410 class A64I_fpccmp<bit m, bit s, bits<2> type, bit op,
411                  dag outs, dag ins, string asmstr,
412                  list<dag> patterns, InstrItinClass itin>
413   : A64InstRdn<outs, ins, asmstr, patterns, itin> {
414   bits<5> Rn;
415   bits<5> Rm;
416   bits<4> NZCVImm;
417   bits<4> Cond;
418
419   let Inst{31} = m;
420   let Inst{30} = 0b0;
421   let Inst{29} = s;
422   let Inst{28-24} = 0b11110;
423   let Inst{23-22} = type;
424   let Inst{21} = 0b1;
425   let Inst{20-16} = Rm;
426   let Inst{15-12} = Cond;
427   let Inst{11-10} = 0b01;
428   let Inst{9-5} = Rn;
429   let Inst{4} = op;
430   let Inst{3-0} = NZCVImm;
431 }
432
433 // Format for floating-point conditional select instructions.
434 class A64I_fpcondsel<bit m, bit s, bits<2> type,
435                      dag outs, dag ins, string asmstr,
436                      list<dag> patterns, InstrItinClass itin>
437   : A64InstRdnm<outs, ins, asmstr, patterns, itin> {
438   bits<4> Cond;
439
440   let Inst{31} = m;
441   let Inst{30} = 0b0;
442   let Inst{29} = s;
443   let Inst{28-24} = 0b11110;
444   let Inst{23-22} = type;
445   let Inst{21} = 0b1;
446   // Inherit Rm in 20-16
447   let Inst{15-12} = Cond;
448   let Inst{11-10} = 0b11;
449   // Inherit Rn in 9-5
450   // Inherit Rd in 4-0
451 }
452
453
454 // Format for floating-point data-processing (1 source) instructions.
455 class A64I_fpdp1<bit m, bit s, bits<2> type, bits<6> opcode,
456                  dag outs, dag ins, string asmstr,
457                  list<dag> patterns, InstrItinClass itin>
458   : A64InstRdn<outs, ins, asmstr, patterns, itin> {
459   let Inst{31} = m;
460   let Inst{30} = 0b0;
461   let Inst{29} = s;
462   let Inst{28-24} = 0b11110;
463   let Inst{23-22} = type;
464   let Inst{21} = 0b1;
465   let Inst{20-15} = opcode;
466   let Inst{14-10} = 0b10000;
467   // Inherit Rn in 9-5
468   // Inherit Rd in 4-0
469 }
470
471 // Format for floating-point data-processing (2 sources) instructions.
472 class A64I_fpdp2<bit m, bit s, bits<2> type, bits<4> opcode,
473                  dag outs, dag ins, string asmstr,
474                  list<dag> patterns, InstrItinClass itin>
475   : A64InstRdnm<outs, ins, asmstr, patterns, itin> {
476   let Inst{31} = m;
477   let Inst{30} = 0b0;
478   let Inst{29} = s;
479   let Inst{28-24} = 0b11110;
480   let Inst{23-22} = type;
481   let Inst{21} = 0b1;
482   // Inherit Rm in 20-16
483   let Inst{15-12} = opcode;
484   let Inst{11-10} = 0b10;
485   // Inherit Rn in 9-5
486   // Inherit Rd in 4-0
487 }
488
489 // Format for floating-point data-processing (3 sources) instructions.
490 class A64I_fpdp3<bit m, bit s, bits<2> type, bit o1, bit o0,
491                  dag outs, dag ins, string asmstr,
492                  list<dag> patterns, InstrItinClass itin>
493   : A64InstRdnm<outs, ins, asmstr, patterns, itin> {
494   bits<5> Ra;
495
496   let Inst{31} = m;
497   let Inst{30} = 0b0;
498   let Inst{29} = s;
499   let Inst{28-24} = 0b11111;
500   let Inst{23-22} = type;
501   let Inst{21} = o1;
502   // Inherit Rm in 20-16
503   let Inst{15} = o0;
504   let Inst{14-10} = Ra;
505   // Inherit Rn in 9-5
506   // Inherit Rd in 4-0
507 }
508
509 // Format for floating-point <-> fixed-point conversion instructions.
510 class A64I_fpfixed<bit sf, bit s, bits<2> type, bits<2> mode, bits<3> opcode,
511                  dag outs, dag ins, string asmstr,
512                  list<dag> patterns, InstrItinClass itin>
513   : A64InstRdn<outs, ins, asmstr, patterns, itin> {
514   bits<6> Scale;
515
516   let Inst{31} = sf;
517   let Inst{30} = 0b0;
518   let Inst{29} = s;
519   let Inst{28-24} = 0b11110;
520   let Inst{23-22} = type;
521   let Inst{21} = 0b0;
522   let Inst{20-19} = mode;
523   let Inst{18-16} = opcode;
524   let Inst{15-10} = Scale;
525   // Inherit Rn in 9-5
526   // Inherit Rd in 4-0
527 }
528
529 // Format for floating-point <-> integer conversion instructions.
530 class A64I_fpint<bit sf, bit s, bits<2> type, bits<2> rmode, bits<3> opcode,
531                  dag outs, dag ins, string asmstr,
532                  list<dag> patterns, InstrItinClass itin>
533   : A64InstRdn<outs, ins, asmstr, patterns, itin> {
534   let Inst{31} = sf;
535   let Inst{30} = 0b0;
536   let Inst{29} = s;
537   let Inst{28-24} = 0b11110;
538   let Inst{23-22} = type;
539   let Inst{21} = 0b1;
540   let Inst{20-19} = rmode;
541   let Inst{18-16} = opcode;
542   let Inst{15-10} = 0b000000;
543   // Inherit Rn in 9-5
544   // Inherit Rd in 4-0
545 }
546
547
548 // Format for floating-point immediate instructions.
549 class A64I_fpimm<bit m, bit s, bits<2> type, bits<5> imm5,
550                  dag outs, dag ins, string asmstr,
551                  list<dag> patterns, InstrItinClass itin>
552   : A64InstRd<outs, ins, asmstr, patterns, itin> {
553   bits<8> Imm8;
554
555   let Inst{31} = m;
556   let Inst{30} = 0b0;
557   let Inst{29} = s;
558   let Inst{28-24} = 0b11110;
559   let Inst{23-22} = type;
560   let Inst{21} = 0b1;
561   let Inst{20-13} = Imm8;
562   let Inst{12-10} = 0b100;
563   let Inst{9-5} = imm5;
564   // Inherit Rd in 4-0
565 }
566
567 }
568
569 // Format for load-register (literal) instructions.
570 class A64I_LDRlit<bits<2> opc, bit v,
571                   dag outs, dag ins, string asmstr,
572                   list<dag> patterns, InstrItinClass itin>
573   : A64InstRt<outs, ins, asmstr, patterns, itin> {
574   bits<19> Imm19;
575
576   let Inst{31-30} = opc;
577   let Inst{29-27} = 0b011;
578   let Inst{26} = v;
579   let Inst{25-24} = 0b00;
580   let Inst{23-5} = Imm19;
581   // Inherit Rt in 4-0
582 }
583
584 // Format for load-store exclusive instructions.
585 class A64I_LDSTex_tn<bits<2> size, bit o2, bit L, bit o1, bit o0,
586                  dag outs, dag ins, string asmstr,
587                  list <dag> patterns, InstrItinClass itin>
588   : A64InstRtn<outs, ins, asmstr, patterns, itin> {
589   let Inst{31-30} = size;
590   let Inst{29-24} = 0b001000;
591   let Inst{23} = o2;
592   let Inst{22} = L;
593   let Inst{21} = o1;
594   let Inst{15} = o0;
595 }
596
597 class A64I_LDSTex_tt2n<bits<2> size, bit o2, bit L, bit o1, bit o0,
598                      dag outs, dag ins, string asmstr,
599                      list <dag> patterns, InstrItinClass itin>:
600       A64I_LDSTex_tn<size, o2, L, o1, o0, outs, ins, asmstr, patterns, itin>{
601    bits<5> Rt2;
602    let Inst{14-10} = Rt2;
603 }
604
605 class A64I_LDSTex_stn<bits<2> size, bit o2, bit L, bit o1, bit o0,
606                      dag outs, dag ins, string asmstr,
607                      list <dag> patterns, InstrItinClass itin>:
608       A64I_LDSTex_tn<size, o2, L, o1, o0, outs, ins, asmstr, patterns, itin>{
609    bits<5> Rs;
610    let Inst{20-16} = Rs;
611 }
612
613 class A64I_LDSTex_stt2n<bits<2> size, bit o2, bit L, bit o1, bit o0,
614                      dag outs, dag ins, string asmstr,
615                      list <dag> patterns, InstrItinClass itin>:
616       A64I_LDSTex_stn<size, o2, L, o1, o0, outs, ins, asmstr, patterns, itin>{
617    bits<5> Rt2;
618    let Inst{14-10} = Rt2;
619 }
620
621 // Format for load-store register (immediate post-indexed) instructions
622 class A64I_LSpostind<bits<2> size, bit v, bits<2> opc,
623                      dag outs, dag ins, string asmstr,
624                      list<dag> patterns, InstrItinClass itin>
625   : A64InstRtn<outs, ins, asmstr, patterns, itin> {
626   bits<9> SImm9;
627
628   let Inst{31-30} = size;
629   let Inst{29-27} = 0b111;
630   let Inst{26} = v;
631   let Inst{25-24} = 0b00;
632   let Inst{23-22} = opc;
633   let Inst{21} = 0b0;
634   let Inst{20-12} = SImm9;
635   let Inst{11-10} = 0b01;
636   // Inherit Rn in 9-5
637   // Inherit Rt in 4-0
638 }
639
640 // Format for load-store register (immediate pre-indexed) instructions
641 class A64I_LSpreind<bits<2> size, bit v, bits<2> opc,
642                     dag outs, dag ins, string asmstr,
643                     list<dag> patterns, InstrItinClass itin>
644   : A64InstRtn<outs, ins, asmstr, patterns, itin> {
645   bits<9> SImm9;
646
647
648   let Inst{31-30} = size;
649   let Inst{29-27} = 0b111;
650   let Inst{26} = v;
651   let Inst{25-24} = 0b00;
652   let Inst{23-22} = opc;
653   let Inst{21} = 0b0;
654   let Inst{20-12} = SImm9;
655   let Inst{11-10} = 0b11;
656   // Inherit Rn in 9-5
657   // Inherit Rt in 4-0
658 }
659
660 // Format for load-store register (unprivileged) instructions
661 class A64I_LSunpriv<bits<2> size, bit v, bits<2> opc,
662                     dag outs, dag ins, string asmstr,
663                     list<dag> patterns, InstrItinClass itin>
664   : A64InstRtn<outs, ins, asmstr, patterns, itin> {
665   bits<9> SImm9;
666
667
668   let Inst{31-30} = size;
669   let Inst{29-27} = 0b111;
670   let Inst{26} = v;
671   let Inst{25-24} = 0b00;
672   let Inst{23-22} = opc;
673   let Inst{21} = 0b0;
674   let Inst{20-12} = SImm9;
675   let Inst{11-10} = 0b10;
676   // Inherit Rn in 9-5
677   // Inherit Rt in 4-0
678 }
679
680 // Format for load-store (unscaled immediate) instructions.
681 class A64I_LSunalimm<bits<2> size, bit v, bits<2> opc,
682                      dag outs, dag ins, string asmstr,
683                      list<dag> patterns, InstrItinClass itin>
684   : A64InstRtn<outs, ins, asmstr, patterns, itin> {
685   bits<9> SImm9;
686
687   let Inst{31-30} = size;
688   let Inst{29-27} = 0b111;
689   let Inst{26} = v;
690   let Inst{25-24} = 0b00;
691   let Inst{23-22} = opc;
692   let Inst{21} = 0b0;
693   let Inst{20-12} = SImm9;
694   let Inst{11-10} = 0b00;
695   // Inherit Rn in 9-5
696   // Inherit Rt in 4-0
697 }
698
699
700 // Format for load-store (unsigned immediate) instructions.
701 class A64I_LSunsigimm<bits<2> size, bit v, bits<2> opc,
702                       dag outs, dag ins, string asmstr,
703                       list<dag> patterns, InstrItinClass itin>
704   : A64InstRtn<outs, ins, asmstr, patterns, itin> {
705   bits<12> UImm12;
706
707   let Inst{31-30} = size;
708   let Inst{29-27} = 0b111;
709   let Inst{26} = v;
710   let Inst{25-24} = 0b01;
711   let Inst{23-22} = opc;
712   let Inst{21-10} = UImm12;
713 }
714
715 // Format for load-store register (register offset) instructions.
716 class A64I_LSregoff<bits<2> size, bit v, bits<2> opc, bit optionlo,
717                     dag outs, dag ins, string asmstr,
718                     list<dag> patterns, InstrItinClass itin>
719   : A64InstRtn<outs, ins, asmstr, patterns, itin> {
720   bits<5> Rm;
721
722   // Complex operand selection needed for these instructions, so they
723   // need an "addr" field for encoding/decoding to be generated.
724   bits<3> Ext;
725   // OptionHi = Ext{2-1}
726   // S = Ext{0}
727
728   let Inst{31-30} = size;
729   let Inst{29-27} = 0b111;
730   let Inst{26} = v;
731   let Inst{25-24} = 0b00;
732   let Inst{23-22} = opc;
733   let Inst{21} = 0b1;
734   let Inst{20-16} = Rm;
735   let Inst{15-14} = Ext{2-1};
736   let Inst{13} = optionlo;
737   let Inst{12} = Ext{0};
738   let Inst{11-10} = 0b10;
739   // Inherits Rn in 9-5
740   // Inherits Rt in 4-0
741
742   let AddedComplexity = 50;
743 }
744
745 // Format for Load-store register pair (offset) instructions
746 class A64I_LSPoffset<bits<2> opc, bit v, bit l,
747                       dag outs, dag ins, string asmstr,
748                       list<dag> patterns, InstrItinClass itin>
749   : A64InstRtt2n<outs, ins, asmstr, patterns, itin> {
750   bits<7> SImm7;
751
752   let Inst{31-30} = opc;
753   let Inst{29-27} = 0b101;
754   let Inst{26} = v;
755   let Inst{25-23} = 0b010;
756   let Inst{22} = l;
757   let Inst{21-15} = SImm7;
758   // Inherit Rt2 in 14-10
759   // Inherit Rn in 9-5
760   // Inherit Rt in 4-0
761 }
762
763 // Format for Load-store register pair (post-indexed) instructions
764 class A64I_LSPpostind<bits<2> opc, bit v, bit l,
765                       dag outs, dag ins, string asmstr,
766                       list<dag> patterns, InstrItinClass itin>
767   : A64InstRtt2n<outs, ins, asmstr, patterns, itin> {
768   bits<7> SImm7;
769
770   let Inst{31-30} = opc;
771   let Inst{29-27} = 0b101;
772   let Inst{26} = v;
773   let Inst{25-23} = 0b001;
774   let Inst{22} = l;
775   let Inst{21-15} = SImm7;
776   // Inherit Rt2 in 14-10
777   // Inherit Rn in 9-5
778   // Inherit Rt in 4-0
779 }
780
781 // Format for Load-store register pair (pre-indexed) instructions
782 class A64I_LSPpreind<bits<2> opc, bit v, bit l,
783                       dag outs, dag ins, string asmstr,
784                       list<dag> patterns, InstrItinClass itin>
785   : A64InstRtt2n<outs, ins, asmstr, patterns, itin> {
786   bits<7> SImm7;
787
788   let Inst{31-30} = opc;
789   let Inst{29-27} = 0b101;
790   let Inst{26} = v;
791   let Inst{25-23} = 0b011;
792   let Inst{22} = l;
793   let Inst{21-15} = SImm7;
794   // Inherit Rt2 in 14-10
795   // Inherit Rn in 9-5
796   // Inherit Rt in 4-0
797 }
798
799 // Format for Load-store non-temporal register pair (offset) instructions
800 class A64I_LSPnontemp<bits<2> opc, bit v, bit l,
801                       dag outs, dag ins, string asmstr,
802                       list<dag> patterns, InstrItinClass itin>
803   : A64InstRtt2n<outs, ins, asmstr, patterns, itin> {
804   bits<7> SImm7;
805
806   let Inst{31-30} = opc;
807   let Inst{29-27} = 0b101;
808   let Inst{26} = v;
809   let Inst{25-23} = 0b000;
810   let Inst{22} = l;
811   let Inst{21-15} = SImm7;
812   // Inherit Rt2 in 14-10
813   // Inherit Rn in 9-5
814   // Inherit Rt in 4-0
815 }
816
817 // Format for Logical (immediate) instructions
818 class A64I_logicalimm<bit sf, bits<2> opc,
819                       dag outs, dag ins, string asmstr,
820                       list<dag> patterns, InstrItinClass itin>
821   : A64InstRdn<outs, ins, asmstr, patterns, itin> {
822   bit N;
823   bits<6> ImmR;
824   bits<6> ImmS;
825
826   // N, ImmR and ImmS have no separate existence in any assembly syntax (or for
827   // selection), so we'll combine them into a single field here.
828   bits<13> Imm;
829   // N = Imm{12};
830   // ImmR = Imm{11-6};
831   // ImmS = Imm{5-0};
832
833   let Inst{31} = sf;
834   let Inst{30-29} = opc;
835   let Inst{28-23} = 0b100100;
836   let Inst{22} = Imm{12};
837   let Inst{21-16} = Imm{11-6};
838   let Inst{15-10} = Imm{5-0};
839   // Rn inherited in 9-5
840   // Rd inherited in 4-0
841 }
842
843 // Format for Logical (shifted register) instructions
844 class A64I_logicalshift<bit sf, bits<2> opc, bits<2> shift, bit N,
845                         dag outs, dag ins, string asmstr,
846                         list<dag> patterns, InstrItinClass itin>
847   : A64InstRdnm<outs, ins, asmstr, patterns, itin> {
848   bits<6> Imm6;
849
850   let Inst{31} = sf;
851   let Inst{30-29} = opc;
852   let Inst{28-24} = 0b01010;
853   let Inst{23-22} = shift;
854   let Inst{21} = N;
855   // Rm inherited
856   let Inst{15-10} = Imm6;
857   // Rn inherited
858   // Rd inherited
859 }
860
861 // Format for Move wide (immediate)
862 class A64I_movw<bit sf, bits<2> opc,
863                 dag outs, dag ins, string asmstr,
864                 list<dag> patterns, InstrItinClass itin>
865   : A64InstRd<outs, ins, asmstr, patterns, itin> {
866   bits<16> UImm16;
867   bits<2> Shift; // Called "hw" officially
868
869   let Inst{31} = sf;
870   let Inst{30-29} = opc;
871   let Inst{28-23} = 0b100101;
872   let Inst{22-21} = Shift;
873   let Inst{20-5} = UImm16;
874   // Inherits Rd in 4-0
875 }
876
877 // Format for PC-relative addressing instructions, ADR and ADRP.
878 class A64I_PCADR<bit op,
879                  dag outs, dag ins, string asmstr,
880                  list<dag> patterns, InstrItinClass itin>
881   : A64InstRd<outs, ins, asmstr, patterns, itin> {
882   bits<21> Label;
883
884   let Inst{31} = op;
885   let Inst{30-29} = Label{1-0};
886   let Inst{28-24} = 0b10000;
887   let Inst{23-5} = Label{20-2};
888 }
889
890 // Format for system instructions
891 class A64I_system<bit l,
892                   dag outs, dag ins, string asmstr,
893                   list<dag> patterns, InstrItinClass itin>
894   : A64Inst<outs, ins, asmstr, patterns, itin> {
895   bits<2> Op0;
896   bits<3> Op1;
897   bits<4> CRn;
898   bits<4> CRm;
899   bits<3> Op2;
900   bits<5> Rt;
901
902   let Inst{31-22} = 0b1101010100;
903   let Inst{21} = l;
904   let Inst{20-19} = Op0;
905   let Inst{18-16} = Op1;
906   let Inst{15-12} = CRn;
907   let Inst{11-8} = CRm;
908   let Inst{7-5} = Op2;
909   let Inst{4-0} = Rt;
910
911   // These instructions can do horrible things.
912   let hasSideEffects = 1;
913 }
914
915 // Format for unconditional branch (immediate) instructions
916 class A64I_Bimm<bit op,
917                 dag outs, dag ins, string asmstr,
918                 list<dag> patterns, InstrItinClass itin>
919   : A64Inst<outs, ins, asmstr, patterns, itin> {
920   // Doubly special in not even sharing register fields with other
921   // instructions, so we create our own Rn here.
922   bits<26> Label;
923
924   let Inst{31} = op;
925   let Inst{30-26} = 0b00101;
926   let Inst{25-0} = Label;
927 }
928
929 // Format for Test & branch (immediate) instructions
930 class A64I_TBimm<bit op,
931                 dag outs, dag ins, string asmstr,
932                 list<dag> patterns, InstrItinClass itin>
933   : A64InstRt<outs, ins, asmstr, patterns, itin> {
934   // Doubly special in not even sharing register fields with other
935   // instructions, so we create our own Rn here.
936   bits<6> Imm;
937   bits<14> Label;
938
939   let Inst{31} = Imm{5};
940   let Inst{30-25} = 0b011011;
941   let Inst{24} = op;
942   let Inst{23-19} = Imm{4-0};
943   let Inst{18-5} = Label;
944   // Inherit Rt in 4-0
945 }
946
947 // Format for Unconditional branch (register) instructions, including
948 // RET.  Shares no fields with instructions further up the hierarchy
949 // so top-level.
950 class A64I_Breg<bits<4> opc, bits<5> op2, bits<6> op3, bits<5> op4,
951                 dag outs, dag ins, string asmstr,
952                 list<dag> patterns, InstrItinClass itin>
953   : A64Inst<outs, ins, asmstr, patterns, itin> {
954   // Doubly special in not even sharing register fields with other
955   // instructions, so we create our own Rn here.
956   bits<5> Rn;
957
958   let Inst{31-25} = 0b1101011;
959   let Inst{24-21} = opc;
960   let Inst{20-16} = op2;
961   let Inst{15-10} = op3;
962   let Inst{9-5}   = Rn;
963   let Inst{4-0}   = op4;
964 }
965
966
967 //===----------------------------------------------------------------------===//
968 //
969 // Neon Instruction Format Definitions.
970 //
971
972 let Predicates = [HasNEON] in {
973
974 class NeonInstAlias<string Asm, dag Result, bit Emit = 0b1>
975   : InstAlias<Asm, Result, Emit> {
976 }
977
978 // Format AdvSIMD 3 vector registers with same vector type
979 class NeonI_3VSame<bit q, bit u, bits<2> size, bits<5> opcode,
980                    dag outs, dag ins, string asmstr,
981                    list<dag> patterns, InstrItinClass itin>
982   : A64InstRdnm<outs, ins, asmstr, patterns, itin> {
983   let Inst{31} = 0b0;
984   let Inst{30} = q;
985   let Inst{29} = u;
986   let Inst{28-24} = 0b01110;
987   let Inst{23-22} = size;
988   let Inst{21} = 0b1;
989   // Inherit Rm in 20-16
990   let Inst{15-11} = opcode;
991   let Inst{10} = 0b1;
992   // Inherit Rn in 9-5
993   // Inherit Rd in 4-0
994 }
995
996 // Format AdvSIMD 3 vector registers with different vector type
997 class NeonI_3VDiff<bit q, bit u, bits<2> size, bits<4> opcode,
998                    dag outs, dag ins, string asmstr,
999                    list<dag> patterns, InstrItinClass itin>
1000   : A64InstRdnm<outs, ins, asmstr, patterns, itin> {
1001   let Inst{31} = 0b0;
1002   let Inst{30} = q;
1003   let Inst{29} = u;
1004   let Inst{28-24} = 0b01110;
1005   let Inst{23-22} = size;
1006   let Inst{21} = 0b1;
1007   // Inherit Rm in 20-16
1008   let Inst{15-12} = opcode;
1009   let Inst{11} = 0b0;
1010   let Inst{10} = 0b0;
1011   // Inherit Rn in 9-5
1012   // Inherit Rd in 4-0
1013 }
1014
1015 // Format AdvSIMD two registers and an element
1016 class NeonI_2VElem<bit q, bit u, bits<2> size, bits<4> opcode,
1017                    dag outs, dag ins, string asmstr,
1018                    list<dag> patterns, InstrItinClass itin>
1019   : A64InstRdnm<outs, ins, asmstr, patterns, itin> {
1020   let Inst{31} = 0b0;
1021   let Inst{30} = q;
1022   let Inst{29} = u;
1023   let Inst{28-24} = 0b01111;
1024   let Inst{23-22} = size;
1025   // l in Inst{21}
1026   // m in Inst{20}
1027   // Inherit Rm in 19-16
1028   let Inst{15-12} = opcode;
1029   // h in Inst{11}
1030   let Inst{10} = 0b0;
1031   // Inherit Rn in 9-5
1032   // Inherit Rd in 4-0
1033 }
1034
1035 // Format AdvSIMD 1 vector register with modified immediate
1036 class NeonI_1VModImm<bit q, bit op,
1037                      dag outs, dag ins, string asmstr,
1038                      list<dag> patterns, InstrItinClass itin>
1039   : A64InstRd<outs,ins, asmstr, patterns, itin> {
1040   bits<8> Imm;
1041   bits<4> cmode;
1042   let Inst{31} = 0b0;
1043   let Inst{30} = q;
1044   let Inst{29} = op;
1045   let Inst{28-19} = 0b0111100000;
1046   let Inst{15-12} = cmode;
1047   let Inst{11} = 0b0; // o2
1048   let Inst{10} = 1;
1049   // Inherit Rd in 4-0
1050   let Inst{18-16} = Imm{7-5}; // imm a:b:c
1051   let Inst{9-5} = Imm{4-0};   // imm d:e:f:g:h
1052 }
1053
1054 // Format AdvSIMD 3 scalar registers with same type
1055
1056 class NeonI_Scalar3Same<bit u, bits<2> size, bits<5> opcode,
1057                           dag outs, dag ins, string asmstr,
1058                           list<dag> patterns, InstrItinClass itin>
1059   : A64InstRdnm<outs, ins, asmstr, patterns, itin> {
1060   let Inst{31} = 0b0;
1061   let Inst{30} = 0b1;
1062   let Inst{29} = u;
1063   let Inst{28-24} = 0b11110;
1064   let Inst{23-22} = size;
1065   let Inst{21} = 0b1;
1066   // Inherit Rm in 20-16
1067   let Inst{15-11} = opcode;
1068   let Inst{10} = 0b1;
1069   // Inherit Rn in 9-5
1070   // Inherit Rd in 4-0
1071 }
1072
1073
1074 // Format AdvSIMD 2 vector registers miscellaneous
1075 class NeonI_2VMisc<bit q, bit u, bits<2> size, bits<5> opcode,
1076                    dag outs, dag ins, string asmstr,
1077                    list<dag> patterns, InstrItinClass itin>
1078   : A64InstRdn<outs, ins, asmstr, patterns, itin> {
1079   let Inst{31} = 0b0;
1080   let Inst{30} = q;
1081   let Inst{29} = u;
1082   let Inst{28-24} = 0b01110;
1083   let Inst{23-22} = size;
1084   let Inst{21-17} = 0b10000;
1085   let Inst{16-12} = opcode;
1086   let Inst{11-10} = 0b10;
1087
1088   // Inherit Rn in 9-5
1089   // Inherit Rd in 4-0
1090 }
1091
1092 // Format AdvSIMD 2 vector 1 immediate shift
1093 class NeonI_2VShiftImm<bit q, bit u, bits<5> opcode,
1094                        dag outs, dag ins, string asmstr,
1095                        list<dag> patterns, InstrItinClass itin>
1096   : A64InstRdn<outs, ins, asmstr, patterns, itin> {
1097   bits<7> Imm;
1098   let Inst{31} = 0b0;
1099   let Inst{30} = q;
1100   let Inst{29} = u;
1101   let Inst{28-23} = 0b011110;
1102   let Inst{22-16} = Imm;
1103   let Inst{15-11} = opcode;
1104   let Inst{10} = 0b1;
1105   
1106   // Inherit Rn in 9-5
1107   // Inherit Rd in 4-0
1108 }
1109
1110 // Format AdvSIMD duplicate and insert
1111 class NeonI_copy<bit q, bit op, bits<4> imm4,
1112                  dag outs, dag ins, string asmstr,
1113                  list<dag> patterns, InstrItinClass itin>
1114   : A64InstRdn<outs, ins, asmstr, patterns, itin> {
1115   bits<5> Imm5;
1116   let Inst{31} = 0b0;
1117   let Inst{30} = q;
1118   let Inst{29} = op;
1119   let Inst{28-21} = 0b01110000;
1120   let Inst{20-16} = Imm5;
1121   let Inst{15} = 0b0;
1122   let Inst{14-11} = imm4;
1123   let Inst{10} = 0b1;
1124   
1125   // Inherit Rn in 9-5
1126   // Inherit Rd in 4-0
1127 }
1128 // Format AdvSIMD insert from element to vector
1129 class NeonI_insert<bit q, bit op,
1130                   dag outs, dag ins, string asmstr,
1131                   list<dag> patterns, InstrItinClass itin>
1132   : A64InstRdn<outs, ins, asmstr, patterns, itin> {
1133   bits<5> Imm5;
1134   bits<4> Imm4;
1135   let Inst{31} = 0b0;
1136   let Inst{30} = q;
1137   let Inst{29} = op;
1138   let Inst{28-21} = 0b01110000;
1139   let Inst{20-16} = Imm5;
1140   let Inst{15} = 0b0;
1141   let Inst{14-11} = Imm4;
1142   let Inst{10} = 0b1;
1143   
1144   // Inherit Rn in 9-5
1145   // Inherit Rd in 4-0
1146 }
1147
1148 // Format AdvSIMD scalar pairwise
1149 class NeonI_ScalarPair<bit u, bits<2> size, bits<5> opcode,
1150                           dag outs, dag ins, string asmstr,
1151                           list<dag> patterns, InstrItinClass itin>
1152   : A64InstRdn<outs, ins, asmstr, patterns, itin> {
1153   let Inst{31} = 0b0;
1154   let Inst{30} = 0b1;
1155   let Inst{29} = u;
1156   let Inst{28-24} = 0b11110;
1157   let Inst{23-22} = size;
1158   let Inst{21-17} = 0b11000;
1159   let Inst{16-12} = opcode;
1160   let Inst{11-10} = 0b10;
1161
1162   // Inherit Rn in 9-5
1163   // Inherit Rd in 4-0
1164 }
1165
1166 // Format AdvSIMD 2 vector across lanes
1167 class NeonI_2VAcross<bit q, bit u, bits<2> size, bits<5> opcode,
1168                      dag outs, dag ins, string asmstr,
1169                      list<dag> patterns, InstrItinClass itin>
1170   : A64InstRdn<outs, ins, asmstr, patterns, itin>
1171 {
1172   let Inst{31} = 0b0;
1173   let Inst{30} = q;
1174   let Inst{29} = u;
1175   let Inst{28-24} = 0b01110;
1176   let Inst{23-22} = size;
1177   let Inst{21-17} = 0b11000;
1178   let Inst{16-12} = opcode;
1179   let Inst{11-10} = 0b10;
1180
1181   // Inherit Rn in 9-5
1182   // Inherit Rd in 4-0
1183 }
1184
1185 // Format AdvSIMD scalar two registers miscellaneous
1186 class NeonI_Scalar2SameMisc<bit u, bits<2> size, bits<5> opcode, dag outs, dag ins,
1187                             string asmstr, list<dag> patterns, InstrItinClass itin>
1188   : A64InstRdn<outs, ins, asmstr, patterns, itin> {
1189   let Inst{31} = 0b0;
1190   let Inst{30} = 0b1;
1191   let Inst{29} = u;
1192   let Inst{28-24} = 0b11110;
1193   let Inst{23-22} = size;
1194   let Inst{21-17} = 0b10000;
1195   let Inst{16-12} = opcode;
1196   let Inst{11-10} = 0b10;
1197   // Inherit Rn in 9-5
1198   // Inherit Rd in 4-0
1199 }
1200
1201 // Format AdvSIMD vector load/store multiple N-element structure
1202 class NeonI_LdStMult<bit q, bit l, bits<4> opcode, bits<2> size,
1203                     dag outs, dag ins, string asmstr,
1204                     list<dag> patterns, InstrItinClass itin>
1205   : A64InstRtn<outs, ins, asmstr, patterns, itin>
1206 {
1207   let Inst{31} = 0b0;
1208   let Inst{30} = q;
1209   let Inst{29-23} = 0b0011000;
1210   let Inst{22} = l;
1211   let Inst{21-16} = 0b000000;
1212   let Inst{15-12} = opcode;
1213   let Inst{11-10} = size;
1214   
1215   // Inherit Rn in 9-5
1216   // Inherit Rt in 4-0
1217 }
1218
1219 // Format AdvSIMD 3 scalar registers with different type
1220
1221 class NeonI_Scalar3Diff<bit u, bits<2> size, bits<4> opcode,
1222                           dag outs, dag ins, string asmstr,
1223                           list<dag> patterns, InstrItinClass itin>
1224   : A64InstRdnm<outs, ins, asmstr, patterns, itin> {
1225   let Inst{31-30} = 0b01;
1226   let Inst{29} = u;
1227   let Inst{28-24} = 0b11110;
1228   let Inst{23-22} = size;
1229   let Inst{21} = 0b1;
1230   // Inherit Rm in 20-16
1231   let Inst{15-12} = opcode;
1232   let Inst{11-10} = 0b00;
1233   // Inherit Rn in 9-5
1234   // Inherit Rd in 4-0
1235 }
1236
1237 // Format AdvSIMD scalar shift by immediate
1238
1239 class NeonI_ScalarShiftImm<bit u, bits<5> opcode,
1240                            dag outs, dag ins, string asmstr,
1241                            list<dag> patterns, InstrItinClass itin>
1242   : A64InstRdn<outs, ins, asmstr, patterns, itin> {
1243   bits<4> Imm4;
1244   bits<3> Imm3;
1245   let Inst{31-30} = 0b01;
1246   let Inst{29} = u;
1247   let Inst{28-23} = 0b111110;
1248   let Inst{22-19} = Imm4;
1249   let Inst{18-16} = Imm3;
1250   let Inst{15-11} = opcode;
1251   let Inst{10} = 0b1;
1252   // Inherit Rn in 9-5
1253   // Inherit Rd in 4-0
1254 }
1255
1256 }
1257