1 /* This file is automatically generated by aarch64-gen. Do not edit! */
2 /* Copyright (C) 2012-2019 Free Software Foundation, Inc.
3 Contributed by ARM Ltd.
5 This file is part of the GNU opcodes library.
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)
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.
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/>. */
22 #include "aarch64-asm.h"
25 const aarch64_opcode *
26 aarch64_find_real_opcode (const aarch64_opcode *opcode)
28 /* Use the index as the key to locate the real opcode. */
29 int key = opcode - aarch64_opcode_table;
35 value = 2; /* --> sbc. */
39 value = 4; /* --> sbcs. */
43 value = 7; /* --> adds. */
47 value = 10; /* --> subs. */
51 value = 12; /* --> add. */
55 value = 14; /* --> adds. */
59 value = 17; /* --> subs. */
63 value = 22; /* --> adds. */
67 value = 24; /* --> sub. */
72 value = 26; /* --> subs. */
76 value = 152; /* --> umov. */
80 value = 154; /* --> ins. */
84 value = 156; /* --> ins. */
88 value = 242; /* --> not. */
92 value = 317; /* --> orr. */
96 value = 388; /* --> sshll. */
99 case 390: /* sshll2 */
100 value = 390; /* --> sshll2. */
103 case 412: /* ushll */
104 value = 412; /* --> ushll. */
106 case 415: /* uxtl2 */
107 case 414: /* ushll2 */
108 value = 414; /* --> ushll2. */
112 value = 535; /* --> dup. */
119 case 619: /* sbfiz */
121 value = 618; /* --> sbfm. */
124 case 628: /* bfxil */
127 value = 625; /* --> bfm. */
134 case 630: /* ubfiz */
136 value = 629; /* --> ubfm. */
140 case 663: /* csinc */
141 value = 663; /* --> csinc. */
143 case 668: /* csetm */
145 case 666: /* csinv */
146 value = 666; /* --> csinv. */
149 case 669: /* csneg */
150 value = 669; /* --> csneg. */
153 case 689: /* rev64 */
154 value = 688; /* --> rev. */
158 value = 713; /* --> lslv. */
162 value = 715; /* --> lsrv. */
166 value = 717; /* --> asrv. */
170 value = 719; /* --> rorv. */
173 case 722: /* subps */
174 value = 722; /* --> subps. */
178 value = 735; /* --> madd. */
182 value = 737; /* --> msub. */
184 case 740: /* smull */
185 case 739: /* smaddl */
186 value = 739; /* --> smaddl. */
188 case 742: /* smnegl */
189 case 741: /* smsubl */
190 value = 741; /* --> smsubl. */
192 case 745: /* umull */
193 case 744: /* umaddl */
194 value = 744; /* --> umaddl. */
196 case 747: /* umnegl */
197 case 746: /* umsubl */
198 value = 746; /* --> umsubl. */
202 value = 757; /* --> extr. */
206 value = 990; /* --> and. */
210 value = 992; /* --> orr. */
214 value = 995; /* --> ands. */
216 case 1001: /* uxtw */
219 value = 999; /* --> orr. */
223 value = 1002; /* --> orn. */
226 case 1006: /* ands */
227 value = 1006; /* --> ands. */
229 case 1133: /* staddb */
230 case 1037: /* ldaddb */
231 value = 1037; /* --> ldaddb. */
233 case 1134: /* staddh */
234 case 1038: /* ldaddh */
235 value = 1038; /* --> ldaddh. */
237 case 1135: /* stadd */
238 case 1039: /* ldadd */
239 value = 1039; /* --> ldadd. */
241 case 1136: /* staddlb */
242 case 1041: /* ldaddlb */
243 value = 1041; /* --> ldaddlb. */
245 case 1137: /* staddlh */
246 case 1044: /* ldaddlh */
247 value = 1044; /* --> ldaddlh. */
249 case 1138: /* staddl */
250 case 1047: /* ldaddl */
251 value = 1047; /* --> ldaddl. */
253 case 1139: /* stclrb */
254 case 1049: /* ldclrb */
255 value = 1049; /* --> ldclrb. */
257 case 1140: /* stclrh */
258 case 1050: /* ldclrh */
259 value = 1050; /* --> ldclrh. */
261 case 1141: /* stclr */
262 case 1051: /* ldclr */
263 value = 1051; /* --> ldclr. */
265 case 1142: /* stclrlb */
266 case 1053: /* ldclrlb */
267 value = 1053; /* --> ldclrlb. */
269 case 1143: /* stclrlh */
270 case 1056: /* ldclrlh */
271 value = 1056; /* --> ldclrlh. */
273 case 1144: /* stclrl */
274 case 1059: /* ldclrl */
275 value = 1059; /* --> ldclrl. */
277 case 1145: /* steorb */
278 case 1061: /* ldeorb */
279 value = 1061; /* --> ldeorb. */
281 case 1146: /* steorh */
282 case 1062: /* ldeorh */
283 value = 1062; /* --> ldeorh. */
285 case 1147: /* steor */
286 case 1063: /* ldeor */
287 value = 1063; /* --> ldeor. */
289 case 1148: /* steorlb */
290 case 1065: /* ldeorlb */
291 value = 1065; /* --> ldeorlb. */
293 case 1149: /* steorlh */
294 case 1068: /* ldeorlh */
295 value = 1068; /* --> ldeorlh. */
297 case 1150: /* steorl */
298 case 1071: /* ldeorl */
299 value = 1071; /* --> ldeorl. */
301 case 1151: /* stsetb */
302 case 1073: /* ldsetb */
303 value = 1073; /* --> ldsetb. */
305 case 1152: /* stseth */
306 case 1074: /* ldseth */
307 value = 1074; /* --> ldseth. */
309 case 1153: /* stset */
310 case 1075: /* ldset */
311 value = 1075; /* --> ldset. */
313 case 1154: /* stsetlb */
314 case 1077: /* ldsetlb */
315 value = 1077; /* --> ldsetlb. */
317 case 1155: /* stsetlh */
318 case 1080: /* ldsetlh */
319 value = 1080; /* --> ldsetlh. */
321 case 1156: /* stsetl */
322 case 1083: /* ldsetl */
323 value = 1083; /* --> ldsetl. */
325 case 1157: /* stsmaxb */
326 case 1085: /* ldsmaxb */
327 value = 1085; /* --> ldsmaxb. */
329 case 1158: /* stsmaxh */
330 case 1086: /* ldsmaxh */
331 value = 1086; /* --> ldsmaxh. */
333 case 1159: /* stsmax */
334 case 1087: /* ldsmax */
335 value = 1087; /* --> ldsmax. */
337 case 1160: /* stsmaxlb */
338 case 1089: /* ldsmaxlb */
339 value = 1089; /* --> ldsmaxlb. */
341 case 1161: /* stsmaxlh */
342 case 1092: /* ldsmaxlh */
343 value = 1092; /* --> ldsmaxlh. */
345 case 1162: /* stsmaxl */
346 case 1095: /* ldsmaxl */
347 value = 1095; /* --> ldsmaxl. */
349 case 1163: /* stsminb */
350 case 1097: /* ldsminb */
351 value = 1097; /* --> ldsminb. */
353 case 1164: /* stsminh */
354 case 1098: /* ldsminh */
355 value = 1098; /* --> ldsminh. */
357 case 1165: /* stsmin */
358 case 1099: /* ldsmin */
359 value = 1099; /* --> ldsmin. */
361 case 1166: /* stsminlb */
362 case 1101: /* ldsminlb */
363 value = 1101; /* --> ldsminlb. */
365 case 1167: /* stsminlh */
366 case 1104: /* ldsminlh */
367 value = 1104; /* --> ldsminlh. */
369 case 1168: /* stsminl */
370 case 1107: /* ldsminl */
371 value = 1107; /* --> ldsminl. */
373 case 1169: /* stumaxb */
374 case 1109: /* ldumaxb */
375 value = 1109; /* --> ldumaxb. */
377 case 1170: /* stumaxh */
378 case 1110: /* ldumaxh */
379 value = 1110; /* --> ldumaxh. */
381 case 1171: /* stumax */
382 case 1111: /* ldumax */
383 value = 1111; /* --> ldumax. */
385 case 1172: /* stumaxlb */
386 case 1113: /* ldumaxlb */
387 value = 1113; /* --> ldumaxlb. */
389 case 1173: /* stumaxlh */
390 case 1116: /* ldumaxlh */
391 value = 1116; /* --> ldumaxlh. */
393 case 1174: /* stumaxl */
394 case 1119: /* ldumaxl */
395 value = 1119; /* --> ldumaxl. */
397 case 1175: /* stuminb */
398 case 1121: /* lduminb */
399 value = 1121; /* --> lduminb. */
401 case 1176: /* stuminh */
402 case 1122: /* lduminh */
403 value = 1122; /* --> lduminh. */
405 case 1177: /* stumin */
406 case 1123: /* ldumin */
407 value = 1123; /* --> ldumin. */
409 case 1178: /* stuminlb */
410 case 1125: /* lduminlb */
411 value = 1125; /* --> lduminlb. */
413 case 1179: /* stuminlh */
414 case 1128: /* lduminlh */
415 value = 1128; /* --> lduminlh. */
417 case 1180: /* stuminl */
418 case 1131: /* lduminl */
419 value = 1131; /* --> lduminl. */
422 case 1181: /* movn */
423 value = 1181; /* --> movn. */
426 case 1183: /* movz */
427 value = 1183; /* --> movz. */
429 case 1234: /* autibsp */
430 case 1233: /* autibz */
431 case 1232: /* autiasp */
432 case 1231: /* autiaz */
433 case 1230: /* pacibsp */
434 case 1229: /* pacibz */
435 case 1228: /* paciasp */
436 case 1227: /* paciaz */
439 case 1206: /* autib1716 */
440 case 1205: /* autia1716 */
441 case 1204: /* pacib1716 */
442 case 1203: /* pacia1716 */
443 case 1202: /* xpaclri */
444 case 1201: /* sevl */
448 case 1197: /* yield */
450 case 1195: /* csdb */
452 case 1193: /* hint */
453 value = 1193; /* --> hint. */
455 case 1212: /* pssbb */
456 case 1211: /* ssbb */
458 value = 1210; /* --> dsb. */
463 case 1220: /* tlbi */
468 value = 1216; /* --> sys. */
472 value = 1282; /* --> and. */
476 value = 1284; /* --> and. */
478 case 1269: /* movs */
479 case 1285: /* ands */
480 value = 1285; /* --> ands. */
482 case 2033: /* cmple */
483 case 1320: /* cmpge */
484 value = 1320; /* --> cmpge. */
486 case 2036: /* cmplt */
487 case 1323: /* cmpgt */
488 value = 1323; /* --> cmpgt. */
490 case 2034: /* cmplo */
491 case 1325: /* cmphi */
492 value = 1325; /* --> cmphi. */
494 case 2035: /* cmpls */
495 case 1328: /* cmphs */
496 value = 1328; /* --> cmphs. */
500 value = 1350; /* --> cpy. */
504 value = 1351; /* --> cpy. */
506 case 2043: /* fmov */
509 value = 1352; /* --> cpy. */
513 value = 1364; /* --> dup. */
518 value = 1365; /* --> dup. */
520 case 2042: /* fmov */
523 value = 1366; /* --> dup. */
526 case 1367: /* dupm */
527 value = 1367; /* --> dupm. */
531 value = 1369; /* --> eor. */
535 value = 1371; /* --> eor. */
537 case 1271: /* nots */
538 case 1372: /* eors */
539 value = 1372; /* --> eors. */
541 case 2038: /* facle */
542 case 1377: /* facge */
543 value = 1377; /* --> facge. */
545 case 2039: /* faclt */
546 case 1378: /* facgt */
547 value = 1378; /* --> facgt. */
549 case 2040: /* fcmle */
550 case 1391: /* fcmge */
551 value = 1391; /* --> fcmge. */
553 case 2041: /* fcmlt */
554 case 1393: /* fcmgt */
555 value = 1393; /* --> fcmgt. */
557 case 1254: /* fmov */
558 case 1399: /* fcpy */
559 value = 1399; /* --> fcpy. */
561 case 1253: /* fmov */
562 case 1422: /* fdup */
563 value = 1422; /* --> fdup. */
567 value = 1753; /* --> orr. */
571 value = 1754; /* --> orr. */
575 value = 1756; /* --> orr. */
577 case 1268: /* movs */
578 case 1757: /* orrs */
579 value = 1757; /* --> orrs. */
583 value = 1819; /* --> sel. */
587 value = 1820; /* --> sel. */
589 default: return NULL;
592 return aarch64_opcode_table + value;
596 aarch64_insert_operand (const aarch64_operand *self,
597 const aarch64_opnd_info *info,
598 aarch64_insn *code, const aarch64_inst *inst,
599 aarch64_operand_error *errors)
601 /* Use the index as the key. */
602 int key = self - aarch64_operands;
652 return aarch64_ins_regno (self, info, code, inst, errors);
654 return aarch64_ins_reg_extended (self, info, code, inst, errors);
656 return aarch64_ins_reg_shifted (self, info, code, inst, errors);
658 return aarch64_ins_ft (self, info, code, inst, errors);
664 return aarch64_ins_reglane (self, info, code, inst, errors);
666 return aarch64_ins_reglist (self, info, code, inst, errors);
668 return aarch64_ins_ldst_reglist (self, info, code, inst, errors);
670 return aarch64_ins_ldst_reglist_r (self, info, code, inst, errors);
672 return aarch64_ins_ldst_elemlist (self, info, code, inst, errors);
708 return aarch64_ins_imm (self, info, code, inst, errors);
711 return aarch64_ins_advsimd_imm_shift (self, info, code, inst, errors);
715 return aarch64_ins_advsimd_imm_modified (self, info, code, inst, errors);
718 return aarch64_ins_fpimm (self, info, code, inst, errors);
721 return aarch64_ins_limm (self, info, code, inst, errors);
723 return aarch64_ins_aimm (self, info, code, inst, errors);
725 return aarch64_ins_imm_half (self, info, code, inst, errors);
727 return aarch64_ins_fbits (self, info, code, inst, errors);
731 return aarch64_ins_imm_rotate2 (self, info, code, inst, errors);
735 return aarch64_ins_imm_rotate1 (self, info, code, inst, errors);
738 return aarch64_ins_cond (self, info, code, inst, errors);
741 return aarch64_ins_addr_simple (self, info, code, inst, errors);
743 return aarch64_ins_addr_regoff (self, info, code, inst, errors);
749 return aarch64_ins_addr_simm (self, info, code, inst, errors);
751 return aarch64_ins_addr_simm10 (self, info, code, inst, errors);
753 return aarch64_ins_addr_uimm12 (self, info, code, inst, errors);
755 return aarch64_ins_addr_offset (self, info, code, inst, errors);
757 return aarch64_ins_simd_addr_post (self, info, code, inst, errors);
759 return aarch64_ins_sysreg (self, info, code, inst, errors);
761 return aarch64_ins_pstatefield (self, info, code, inst, errors);
767 return aarch64_ins_sysins_op (self, info, code, inst, errors);
770 return aarch64_ins_barrier (self, info, code, inst, errors);
772 return aarch64_ins_prfop (self, info, code, inst, errors);
775 return aarch64_ins_hint (self, info, code, inst, errors);
777 return aarch64_ins_sve_addr_ri_s4 (self, info, code, inst, errors);
782 return aarch64_ins_sve_addr_ri_s4xvl (self, info, code, inst, errors);
784 return aarch64_ins_sve_addr_ri_s6xvl (self, info, code, inst, errors);
786 return aarch64_ins_sve_addr_ri_s9xvl (self, info, code, inst, errors);
791 return aarch64_ins_sve_addr_ri_u6 (self, info, code, inst, errors);
806 return aarch64_ins_sve_addr_rr_lsl (self, info, code, inst, errors);
815 return aarch64_ins_sve_addr_rz_xtw (self, info, code, inst, errors);
820 return aarch64_ins_sve_addr_zi_u5 (self, info, code, inst, errors);
822 return aarch64_ins_sve_addr_zz_lsl (self, info, code, inst, errors);
824 return aarch64_ins_sve_addr_zz_sxtw (self, info, code, inst, errors);
826 return aarch64_ins_sve_addr_zz_uxtw (self, info, code, inst, errors);
828 return aarch64_ins_sve_aimm (self, info, code, inst, errors);
830 return aarch64_ins_sve_asimm (self, info, code, inst, errors);
832 return aarch64_ins_sve_float_half_one (self, info, code, inst, errors);
834 return aarch64_ins_sve_float_half_two (self, info, code, inst, errors);
836 return aarch64_ins_sve_float_zero_one (self, info, code, inst, errors);
838 return aarch64_ins_inv_limm (self, info, code, inst, errors);
840 return aarch64_ins_sve_limm_mov (self, info, code, inst, errors);
842 return aarch64_ins_sve_scale (self, info, code, inst, errors);
846 return aarch64_ins_sve_shlimm (self, info, code, inst, errors);
850 return aarch64_ins_sve_shrimm (self, info, code, inst, errors);
856 return aarch64_ins_sve_quad_index (self, info, code, inst, errors);
858 return aarch64_ins_sve_index (self, info, code, inst, errors);
861 return aarch64_ins_sve_reglist (self, info, code, inst, errors);
862 default: assert (0); abort ();