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 = 260; /* --> orr. */
96 value = 317; /* --> sshll. */
99 case 319: /* sshll2 */
100 value = 319; /* --> sshll2. */
103 case 339: /* ushll */
104 value = 339; /* --> ushll. */
106 case 342: /* uxtl2 */
107 case 341: /* ushll2 */
108 value = 341; /* --> ushll2. */
112 value = 436; /* --> dup. */
119 case 502: /* sbfiz */
121 value = 501; /* --> sbfm. */
124 case 511: /* bfxil */
127 value = 508; /* --> bfm. */
134 case 513: /* ubfiz */
136 value = 512; /* --> ubfm. */
140 case 534: /* csinc */
141 value = 534; /* --> csinc. */
143 case 539: /* csetm */
145 case 537: /* csinv */
146 value = 537; /* --> csinv. */
149 case 540: /* csneg */
150 value = 540; /* --> csneg. */
153 case 560: /* rev64 */
154 value = 559; /* --> rev. */
158 value = 566; /* --> lslv. */
162 value = 568; /* --> lsrv. */
166 value = 570; /* --> asrv. */
170 value = 572; /* --> rorv. */
174 value = 582; /* --> madd. */
178 value = 584; /* --> msub. */
180 case 587: /* smull */
181 case 586: /* smaddl */
182 value = 586; /* --> smaddl. */
184 case 589: /* smnegl */
185 case 588: /* smsubl */
186 value = 588; /* --> smsubl. */
188 case 592: /* umull */
189 case 591: /* umaddl */
190 value = 591; /* --> umaddl. */
192 case 594: /* umnegl */
193 case 593: /* umsubl */
194 value = 593; /* --> umsubl. */
198 value = 604; /* --> extr. */
202 value = 811; /* --> and. */
206 value = 813; /* --> orr. */
210 value = 816; /* --> ands. */
215 value = 820; /* --> orr. */
219 value = 823; /* --> orn. */
223 value = 827; /* --> ands. */
225 case 954: /* staddb */
226 case 858: /* ldaddb */
227 value = 858; /* --> ldaddb. */
229 case 955: /* staddh */
230 case 859: /* ldaddh */
231 value = 859; /* --> ldaddh. */
233 case 956: /* stadd */
234 case 860: /* ldadd */
235 value = 860; /* --> ldadd. */
237 case 957: /* staddlb */
238 case 862: /* ldaddlb */
239 value = 862; /* --> ldaddlb. */
241 case 958: /* staddlh */
242 case 865: /* ldaddlh */
243 value = 865; /* --> ldaddlh. */
245 case 959: /* staddl */
246 case 868: /* ldaddl */
247 value = 868; /* --> ldaddl. */
249 case 960: /* stclrb */
250 case 870: /* ldclrb */
251 value = 870; /* --> ldclrb. */
253 case 961: /* stclrh */
254 case 871: /* ldclrh */
255 value = 871; /* --> ldclrh. */
257 case 962: /* stclr */
258 case 872: /* ldclr */
259 value = 872; /* --> ldclr. */
261 case 963: /* stclrlb */
262 case 874: /* ldclrlb */
263 value = 874; /* --> ldclrlb. */
265 case 964: /* stclrlh */
266 case 877: /* ldclrlh */
267 value = 877; /* --> ldclrlh. */
269 case 965: /* stclrl */
270 case 880: /* ldclrl */
271 value = 880; /* --> ldclrl. */
273 case 966: /* steorb */
274 case 882: /* ldeorb */
275 value = 882; /* --> ldeorb. */
277 case 967: /* steorh */
278 case 883: /* ldeorh */
279 value = 883; /* --> ldeorh. */
281 case 968: /* steor */
282 case 884: /* ldeor */
283 value = 884; /* --> ldeor. */
285 case 969: /* steorlb */
286 case 886: /* ldeorlb */
287 value = 886; /* --> ldeorlb. */
289 case 970: /* steorlh */
290 case 889: /* ldeorlh */
291 value = 889; /* --> ldeorlh. */
293 case 971: /* steorl */
294 case 892: /* ldeorl */
295 value = 892; /* --> ldeorl. */
297 case 972: /* stsetb */
298 case 894: /* ldsetb */
299 value = 894; /* --> ldsetb. */
301 case 973: /* stseth */
302 case 895: /* ldseth */
303 value = 895; /* --> ldseth. */
305 case 974: /* stset */
306 case 896: /* ldset */
307 value = 896; /* --> ldset. */
309 case 975: /* stsetlb */
310 case 898: /* ldsetlb */
311 value = 898; /* --> ldsetlb. */
313 case 976: /* stsetlh */
314 case 901: /* ldsetlh */
315 value = 901; /* --> ldsetlh. */
317 case 977: /* stsetl */
318 case 904: /* ldsetl */
319 value = 904; /* --> ldsetl. */
321 case 978: /* stsmaxb */
322 case 906: /* ldsmaxb */
323 value = 906; /* --> ldsmaxb. */
325 case 979: /* stsmaxh */
326 case 907: /* ldsmaxh */
327 value = 907; /* --> ldsmaxh. */
329 case 980: /* stsmax */
330 case 908: /* ldsmax */
331 value = 908; /* --> ldsmax. */
333 case 981: /* stsmaxlb */
334 case 910: /* ldsmaxlb */
335 value = 910; /* --> ldsmaxlb. */
337 case 982: /* stsmaxlh */
338 case 913: /* ldsmaxlh */
339 value = 913; /* --> ldsmaxlh. */
341 case 983: /* stsmaxl */
342 case 916: /* ldsmaxl */
343 value = 916; /* --> ldsmaxl. */
345 case 984: /* stsminb */
346 case 918: /* ldsminb */
347 value = 918; /* --> ldsminb. */
349 case 985: /* stsminh */
350 case 919: /* ldsminh */
351 value = 919; /* --> ldsminh. */
353 case 986: /* stsmin */
354 case 920: /* ldsmin */
355 value = 920; /* --> ldsmin. */
357 case 987: /* stsminlb */
358 case 922: /* ldsminlb */
359 value = 922; /* --> ldsminlb. */
361 case 988: /* stsminlh */
362 case 925: /* ldsminlh */
363 value = 925; /* --> ldsminlh. */
365 case 989: /* stsminl */
366 case 928: /* ldsminl */
367 value = 928; /* --> ldsminl. */
369 case 990: /* stumaxb */
370 case 930: /* ldumaxb */
371 value = 930; /* --> ldumaxb. */
373 case 991: /* stumaxh */
374 case 931: /* ldumaxh */
375 value = 931; /* --> ldumaxh. */
377 case 992: /* stumax */
378 case 932: /* ldumax */
379 value = 932; /* --> ldumax. */
381 case 993: /* stumaxlb */
382 case 934: /* ldumaxlb */
383 value = 934; /* --> ldumaxlb. */
385 case 994: /* stumaxlh */
386 case 937: /* ldumaxlh */
387 value = 937; /* --> ldumaxlh. */
389 case 995: /* stumaxl */
390 case 940: /* ldumaxl */
391 value = 940; /* --> ldumaxl. */
393 case 996: /* stuminb */
394 case 942: /* lduminb */
395 value = 942; /* --> lduminb. */
397 case 997: /* stuminh */
398 case 943: /* lduminh */
399 value = 943; /* --> lduminh. */
401 case 998: /* stumin */
402 case 944: /* ldumin */
403 value = 944; /* --> ldumin. */
405 case 999: /* stuminlb */
406 case 946: /* lduminlb */
407 value = 946; /* --> lduminlb. */
409 case 1000: /* stuminlh */
410 case 949: /* lduminlh */
411 value = 949; /* --> lduminlh. */
413 case 1001: /* stuminl */
414 case 952: /* lduminl */
415 value = 952; /* --> lduminl. */
418 case 1002: /* movn */
419 value = 1002; /* --> movn. */
422 case 1004: /* movz */
423 value = 1004; /* --> movz. */
425 case 1016: /* sevl */
429 case 1012: /* yield */
431 case 1010: /* hint */
432 value = 1010; /* --> hint. */
434 case 1025: /* tlbi */
439 value = 1021; /* --> sys. */
441 default: return NULL;
444 return aarch64_opcode_table + value;
448 aarch64_insert_operand (const aarch64_operand *self,
449 const aarch64_opnd_info *info,
450 aarch64_insn *code, const aarch64_inst *inst)
452 /* Use the index as the key. */
453 int key = self - aarch64_operands;
481 return aarch64_ins_regno (self, info, code, inst);
483 return aarch64_ins_reg_extended (self, info, code, inst);
485 return aarch64_ins_reg_shifted (self, info, code, inst);
487 return aarch64_ins_ft (self, info, code, inst);
491 return aarch64_ins_reglane (self, info, code, inst);
493 return aarch64_ins_reglist (self, info, code, inst);
495 return aarch64_ins_ldst_reglist (self, info, code, inst);
497 return aarch64_ins_ldst_reglist_r (self, info, code, inst);
499 return aarch64_ins_ldst_elemlist (self, info, code, inst);
518 return aarch64_ins_imm (self, info, code, inst);
521 return aarch64_ins_advsimd_imm_shift (self, info, code, inst);
525 return aarch64_ins_advsimd_imm_modified (self, info, code, inst);
527 return aarch64_ins_limm (self, info, code, inst);
529 return aarch64_ins_aimm (self, info, code, inst);
531 return aarch64_ins_imm_half (self, info, code, inst);
533 return aarch64_ins_fbits (self, info, code, inst);
536 return aarch64_ins_cond (self, info, code, inst);
539 return aarch64_ins_addr_simple (self, info, code, inst);
541 return aarch64_ins_addr_regoff (self, info, code, inst);
545 return aarch64_ins_addr_simm (self, info, code, inst);
547 return aarch64_ins_addr_uimm12 (self, info, code, inst);
549 return aarch64_ins_simd_addr_post (self, info, code, inst);
551 return aarch64_ins_sysreg (self, info, code, inst);
553 return aarch64_ins_pstatefield (self, info, code, inst);
558 return aarch64_ins_sysins_op (self, info, code, inst);
561 return aarch64_ins_barrier (self, info, code, inst);
563 return aarch64_ins_prfop (self, info, code, inst);
564 default: assert (0); abort ();