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
= 988; /* --> and. */
210 value
= 990; /* --> orr. */
214 value
= 993; /* --> ands. */
219 value
= 997; /* --> orr. */
223 value
= 1000; /* --> orn. */
226 case 1004: /* ands */
227 value
= 1004; /* --> ands. */
229 case 1131: /* staddb */
230 case 1035: /* ldaddb */
231 value
= 1035; /* --> ldaddb. */
233 case 1132: /* staddh */
234 case 1036: /* ldaddh */
235 value
= 1036; /* --> ldaddh. */
237 case 1133: /* stadd */
238 case 1037: /* ldadd */
239 value
= 1037; /* --> ldadd. */
241 case 1134: /* staddlb */
242 case 1039: /* ldaddlb */
243 value
= 1039; /* --> ldaddlb. */
245 case 1135: /* staddlh */
246 case 1042: /* ldaddlh */
247 value
= 1042; /* --> ldaddlh. */
249 case 1136: /* staddl */
250 case 1045: /* ldaddl */
251 value
= 1045; /* --> ldaddl. */
253 case 1137: /* stclrb */
254 case 1047: /* ldclrb */
255 value
= 1047; /* --> ldclrb. */
257 case 1138: /* stclrh */
258 case 1048: /* ldclrh */
259 value
= 1048; /* --> ldclrh. */
261 case 1139: /* stclr */
262 case 1049: /* ldclr */
263 value
= 1049; /* --> ldclr. */
265 case 1140: /* stclrlb */
266 case 1051: /* ldclrlb */
267 value
= 1051; /* --> ldclrlb. */
269 case 1141: /* stclrlh */
270 case 1054: /* ldclrlh */
271 value
= 1054; /* --> ldclrlh. */
273 case 1142: /* stclrl */
274 case 1057: /* ldclrl */
275 value
= 1057; /* --> ldclrl. */
277 case 1143: /* steorb */
278 case 1059: /* ldeorb */
279 value
= 1059; /* --> ldeorb. */
281 case 1144: /* steorh */
282 case 1060: /* ldeorh */
283 value
= 1060; /* --> ldeorh. */
285 case 1145: /* steor */
286 case 1061: /* ldeor */
287 value
= 1061; /* --> ldeor. */
289 case 1146: /* steorlb */
290 case 1063: /* ldeorlb */
291 value
= 1063; /* --> ldeorlb. */
293 case 1147: /* steorlh */
294 case 1066: /* ldeorlh */
295 value
= 1066; /* --> ldeorlh. */
297 case 1148: /* steorl */
298 case 1069: /* ldeorl */
299 value
= 1069; /* --> ldeorl. */
301 case 1149: /* stsetb */
302 case 1071: /* ldsetb */
303 value
= 1071; /* --> ldsetb. */
305 case 1150: /* stseth */
306 case 1072: /* ldseth */
307 value
= 1072; /* --> ldseth. */
309 case 1151: /* stset */
310 case 1073: /* ldset */
311 value
= 1073; /* --> ldset. */
313 case 1152: /* stsetlb */
314 case 1075: /* ldsetlb */
315 value
= 1075; /* --> ldsetlb. */
317 case 1153: /* stsetlh */
318 case 1078: /* ldsetlh */
319 value
= 1078; /* --> ldsetlh. */
321 case 1154: /* stsetl */
322 case 1081: /* ldsetl */
323 value
= 1081; /* --> ldsetl. */
325 case 1155: /* stsmaxb */
326 case 1083: /* ldsmaxb */
327 value
= 1083; /* --> ldsmaxb. */
329 case 1156: /* stsmaxh */
330 case 1084: /* ldsmaxh */
331 value
= 1084; /* --> ldsmaxh. */
333 case 1157: /* stsmax */
334 case 1085: /* ldsmax */
335 value
= 1085; /* --> ldsmax. */
337 case 1158: /* stsmaxlb */
338 case 1087: /* ldsmaxlb */
339 value
= 1087; /* --> ldsmaxlb. */
341 case 1159: /* stsmaxlh */
342 case 1090: /* ldsmaxlh */
343 value
= 1090; /* --> ldsmaxlh. */
345 case 1160: /* stsmaxl */
346 case 1093: /* ldsmaxl */
347 value
= 1093; /* --> ldsmaxl. */
349 case 1161: /* stsminb */
350 case 1095: /* ldsminb */
351 value
= 1095; /* --> ldsminb. */
353 case 1162: /* stsminh */
354 case 1096: /* ldsminh */
355 value
= 1096; /* --> ldsminh. */
357 case 1163: /* stsmin */
358 case 1097: /* ldsmin */
359 value
= 1097; /* --> ldsmin. */
361 case 1164: /* stsminlb */
362 case 1099: /* ldsminlb */
363 value
= 1099; /* --> ldsminlb. */
365 case 1165: /* stsminlh */
366 case 1102: /* ldsminlh */
367 value
= 1102; /* --> ldsminlh. */
369 case 1166: /* stsminl */
370 case 1105: /* ldsminl */
371 value
= 1105; /* --> ldsminl. */
373 case 1167: /* stumaxb */
374 case 1107: /* ldumaxb */
375 value
= 1107; /* --> ldumaxb. */
377 case 1168: /* stumaxh */
378 case 1108: /* ldumaxh */
379 value
= 1108; /* --> ldumaxh. */
381 case 1169: /* stumax */
382 case 1109: /* ldumax */
383 value
= 1109; /* --> ldumax. */
385 case 1170: /* stumaxlb */
386 case 1111: /* ldumaxlb */
387 value
= 1111; /* --> ldumaxlb. */
389 case 1171: /* stumaxlh */
390 case 1114: /* ldumaxlh */
391 value
= 1114; /* --> ldumaxlh. */
393 case 1172: /* stumaxl */
394 case 1117: /* ldumaxl */
395 value
= 1117; /* --> ldumaxl. */
397 case 1173: /* stuminb */
398 case 1119: /* lduminb */
399 value
= 1119; /* --> lduminb. */
401 case 1174: /* stuminh */
402 case 1120: /* lduminh */
403 value
= 1120; /* --> lduminh. */
405 case 1175: /* stumin */
406 case 1121: /* ldumin */
407 value
= 1121; /* --> ldumin. */
409 case 1176: /* stuminlb */
410 case 1123: /* lduminlb */
411 value
= 1123; /* --> lduminlb. */
413 case 1177: /* stuminlh */
414 case 1126: /* lduminlh */
415 value
= 1126; /* --> lduminlh. */
417 case 1178: /* stuminl */
418 case 1129: /* lduminl */
419 value
= 1129; /* --> lduminl. */
422 case 1179: /* movn */
423 value
= 1179; /* --> movn. */
426 case 1181: /* movz */
427 value
= 1181; /* --> movz. */
429 case 1228: /* autibsp */
430 case 1227: /* autibz */
431 case 1226: /* autiasp */
432 case 1225: /* autiaz */
433 case 1224: /* pacibsp */
434 case 1223: /* pacibz */
435 case 1222: /* paciasp */
436 case 1221: /* paciaz */
439 case 1200: /* autib1716 */
440 case 1199: /* autia1716 */
441 case 1198: /* pacib1716 */
442 case 1197: /* pacia1716 */
443 case 1196: /* xpaclri */
444 case 1195: /* sevl */
448 case 1191: /* yield */
450 case 1189: /* csdb */
452 case 1187: /* hint */
453 value
= 1187; /* --> hint. */
455 case 1206: /* pssbb */
456 case 1205: /* ssbb */
458 value
= 1204; /* --> dsb. */
463 case 1214: /* tlbi */
468 value
= 1210; /* --> sys. */
472 value
= 1276; /* --> and. */
476 value
= 1278; /* --> and. */
478 case 1263: /* movs */
479 case 1279: /* ands */
480 value
= 1279; /* --> ands. */
482 case 2027: /* cmple */
483 case 1314: /* cmpge */
484 value
= 1314; /* --> cmpge. */
486 case 2030: /* cmplt */
487 case 1317: /* cmpgt */
488 value
= 1317; /* --> cmpgt. */
490 case 2028: /* cmplo */
491 case 1319: /* cmphi */
492 value
= 1319; /* --> cmphi. */
494 case 2029: /* cmpls */
495 case 1322: /* cmphs */
496 value
= 1322; /* --> cmphs. */
500 value
= 1344; /* --> cpy. */
504 value
= 1345; /* --> cpy. */
506 case 2037: /* fmov */
509 value
= 1346; /* --> cpy. */
513 value
= 1358; /* --> dup. */
518 value
= 1359; /* --> dup. */
520 case 2036: /* fmov */
523 value
= 1360; /* --> dup. */
526 case 1361: /* dupm */
527 value
= 1361; /* --> dupm. */
531 value
= 1363; /* --> eor. */
535 value
= 1365; /* --> eor. */
537 case 1265: /* nots */
538 case 1366: /* eors */
539 value
= 1366; /* --> eors. */
541 case 2032: /* facle */
542 case 1371: /* facge */
543 value
= 1371; /* --> facge. */
545 case 2033: /* faclt */
546 case 1372: /* facgt */
547 value
= 1372; /* --> facgt. */
549 case 2034: /* fcmle */
550 case 1385: /* fcmge */
551 value
= 1385; /* --> fcmge. */
553 case 2035: /* fcmlt */
554 case 1387: /* fcmgt */
555 value
= 1387; /* --> fcmgt. */
557 case 1248: /* fmov */
558 case 1393: /* fcpy */
559 value
= 1393; /* --> fcpy. */
561 case 1247: /* fmov */
562 case 1416: /* fdup */
563 value
= 1416; /* --> fdup. */
567 value
= 1747; /* --> orr. */
571 value
= 1748; /* --> orr. */
575 value
= 1750; /* --> orr. */
577 case 1262: /* movs */
578 case 1751: /* orrs */
579 value
= 1751; /* --> orrs. */
583 value
= 1813; /* --> sel. */
587 value
= 1814; /* --> 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
;
651 return aarch64_ins_regno (self
, info
, code
, inst
, errors
);
653 return aarch64_ins_reg_extended (self
, info
, code
, inst
, errors
);
655 return aarch64_ins_reg_shifted (self
, info
, code
, inst
, errors
);
657 return aarch64_ins_ft (self
, info
, code
, inst
, errors
);
663 return aarch64_ins_reglane (self
, info
, code
, inst
, errors
);
665 return aarch64_ins_reglist (self
, info
, code
, inst
, errors
);
667 return aarch64_ins_ldst_reglist (self
, info
, code
, inst
, errors
);
669 return aarch64_ins_ldst_reglist_r (self
, info
, code
, inst
, errors
);
671 return aarch64_ins_ldst_elemlist (self
, info
, code
, inst
, errors
);
706 return aarch64_ins_imm (self
, info
, code
, inst
, errors
);
709 return aarch64_ins_advsimd_imm_shift (self
, info
, code
, inst
, errors
);
713 return aarch64_ins_advsimd_imm_modified (self
, info
, code
, inst
, errors
);
716 return aarch64_ins_fpimm (self
, info
, code
, inst
, errors
);
719 return aarch64_ins_limm (self
, info
, code
, inst
, errors
);
721 return aarch64_ins_aimm (self
, info
, code
, inst
, errors
);
723 return aarch64_ins_imm_half (self
, info
, code
, inst
, errors
);
725 return aarch64_ins_fbits (self
, info
, code
, inst
, errors
);
729 return aarch64_ins_imm_rotate2 (self
, info
, code
, inst
, errors
);
732 return aarch64_ins_imm_rotate1 (self
, info
, code
, inst
, errors
);
735 return aarch64_ins_cond (self
, info
, code
, inst
, errors
);
738 return aarch64_ins_addr_simple (self
, info
, code
, inst
, errors
);
740 return aarch64_ins_addr_regoff (self
, info
, code
, inst
, errors
);
746 return aarch64_ins_addr_simm (self
, info
, code
, inst
, errors
);
748 return aarch64_ins_addr_simm10 (self
, info
, code
, inst
, errors
);
750 return aarch64_ins_addr_uimm12 (self
, info
, code
, inst
, errors
);
752 return aarch64_ins_addr_offset (self
, info
, code
, inst
, errors
);
754 return aarch64_ins_simd_addr_post (self
, info
, code
, inst
, errors
);
756 return aarch64_ins_sysreg (self
, info
, code
, inst
, errors
);
758 return aarch64_ins_pstatefield (self
, info
, code
, inst
, errors
);
764 return aarch64_ins_sysins_op (self
, info
, code
, inst
, errors
);
767 return aarch64_ins_barrier (self
, info
, code
, inst
, errors
);
769 return aarch64_ins_prfop (self
, info
, code
, inst
, errors
);
772 return aarch64_ins_hint (self
, info
, code
, inst
, errors
);
774 return aarch64_ins_sve_addr_ri_s4 (self
, info
, code
, inst
, errors
);
779 return aarch64_ins_sve_addr_ri_s4xvl (self
, info
, code
, inst
, errors
);
781 return aarch64_ins_sve_addr_ri_s6xvl (self
, info
, code
, inst
, errors
);
783 return aarch64_ins_sve_addr_ri_s9xvl (self
, info
, code
, inst
, errors
);
788 return aarch64_ins_sve_addr_ri_u6 (self
, info
, code
, inst
, errors
);
802 return aarch64_ins_sve_addr_rr_lsl (self
, info
, code
, inst
, errors
);
811 return aarch64_ins_sve_addr_rz_xtw (self
, info
, code
, inst
, errors
);
816 return aarch64_ins_sve_addr_zi_u5 (self
, info
, code
, inst
, errors
);
818 return aarch64_ins_sve_addr_zz_lsl (self
, info
, code
, inst
, errors
);
820 return aarch64_ins_sve_addr_zz_sxtw (self
, info
, code
, inst
, errors
);
822 return aarch64_ins_sve_addr_zz_uxtw (self
, info
, code
, inst
, errors
);
824 return aarch64_ins_sve_aimm (self
, info
, code
, inst
, errors
);
826 return aarch64_ins_sve_asimm (self
, info
, code
, inst
, errors
);
828 return aarch64_ins_sve_float_half_one (self
, info
, code
, inst
, errors
);
830 return aarch64_ins_sve_float_half_two (self
, info
, code
, inst
, errors
);
832 return aarch64_ins_sve_float_zero_one (self
, info
, code
, inst
, errors
);
834 return aarch64_ins_inv_limm (self
, info
, code
, inst
, errors
);
836 return aarch64_ins_sve_limm_mov (self
, info
, code
, inst
, errors
);
838 return aarch64_ins_sve_scale (self
, info
, code
, inst
, errors
);
841 return aarch64_ins_sve_shlimm (self
, info
, code
, inst
, errors
);
844 return aarch64_ins_sve_shrimm (self
, info
, code
, inst
, errors
);
848 return aarch64_ins_sve_quad_index (self
, info
, code
, inst
, errors
);
850 return aarch64_ins_sve_index (self
, info
, code
, inst
, errors
);
853 return aarch64_ins_sve_reglist (self
, info
, code
, inst
, errors
);
854 default: assert (0); abort ();