[AArch64][SVE 28/32] Add SVE FP immediate operands
[deliverable/binutils-gdb.git] / opcodes / aarch64-asm-2.c
1 /* This file is automatically generated by aarch64-gen. Do not edit! */
2 /* Copyright (C) 2012-2016 Free Software Foundation, Inc.
3 Contributed by ARM Ltd.
4
5 This file is part of the GNU opcodes library.
6
7 This library is free software; you can redistribute it and/or modify
8 it under the terms of the GNU General Public License as published by
9 the Free Software Foundation; either version 3, or (at your option)
10 any later version.
11
12 It is distributed in the hope that it will be useful, but WITHOUT
13 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
14 or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public
15 License for more details.
16
17 You should have received a copy of the GNU General Public License
18 along with this program; see the file COPYING3. If not,
19 see <http://www.gnu.org/licenses/>. */
20
21 #include "sysdep.h"
22 #include "aarch64-asm.h"
23
24
25 const aarch64_opcode *
26 aarch64_find_real_opcode (const aarch64_opcode *opcode)
27 {
28 /* Use the index as the key to locate the real opcode. */
29 int key = opcode - aarch64_opcode_table;
30 int value;
31 switch (key)
32 {
33 case 3: /* ngc */
34 case 2: /* sbc */
35 value = 2; /* --> sbc. */
36 break;
37 case 5: /* ngcs */
38 case 4: /* sbcs */
39 value = 4; /* --> sbcs. */
40 break;
41 case 8: /* cmn */
42 case 7: /* adds */
43 value = 7; /* --> adds. */
44 break;
45 case 11: /* cmp */
46 case 10: /* subs */
47 value = 10; /* --> subs. */
48 break;
49 case 13: /* mov */
50 case 12: /* add */
51 value = 12; /* --> add. */
52 break;
53 case 15: /* cmn */
54 case 14: /* adds */
55 value = 14; /* --> adds. */
56 break;
57 case 18: /* cmp */
58 case 17: /* subs */
59 value = 17; /* --> subs. */
60 break;
61 case 21: /* cmn */
62 case 20: /* adds */
63 value = 20; /* --> adds. */
64 break;
65 case 23: /* neg */
66 case 22: /* sub */
67 value = 22; /* --> sub. */
68 break;
69 case 26: /* negs */
70 case 25: /* cmp */
71 case 24: /* subs */
72 value = 24; /* --> subs. */
73 break;
74 case 150: /* mov */
75 case 149: /* umov */
76 value = 149; /* --> umov. */
77 break;
78 case 152: /* mov */
79 case 151: /* ins */
80 value = 151; /* --> ins. */
81 break;
82 case 154: /* mov */
83 case 153: /* ins */
84 value = 153; /* --> ins. */
85 break;
86 case 236: /* mvn */
87 case 235: /* not */
88 value = 235; /* --> not. */
89 break;
90 case 311: /* mov */
91 case 310: /* orr */
92 value = 310; /* --> orr. */
93 break;
94 case 380: /* sxtl */
95 case 379: /* sshll */
96 value = 379; /* --> sshll. */
97 break;
98 case 382: /* sxtl2 */
99 case 381: /* sshll2 */
100 value = 381; /* --> sshll2. */
101 break;
102 case 404: /* uxtl */
103 case 403: /* ushll */
104 value = 403; /* --> ushll. */
105 break;
106 case 406: /* uxtl2 */
107 case 405: /* ushll2 */
108 value = 405; /* --> ushll2. */
109 break;
110 case 527: /* mov */
111 case 526: /* dup */
112 value = 526; /* --> dup. */
113 break;
114 case 614: /* sxtw */
115 case 613: /* sxth */
116 case 612: /* sxtb */
117 case 615: /* asr */
118 case 611: /* sbfx */
119 case 610: /* sbfiz */
120 case 609: /* sbfm */
121 value = 609; /* --> sbfm. */
122 break;
123 case 618: /* bfc */
124 case 619: /* bfxil */
125 case 617: /* bfi */
126 case 616: /* bfm */
127 value = 616; /* --> bfm. */
128 break;
129 case 624: /* uxth */
130 case 623: /* uxtb */
131 case 626: /* lsr */
132 case 625: /* lsl */
133 case 622: /* ubfx */
134 case 621: /* ubfiz */
135 case 620: /* ubfm */
136 value = 620; /* --> ubfm. */
137 break;
138 case 644: /* cset */
139 case 643: /* cinc */
140 case 642: /* csinc */
141 value = 642; /* --> csinc. */
142 break;
143 case 647: /* csetm */
144 case 646: /* cinv */
145 case 645: /* csinv */
146 value = 645; /* --> csinv. */
147 break;
148 case 649: /* cneg */
149 case 648: /* csneg */
150 value = 648; /* --> csneg. */
151 break;
152 case 667: /* rev */
153 case 668: /* rev64 */
154 value = 667; /* --> rev. */
155 break;
156 case 675: /* lsl */
157 case 674: /* lslv */
158 value = 674; /* --> lslv. */
159 break;
160 case 677: /* lsr */
161 case 676: /* lsrv */
162 value = 676; /* --> lsrv. */
163 break;
164 case 679: /* asr */
165 case 678: /* asrv */
166 value = 678; /* --> asrv. */
167 break;
168 case 681: /* ror */
169 case 680: /* rorv */
170 value = 680; /* --> rorv. */
171 break;
172 case 691: /* mul */
173 case 690: /* madd */
174 value = 690; /* --> madd. */
175 break;
176 case 693: /* mneg */
177 case 692: /* msub */
178 value = 692; /* --> msub. */
179 break;
180 case 695: /* smull */
181 case 694: /* smaddl */
182 value = 694; /* --> smaddl. */
183 break;
184 case 697: /* smnegl */
185 case 696: /* smsubl */
186 value = 696; /* --> smsubl. */
187 break;
188 case 700: /* umull */
189 case 699: /* umaddl */
190 value = 699; /* --> umaddl. */
191 break;
192 case 702: /* umnegl */
193 case 701: /* umsubl */
194 value = 701; /* --> umsubl. */
195 break;
196 case 713: /* ror */
197 case 712: /* extr */
198 value = 712; /* --> extr. */
199 break;
200 case 920: /* bic */
201 case 919: /* and */
202 value = 919; /* --> and. */
203 break;
204 case 922: /* mov */
205 case 921: /* orr */
206 value = 921; /* --> orr. */
207 break;
208 case 925: /* tst */
209 case 924: /* ands */
210 value = 924; /* --> ands. */
211 break;
212 case 930: /* uxtw */
213 case 929: /* mov */
214 case 928: /* orr */
215 value = 928; /* --> orr. */
216 break;
217 case 932: /* mvn */
218 case 931: /* orn */
219 value = 931; /* --> orn. */
220 break;
221 case 936: /* tst */
222 case 935: /* ands */
223 value = 935; /* --> ands. */
224 break;
225 case 1062: /* staddb */
226 case 966: /* ldaddb */
227 value = 966; /* --> ldaddb. */
228 break;
229 case 1063: /* staddh */
230 case 967: /* ldaddh */
231 value = 967; /* --> ldaddh. */
232 break;
233 case 1064: /* stadd */
234 case 968: /* ldadd */
235 value = 968; /* --> ldadd. */
236 break;
237 case 1065: /* staddlb */
238 case 970: /* ldaddlb */
239 value = 970; /* --> ldaddlb. */
240 break;
241 case 1066: /* staddlh */
242 case 973: /* ldaddlh */
243 value = 973; /* --> ldaddlh. */
244 break;
245 case 1067: /* staddl */
246 case 976: /* ldaddl */
247 value = 976; /* --> ldaddl. */
248 break;
249 case 1068: /* stclrb */
250 case 978: /* ldclrb */
251 value = 978; /* --> ldclrb. */
252 break;
253 case 1069: /* stclrh */
254 case 979: /* ldclrh */
255 value = 979; /* --> ldclrh. */
256 break;
257 case 1070: /* stclr */
258 case 980: /* ldclr */
259 value = 980; /* --> ldclr. */
260 break;
261 case 1071: /* stclrlb */
262 case 982: /* ldclrlb */
263 value = 982; /* --> ldclrlb. */
264 break;
265 case 1072: /* stclrlh */
266 case 985: /* ldclrlh */
267 value = 985; /* --> ldclrlh. */
268 break;
269 case 1073: /* stclrl */
270 case 988: /* ldclrl */
271 value = 988; /* --> ldclrl. */
272 break;
273 case 1074: /* steorb */
274 case 990: /* ldeorb */
275 value = 990; /* --> ldeorb. */
276 break;
277 case 1075: /* steorh */
278 case 991: /* ldeorh */
279 value = 991; /* --> ldeorh. */
280 break;
281 case 1076: /* steor */
282 case 992: /* ldeor */
283 value = 992; /* --> ldeor. */
284 break;
285 case 1077: /* steorlb */
286 case 994: /* ldeorlb */
287 value = 994; /* --> ldeorlb. */
288 break;
289 case 1078: /* steorlh */
290 case 997: /* ldeorlh */
291 value = 997; /* --> ldeorlh. */
292 break;
293 case 1079: /* steorl */
294 case 1000: /* ldeorl */
295 value = 1000; /* --> ldeorl. */
296 break;
297 case 1080: /* stsetb */
298 case 1002: /* ldsetb */
299 value = 1002; /* --> ldsetb. */
300 break;
301 case 1081: /* stseth */
302 case 1003: /* ldseth */
303 value = 1003; /* --> ldseth. */
304 break;
305 case 1082: /* stset */
306 case 1004: /* ldset */
307 value = 1004; /* --> ldset. */
308 break;
309 case 1083: /* stsetlb */
310 case 1006: /* ldsetlb */
311 value = 1006; /* --> ldsetlb. */
312 break;
313 case 1084: /* stsetlh */
314 case 1009: /* ldsetlh */
315 value = 1009; /* --> ldsetlh. */
316 break;
317 case 1085: /* stsetl */
318 case 1012: /* ldsetl */
319 value = 1012; /* --> ldsetl. */
320 break;
321 case 1086: /* stsmaxb */
322 case 1014: /* ldsmaxb */
323 value = 1014; /* --> ldsmaxb. */
324 break;
325 case 1087: /* stsmaxh */
326 case 1015: /* ldsmaxh */
327 value = 1015; /* --> ldsmaxh. */
328 break;
329 case 1088: /* stsmax */
330 case 1016: /* ldsmax */
331 value = 1016; /* --> ldsmax. */
332 break;
333 case 1089: /* stsmaxlb */
334 case 1018: /* ldsmaxlb */
335 value = 1018; /* --> ldsmaxlb. */
336 break;
337 case 1090: /* stsmaxlh */
338 case 1021: /* ldsmaxlh */
339 value = 1021; /* --> ldsmaxlh. */
340 break;
341 case 1091: /* stsmaxl */
342 case 1024: /* ldsmaxl */
343 value = 1024; /* --> ldsmaxl. */
344 break;
345 case 1092: /* stsminb */
346 case 1026: /* ldsminb */
347 value = 1026; /* --> ldsminb. */
348 break;
349 case 1093: /* stsminh */
350 case 1027: /* ldsminh */
351 value = 1027; /* --> ldsminh. */
352 break;
353 case 1094: /* stsmin */
354 case 1028: /* ldsmin */
355 value = 1028; /* --> ldsmin. */
356 break;
357 case 1095: /* stsminlb */
358 case 1030: /* ldsminlb */
359 value = 1030; /* --> ldsminlb. */
360 break;
361 case 1096: /* stsminlh */
362 case 1033: /* ldsminlh */
363 value = 1033; /* --> ldsminlh. */
364 break;
365 case 1097: /* stsminl */
366 case 1036: /* ldsminl */
367 value = 1036; /* --> ldsminl. */
368 break;
369 case 1098: /* stumaxb */
370 case 1038: /* ldumaxb */
371 value = 1038; /* --> ldumaxb. */
372 break;
373 case 1099: /* stumaxh */
374 case 1039: /* ldumaxh */
375 value = 1039; /* --> ldumaxh. */
376 break;
377 case 1100: /* stumax */
378 case 1040: /* ldumax */
379 value = 1040; /* --> ldumax. */
380 break;
381 case 1101: /* stumaxlb */
382 case 1042: /* ldumaxlb */
383 value = 1042; /* --> ldumaxlb. */
384 break;
385 case 1102: /* stumaxlh */
386 case 1045: /* ldumaxlh */
387 value = 1045; /* --> ldumaxlh. */
388 break;
389 case 1103: /* stumaxl */
390 case 1048: /* ldumaxl */
391 value = 1048; /* --> ldumaxl. */
392 break;
393 case 1104: /* stuminb */
394 case 1050: /* lduminb */
395 value = 1050; /* --> lduminb. */
396 break;
397 case 1105: /* stuminh */
398 case 1051: /* lduminh */
399 value = 1051; /* --> lduminh. */
400 break;
401 case 1106: /* stumin */
402 case 1052: /* ldumin */
403 value = 1052; /* --> ldumin. */
404 break;
405 case 1107: /* stuminlb */
406 case 1054: /* lduminlb */
407 value = 1054; /* --> lduminlb. */
408 break;
409 case 1108: /* stuminlh */
410 case 1057: /* lduminlh */
411 value = 1057; /* --> lduminlh. */
412 break;
413 case 1109: /* stuminl */
414 case 1060: /* lduminl */
415 value = 1060; /* --> lduminl. */
416 break;
417 case 1111: /* mov */
418 case 1110: /* movn */
419 value = 1110; /* --> movn. */
420 break;
421 case 1113: /* mov */
422 case 1112: /* movz */
423 value = 1112; /* --> movz. */
424 break;
425 case 1126: /* psb */
426 case 1125: /* esb */
427 case 1124: /* sevl */
428 case 1123: /* sev */
429 case 1122: /* wfi */
430 case 1121: /* wfe */
431 case 1120: /* yield */
432 case 1119: /* nop */
433 case 1118: /* hint */
434 value = 1118; /* --> hint. */
435 break;
436 case 1135: /* tlbi */
437 case 1134: /* ic */
438 case 1133: /* dc */
439 case 1132: /* at */
440 case 1131: /* sys */
441 value = 1131; /* --> sys. */
442 break;
443 default: return NULL;
444 }
445
446 return aarch64_opcode_table + value;
447 }
448
449 const char*
450 aarch64_insert_operand (const aarch64_operand *self,
451 const aarch64_opnd_info *info,
452 aarch64_insn *code, const aarch64_inst *inst)
453 {
454 /* Use the index as the key. */
455 int key = self - aarch64_operands;
456 switch (key)
457 {
458 case 1:
459 case 2:
460 case 3:
461 case 4:
462 case 5:
463 case 6:
464 case 7:
465 case 8:
466 case 9:
467 case 10:
468 case 14:
469 case 15:
470 case 16:
471 case 17:
472 case 19:
473 case 20:
474 case 21:
475 case 22:
476 case 23:
477 case 24:
478 case 25:
479 case 26:
480 case 27:
481 case 35:
482 case 36:
483 case 139:
484 case 140:
485 case 141:
486 case 142:
487 case 143:
488 case 144:
489 case 145:
490 case 146:
491 case 159:
492 case 160:
493 case 161:
494 case 162:
495 case 163:
496 case 164:
497 case 167:
498 return aarch64_ins_regno (self, info, code, inst);
499 case 12:
500 return aarch64_ins_reg_extended (self, info, code, inst);
501 case 13:
502 return aarch64_ins_reg_shifted (self, info, code, inst);
503 case 18:
504 return aarch64_ins_ft (self, info, code, inst);
505 case 28:
506 case 29:
507 case 30:
508 return aarch64_ins_reglane (self, info, code, inst);
509 case 31:
510 return aarch64_ins_reglist (self, info, code, inst);
511 case 32:
512 return aarch64_ins_ldst_reglist (self, info, code, inst);
513 case 33:
514 return aarch64_ins_ldst_reglist_r (self, info, code, inst);
515 case 34:
516 return aarch64_ins_ldst_elemlist (self, info, code, inst);
517 case 37:
518 case 47:
519 case 48:
520 case 49:
521 case 50:
522 case 51:
523 case 52:
524 case 53:
525 case 54:
526 case 55:
527 case 56:
528 case 57:
529 case 58:
530 case 59:
531 case 68:
532 case 69:
533 case 70:
534 case 71:
535 case 136:
536 case 138:
537 case 151:
538 case 152:
539 case 153:
540 case 154:
541 case 155:
542 case 156:
543 case 157:
544 case 158:
545 return aarch64_ins_imm (self, info, code, inst);
546 case 38:
547 case 39:
548 return aarch64_ins_advsimd_imm_shift (self, info, code, inst);
549 case 40:
550 case 41:
551 case 42:
552 return aarch64_ins_advsimd_imm_modified (self, info, code, inst);
553 case 46:
554 case 129:
555 return aarch64_ins_fpimm (self, info, code, inst);
556 case 60:
557 case 134:
558 return aarch64_ins_limm (self, info, code, inst);
559 case 61:
560 return aarch64_ins_aimm (self, info, code, inst);
561 case 62:
562 return aarch64_ins_imm_half (self, info, code, inst);
563 case 63:
564 return aarch64_ins_fbits (self, info, code, inst);
565 case 65:
566 case 66:
567 return aarch64_ins_cond (self, info, code, inst);
568 case 72:
569 case 78:
570 return aarch64_ins_addr_simple (self, info, code, inst);
571 case 73:
572 return aarch64_ins_addr_regoff (self, info, code, inst);
573 case 74:
574 case 75:
575 case 76:
576 return aarch64_ins_addr_simm (self, info, code, inst);
577 case 77:
578 return aarch64_ins_addr_uimm12 (self, info, code, inst);
579 case 79:
580 return aarch64_ins_simd_addr_post (self, info, code, inst);
581 case 80:
582 return aarch64_ins_sysreg (self, info, code, inst);
583 case 81:
584 return aarch64_ins_pstatefield (self, info, code, inst);
585 case 82:
586 case 83:
587 case 84:
588 case 85:
589 return aarch64_ins_sysins_op (self, info, code, inst);
590 case 86:
591 case 87:
592 return aarch64_ins_barrier (self, info, code, inst);
593 case 88:
594 return aarch64_ins_prfop (self, info, code, inst);
595 case 89:
596 return aarch64_ins_hint (self, info, code, inst);
597 case 90:
598 case 91:
599 case 92:
600 case 93:
601 return aarch64_ins_sve_addr_ri_s4xvl (self, info, code, inst);
602 case 94:
603 return aarch64_ins_sve_addr_ri_s6xvl (self, info, code, inst);
604 case 95:
605 return aarch64_ins_sve_addr_ri_s9xvl (self, info, code, inst);
606 case 96:
607 case 97:
608 case 98:
609 case 99:
610 return aarch64_ins_sve_addr_ri_u6 (self, info, code, inst);
611 case 100:
612 case 101:
613 case 102:
614 case 103:
615 case 104:
616 case 105:
617 case 106:
618 case 107:
619 case 108:
620 case 109:
621 case 110:
622 case 111:
623 return aarch64_ins_sve_addr_rr_lsl (self, info, code, inst);
624 case 112:
625 case 113:
626 case 114:
627 case 115:
628 case 116:
629 case 117:
630 case 118:
631 case 119:
632 return aarch64_ins_sve_addr_rz_xtw (self, info, code, inst);
633 case 120:
634 case 121:
635 case 122:
636 case 123:
637 return aarch64_ins_sve_addr_zi_u5 (self, info, code, inst);
638 case 124:
639 return aarch64_ins_sve_addr_zz_lsl (self, info, code, inst);
640 case 125:
641 return aarch64_ins_sve_addr_zz_sxtw (self, info, code, inst);
642 case 126:
643 return aarch64_ins_sve_addr_zz_uxtw (self, info, code, inst);
644 case 127:
645 return aarch64_ins_sve_aimm (self, info, code, inst);
646 case 128:
647 return aarch64_ins_sve_asimm (self, info, code, inst);
648 case 130:
649 return aarch64_ins_sve_float_half_one (self, info, code, inst);
650 case 131:
651 return aarch64_ins_sve_float_half_two (self, info, code, inst);
652 case 132:
653 return aarch64_ins_sve_float_zero_one (self, info, code, inst);
654 case 133:
655 return aarch64_ins_inv_limm (self, info, code, inst);
656 case 135:
657 return aarch64_ins_sve_limm_mov (self, info, code, inst);
658 case 137:
659 return aarch64_ins_sve_scale (self, info, code, inst);
660 case 147:
661 case 148:
662 return aarch64_ins_sve_shlimm (self, info, code, inst);
663 case 149:
664 case 150:
665 return aarch64_ins_sve_shrimm (self, info, code, inst);
666 case 165:
667 return aarch64_ins_sve_index (self, info, code, inst);
668 case 166:
669 case 168:
670 return aarch64_ins_sve_reglist (self, info, code, inst);
671 default: assert (0); abort ();
672 }
673 }
This page took 0.077516 seconds and 4 git commands to generate.