1 /* This file is automatically generated by aarch64-gen. Do not edit! */
2 /* Copyright (C) 2012-2015 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 = 140; /* --> umov. */
80 value = 142; /* --> ins. */
84 value = 144; /* --> ins. */
88 value = 205; /* --> not. */
92 value = 272; /* --> orr. */
96 value = 341; /* --> sshll. */
99 case 343: /* sshll2 */
100 value = 343; /* --> sshll2. */
103 case 363: /* ushll */
104 value = 363; /* --> ushll. */
106 case 366: /* uxtl2 */
107 case 365: /* ushll2 */
108 value = 365; /* --> ushll2. */
112 value = 460; /* --> dup. */
119 case 535: /* sbfiz */
121 value = 534; /* --> sbfm. */
124 case 544: /* bfxil */
127 value = 541; /* --> bfm. */
134 case 546: /* ubfiz */
136 value = 545; /* --> ubfm. */
140 case 567: /* csinc */
141 value = 567; /* --> csinc. */
143 case 572: /* csetm */
145 case 570: /* csinv */
146 value = 570; /* --> csinv. */
149 case 573: /* csneg */
150 value = 573; /* --> csneg. */
153 case 593: /* rev64 */
154 value = 592; /* --> rev. */
158 value = 599; /* --> lslv. */
162 value = 601; /* --> lsrv. */
166 value = 603; /* --> asrv. */
170 value = 605; /* --> rorv. */
174 value = 615; /* --> madd. */
178 value = 617; /* --> msub. */
180 case 620: /* smull */
181 case 619: /* smaddl */
182 value = 619; /* --> smaddl. */
184 case 622: /* smnegl */
185 case 621: /* smsubl */
186 value = 621; /* --> smsubl. */
188 case 625: /* umull */
189 case 624: /* umaddl */
190 value = 624; /* --> umaddl. */
192 case 627: /* umnegl */
193 case 626: /* umsubl */
194 value = 626; /* --> umsubl. */
198 value = 637; /* --> extr. */
202 value = 844; /* --> and. */
206 value = 846; /* --> orr. */
210 value = 849; /* --> ands. */
215 value = 853; /* --> orr. */
219 value = 856; /* --> orn. */
223 value = 860; /* --> ands. */
225 case 987: /* staddb */
226 case 891: /* ldaddb */
227 value = 891; /* --> ldaddb. */
229 case 988: /* staddh */
230 case 892: /* ldaddh */
231 value = 892; /* --> ldaddh. */
233 case 989: /* stadd */
234 case 893: /* ldadd */
235 value = 893; /* --> ldadd. */
237 case 990: /* staddlb */
238 case 895: /* ldaddlb */
239 value = 895; /* --> ldaddlb. */
241 case 991: /* staddlh */
242 case 898: /* ldaddlh */
243 value = 898; /* --> ldaddlh. */
245 case 992: /* staddl */
246 case 901: /* ldaddl */
247 value = 901; /* --> ldaddl. */
249 case 993: /* stclrb */
250 case 903: /* ldclrb */
251 value = 903; /* --> ldclrb. */
253 case 994: /* stclrh */
254 case 904: /* ldclrh */
255 value = 904; /* --> ldclrh. */
257 case 995: /* stclr */
258 case 905: /* ldclr */
259 value = 905; /* --> ldclr. */
261 case 996: /* stclrlb */
262 case 907: /* ldclrlb */
263 value = 907; /* --> ldclrlb. */
265 case 997: /* stclrlh */
266 case 910: /* ldclrlh */
267 value = 910; /* --> ldclrlh. */
269 case 998: /* stclrl */
270 case 913: /* ldclrl */
271 value = 913; /* --> ldclrl. */
273 case 999: /* steorb */
274 case 915: /* ldeorb */
275 value = 915; /* --> ldeorb. */
277 case 1000: /* steorh */
278 case 916: /* ldeorh */
279 value = 916; /* --> ldeorh. */
281 case 1001: /* steor */
282 case 917: /* ldeor */
283 value = 917; /* --> ldeor. */
285 case 1002: /* steorlb */
286 case 919: /* ldeorlb */
287 value = 919; /* --> ldeorlb. */
289 case 1003: /* steorlh */
290 case 922: /* ldeorlh */
291 value = 922; /* --> ldeorlh. */
293 case 1004: /* steorl */
294 case 925: /* ldeorl */
295 value = 925; /* --> ldeorl. */
297 case 1005: /* stsetb */
298 case 927: /* ldsetb */
299 value = 927; /* --> ldsetb. */
301 case 1006: /* stseth */
302 case 928: /* ldseth */
303 value = 928; /* --> ldseth. */
305 case 1007: /* stset */
306 case 929: /* ldset */
307 value = 929; /* --> ldset. */
309 case 1008: /* stsetlb */
310 case 931: /* ldsetlb */
311 value = 931; /* --> ldsetlb. */
313 case 1009: /* stsetlh */
314 case 934: /* ldsetlh */
315 value = 934; /* --> ldsetlh. */
317 case 1010: /* stsetl */
318 case 937: /* ldsetl */
319 value = 937; /* --> ldsetl. */
321 case 1011: /* stsmaxb */
322 case 939: /* ldsmaxb */
323 value = 939; /* --> ldsmaxb. */
325 case 1012: /* stsmaxh */
326 case 940: /* ldsmaxh */
327 value = 940; /* --> ldsmaxh. */
329 case 1013: /* stsmax */
330 case 941: /* ldsmax */
331 value = 941; /* --> ldsmax. */
333 case 1014: /* stsmaxlb */
334 case 943: /* ldsmaxlb */
335 value = 943; /* --> ldsmaxlb. */
337 case 1015: /* stsmaxlh */
338 case 946: /* ldsmaxlh */
339 value = 946; /* --> ldsmaxlh. */
341 case 1016: /* stsmaxl */
342 case 949: /* ldsmaxl */
343 value = 949; /* --> ldsmaxl. */
345 case 1017: /* stsminb */
346 case 951: /* ldsminb */
347 value = 951; /* --> ldsminb. */
349 case 1018: /* stsminh */
350 case 952: /* ldsminh */
351 value = 952; /* --> ldsminh. */
353 case 1019: /* stsmin */
354 case 953: /* ldsmin */
355 value = 953; /* --> ldsmin. */
357 case 1020: /* stsminlb */
358 case 955: /* ldsminlb */
359 value = 955; /* --> ldsminlb. */
361 case 1021: /* stsminlh */
362 case 958: /* ldsminlh */
363 value = 958; /* --> ldsminlh. */
365 case 1022: /* stsminl */
366 case 961: /* ldsminl */
367 value = 961; /* --> ldsminl. */
369 case 1023: /* stumaxb */
370 case 963: /* ldumaxb */
371 value = 963; /* --> ldumaxb. */
373 case 1024: /* stumaxh */
374 case 964: /* ldumaxh */
375 value = 964; /* --> ldumaxh. */
377 case 1025: /* stumax */
378 case 965: /* ldumax */
379 value = 965; /* --> ldumax. */
381 case 1026: /* stumaxlb */
382 case 967: /* ldumaxlb */
383 value = 967; /* --> ldumaxlb. */
385 case 1027: /* stumaxlh */
386 case 970: /* ldumaxlh */
387 value = 970; /* --> ldumaxlh. */
389 case 1028: /* stumaxl */
390 case 973: /* ldumaxl */
391 value = 973; /* --> ldumaxl. */
393 case 1029: /* stuminb */
394 case 975: /* lduminb */
395 value = 975; /* --> lduminb. */
397 case 1030: /* stuminh */
398 case 976: /* lduminh */
399 value = 976; /* --> lduminh. */
401 case 1031: /* stumin */
402 case 977: /* ldumin */
403 value = 977; /* --> ldumin. */
405 case 1032: /* stuminlb */
406 case 979: /* lduminlb */
407 value = 979; /* --> lduminlb. */
409 case 1033: /* stuminlh */
410 case 982: /* lduminlh */
411 value = 982; /* --> lduminlh. */
413 case 1034: /* stuminl */
414 case 985: /* lduminl */
415 value = 985; /* --> lduminl. */
418 case 1035: /* movn */
419 value = 1035; /* --> movn. */
422 case 1037: /* movz */
423 value = 1037; /* --> movz. */
427 case 1049: /* sevl */
431 case 1045: /* yield */
433 case 1043: /* hint */
434 value = 1043; /* --> hint. */
436 case 1060: /* tlbi */
441 value = 1056; /* --> 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);
520 return aarch64_ins_imm (self, info, code, inst);
523 return aarch64_ins_advsimd_imm_shift (self, info, code, inst);
527 return aarch64_ins_advsimd_imm_modified (self, info, code, inst);
529 return aarch64_ins_limm (self, info, code, inst);
531 return aarch64_ins_aimm (self, info, code, inst);
533 return aarch64_ins_imm_half (self, info, code, inst);
535 return aarch64_ins_fbits (self, info, code, inst);
538 return aarch64_ins_cond (self, info, code, inst);
541 return aarch64_ins_addr_simple (self, info, code, inst);
543 return aarch64_ins_addr_regoff (self, info, code, inst);
547 return aarch64_ins_addr_simm (self, info, code, inst);
549 return aarch64_ins_addr_uimm12 (self, info, code, inst);
551 return aarch64_ins_simd_addr_post (self, info, code, inst);
553 return aarch64_ins_sysreg (self, info, code, inst);
555 return aarch64_ins_pstatefield (self, info, code, inst);
560 return aarch64_ins_sysins_op (self, info, code, inst);
563 return aarch64_ins_barrier (self, info, code, inst);
565 return aarch64_ins_prfop (self, info, code, inst);
567 return aarch64_ins_hint (self, info, code, inst);
568 default: assert (0); abort ();