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.
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 = 20; /* --> adds. */
67 value = 22; /* --> sub. */
72 value = 24; /* --> subs. */
76 value = 149; /* --> umov. */
80 value = 151; /* --> ins. */
84 value = 153; /* --> ins. */
88 value = 235; /* --> not. */
92 value = 310; /* --> orr. */
96 value = 379; /* --> sshll. */
99 case 381: /* sshll2 */
100 value = 381; /* --> sshll2. */
103 case 403: /* ushll */
104 value = 403; /* --> ushll. */
106 case 406: /* uxtl2 */
107 case 405: /* ushll2 */
108 value = 405; /* --> ushll2. */
112 value = 526; /* --> dup. */
119 case 610: /* sbfiz */
121 value = 609; /* --> sbfm. */
124 case 619: /* bfxil */
127 value = 616; /* --> bfm. */
134 case 621: /* ubfiz */
136 value = 620; /* --> ubfm. */
140 case 642: /* csinc */
141 value = 642; /* --> csinc. */
143 case 647: /* csetm */
145 case 645: /* csinv */
146 value = 645; /* --> csinv. */
149 case 648: /* csneg */
150 value = 648; /* --> csneg. */
153 case 668: /* rev64 */
154 value = 667; /* --> rev. */
158 value = 674; /* --> lslv. */
162 value = 676; /* --> lsrv. */
166 value = 678; /* --> asrv. */
170 value = 680; /* --> rorv. */
174 value = 690; /* --> madd. */
178 value = 692; /* --> msub. */
180 case 695: /* smull */
181 case 694: /* smaddl */
182 value = 694; /* --> smaddl. */
184 case 697: /* smnegl */
185 case 696: /* smsubl */
186 value = 696; /* --> smsubl. */
188 case 700: /* umull */
189 case 699: /* umaddl */
190 value = 699; /* --> umaddl. */
192 case 702: /* umnegl */
193 case 701: /* umsubl */
194 value = 701; /* --> umsubl. */
198 value = 712; /* --> extr. */
202 value = 919; /* --> and. */
206 value = 921; /* --> orr. */
210 value = 924; /* --> ands. */
215 value = 928; /* --> orr. */
219 value = 931; /* --> orn. */
223 value = 935; /* --> ands. */
225 case 1062: /* staddb */
226 case 966: /* ldaddb */
227 value = 966; /* --> ldaddb. */
229 case 1063: /* staddh */
230 case 967: /* ldaddh */
231 value = 967; /* --> ldaddh. */
233 case 1064: /* stadd */
234 case 968: /* ldadd */
235 value = 968; /* --> ldadd. */
237 case 1065: /* staddlb */
238 case 970: /* ldaddlb */
239 value = 970; /* --> ldaddlb. */
241 case 1066: /* staddlh */
242 case 973: /* ldaddlh */
243 value = 973; /* --> ldaddlh. */
245 case 1067: /* staddl */
246 case 976: /* ldaddl */
247 value = 976; /* --> ldaddl. */
249 case 1068: /* stclrb */
250 case 978: /* ldclrb */
251 value = 978; /* --> ldclrb. */
253 case 1069: /* stclrh */
254 case 979: /* ldclrh */
255 value = 979; /* --> ldclrh. */
257 case 1070: /* stclr */
258 case 980: /* ldclr */
259 value = 980; /* --> ldclr. */
261 case 1071: /* stclrlb */
262 case 982: /* ldclrlb */
263 value = 982; /* --> ldclrlb. */
265 case 1072: /* stclrlh */
266 case 985: /* ldclrlh */
267 value = 985; /* --> ldclrlh. */
269 case 1073: /* stclrl */
270 case 988: /* ldclrl */
271 value = 988; /* --> ldclrl. */
273 case 1074: /* steorb */
274 case 990: /* ldeorb */
275 value = 990; /* --> ldeorb. */
277 case 1075: /* steorh */
278 case 991: /* ldeorh */
279 value = 991; /* --> ldeorh. */
281 case 1076: /* steor */
282 case 992: /* ldeor */
283 value = 992; /* --> ldeor. */
285 case 1077: /* steorlb */
286 case 994: /* ldeorlb */
287 value = 994; /* --> ldeorlb. */
289 case 1078: /* steorlh */
290 case 997: /* ldeorlh */
291 value = 997; /* --> ldeorlh. */
293 case 1079: /* steorl */
294 case 1000: /* ldeorl */
295 value = 1000; /* --> ldeorl. */
297 case 1080: /* stsetb */
298 case 1002: /* ldsetb */
299 value = 1002; /* --> ldsetb. */
301 case 1081: /* stseth */
302 case 1003: /* ldseth */
303 value = 1003; /* --> ldseth. */
305 case 1082: /* stset */
306 case 1004: /* ldset */
307 value = 1004; /* --> ldset. */
309 case 1083: /* stsetlb */
310 case 1006: /* ldsetlb */
311 value = 1006; /* --> ldsetlb. */
313 case 1084: /* stsetlh */
314 case 1009: /* ldsetlh */
315 value = 1009; /* --> ldsetlh. */
317 case 1085: /* stsetl */
318 case 1012: /* ldsetl */
319 value = 1012; /* --> ldsetl. */
321 case 1086: /* stsmaxb */
322 case 1014: /* ldsmaxb */
323 value = 1014; /* --> ldsmaxb. */
325 case 1087: /* stsmaxh */
326 case 1015: /* ldsmaxh */
327 value = 1015; /* --> ldsmaxh. */
329 case 1088: /* stsmax */
330 case 1016: /* ldsmax */
331 value = 1016; /* --> ldsmax. */
333 case 1089: /* stsmaxlb */
334 case 1018: /* ldsmaxlb */
335 value = 1018; /* --> ldsmaxlb. */
337 case 1090: /* stsmaxlh */
338 case 1021: /* ldsmaxlh */
339 value = 1021; /* --> ldsmaxlh. */
341 case 1091: /* stsmaxl */
342 case 1024: /* ldsmaxl */
343 value = 1024; /* --> ldsmaxl. */
345 case 1092: /* stsminb */
346 case 1026: /* ldsminb */
347 value = 1026; /* --> ldsminb. */
349 case 1093: /* stsminh */
350 case 1027: /* ldsminh */
351 value = 1027; /* --> ldsminh. */
353 case 1094: /* stsmin */
354 case 1028: /* ldsmin */
355 value = 1028; /* --> ldsmin. */
357 case 1095: /* stsminlb */
358 case 1030: /* ldsminlb */
359 value = 1030; /* --> ldsminlb. */
361 case 1096: /* stsminlh */
362 case 1033: /* ldsminlh */
363 value = 1033; /* --> ldsminlh. */
365 case 1097: /* stsminl */
366 case 1036: /* ldsminl */
367 value = 1036; /* --> ldsminl. */
369 case 1098: /* stumaxb */
370 case 1038: /* ldumaxb */
371 value = 1038; /* --> ldumaxb. */
373 case 1099: /* stumaxh */
374 case 1039: /* ldumaxh */
375 value = 1039; /* --> ldumaxh. */
377 case 1100: /* stumax */
378 case 1040: /* ldumax */
379 value = 1040; /* --> ldumax. */
381 case 1101: /* stumaxlb */
382 case 1042: /* ldumaxlb */
383 value = 1042; /* --> ldumaxlb. */
385 case 1102: /* stumaxlh */
386 case 1045: /* ldumaxlh */
387 value = 1045; /* --> ldumaxlh. */
389 case 1103: /* stumaxl */
390 case 1048: /* ldumaxl */
391 value = 1048; /* --> ldumaxl. */
393 case 1104: /* stuminb */
394 case 1050: /* lduminb */
395 value = 1050; /* --> lduminb. */
397 case 1105: /* stuminh */
398 case 1051: /* lduminh */
399 value = 1051; /* --> lduminh. */
401 case 1106: /* stumin */
402 case 1052: /* ldumin */
403 value = 1052; /* --> ldumin. */
405 case 1107: /* stuminlb */
406 case 1054: /* lduminlb */
407 value = 1054; /* --> lduminlb. */
409 case 1108: /* stuminlh */
410 case 1057: /* lduminlh */
411 value = 1057; /* --> lduminlh. */
413 case 1109: /* stuminl */
414 case 1060: /* lduminl */
415 value = 1060; /* --> lduminl. */
418 case 1110: /* movn */
419 value = 1110; /* --> movn. */
422 case 1112: /* movz */
423 value = 1112; /* --> movz. */
427 case 1124: /* sevl */
431 case 1120: /* yield */
433 case 1118: /* hint */
434 value = 1118; /* --> hint. */
436 case 1135: /* tlbi */
441 value = 1131; /* --> sys. */
443 default: return NULL;
446 return aarch64_opcode_table + value;
450 aarch64_insert_operand (const aarch64_operand *self,
451 const aarch64_opnd_info *info,
452 aarch64_insn *code, const aarch64_inst *inst)
454 /* Use the index as the key. */
455 int key = self - aarch64_operands;
483 return aarch64_ins_regno (self, info, code, inst);
485 return aarch64_ins_reg_extended (self, info, code, inst);
487 return aarch64_ins_reg_shifted (self, info, code, inst);
489 return aarch64_ins_ft (self, info, code, inst);
493 return aarch64_ins_reglane (self, info, code, inst);
495 return aarch64_ins_reglist (self, info, code, inst);
497 return aarch64_ins_ldst_reglist (self, info, code, inst);
499 return aarch64_ins_ldst_reglist_r (self, info, code, inst);
501 return aarch64_ins_ldst_elemlist (self, info, code, inst);
519 return aarch64_ins_imm (self, info, code, inst);
522 return aarch64_ins_advsimd_imm_shift (self, info, code, inst);
526 return aarch64_ins_advsimd_imm_modified (self, info, code, inst);
528 return aarch64_ins_fpimm (self, info, code, inst);
530 return aarch64_ins_limm (self, info, code, inst);
532 return aarch64_ins_aimm (self, info, code, inst);
534 return aarch64_ins_imm_half (self, info, code, inst);
536 return aarch64_ins_fbits (self, info, code, inst);
539 return aarch64_ins_cond (self, info, code, inst);
542 return aarch64_ins_addr_simple (self, info, code, inst);
544 return aarch64_ins_addr_regoff (self, info, code, inst);
548 return aarch64_ins_addr_simm (self, info, code, inst);
550 return aarch64_ins_addr_uimm12 (self, info, code, inst);
552 return aarch64_ins_simd_addr_post (self, info, code, inst);
554 return aarch64_ins_sysreg (self, info, code, inst);
556 return aarch64_ins_pstatefield (self, info, code, inst);
561 return aarch64_ins_sysins_op (self, info, code, inst);
564 return aarch64_ins_barrier (self, info, code, inst);
566 return aarch64_ins_prfop (self, info, code, inst);
568 return aarch64_ins_hint (self, info, code, inst);
569 default: assert (0); abort ();