/* This file is automatically generated by aarch64-gen. Do not edit! */ /* Copyright (C) 2012-2015 Free Software Foundation, Inc. Contributed by ARM Ltd. This file is part of the GNU opcodes library. This library is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3, or (at your option) any later version. It is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. You should have received a copy of the GNU General Public License along with this program; see the file COPYING3. If not, see . */ #include "sysdep.h" #include "aarch64-asm.h" const aarch64_opcode * aarch64_find_real_opcode (const aarch64_opcode *opcode) { /* Use the index as the key to locate the real opcode. */ int key = opcode - aarch64_opcode_table; int value; switch (key) { case 3: /* ngc */ case 2: /* sbc */ value = 2; /* --> sbc. */ break; case 5: /* ngcs */ case 4: /* sbcs */ value = 4; /* --> sbcs. */ break; case 8: /* cmn */ case 7: /* adds */ value = 7; /* --> adds. */ break; case 11: /* cmp */ case 10: /* subs */ value = 10; /* --> subs. */ break; case 13: /* mov */ case 12: /* add */ value = 12; /* --> add. */ break; case 15: /* cmn */ case 14: /* adds */ value = 14; /* --> adds. */ break; case 18: /* cmp */ case 17: /* subs */ value = 17; /* --> subs. */ break; case 21: /* cmn */ case 20: /* adds */ value = 20; /* --> adds. */ break; case 23: /* neg */ case 22: /* sub */ value = 22; /* --> sub. */ break; case 26: /* negs */ case 25: /* cmp */ case 24: /* subs */ value = 24; /* --> subs. */ break; case 150: /* mov */ case 149: /* umov */ value = 149; /* --> umov. */ break; case 152: /* mov */ case 151: /* ins */ value = 151; /* --> ins. */ break; case 154: /* mov */ case 153: /* ins */ value = 153; /* --> ins. */ break; case 236: /* mvn */ case 235: /* not */ value = 235; /* --> not. */ break; case 311: /* mov */ case 310: /* orr */ value = 310; /* --> orr. */ break; case 380: /* sxtl */ case 379: /* sshll */ value = 379; /* --> sshll. */ break; case 382: /* sxtl2 */ case 381: /* sshll2 */ value = 381; /* --> sshll2. */ break; case 402: /* uxtl */ case 401: /* ushll */ value = 401; /* --> ushll. */ break; case 404: /* uxtl2 */ case 403: /* ushll2 */ value = 403; /* --> ushll2. */ break; case 523: /* mov */ case 522: /* dup */ value = 522; /* --> dup. */ break; case 601: /* sxtw */ case 600: /* sxth */ case 599: /* sxtb */ case 602: /* asr */ case 598: /* sbfx */ case 597: /* sbfiz */ case 596: /* sbfm */ value = 596; /* --> sbfm. */ break; case 605: /* bfc */ case 606: /* bfxil */ case 604: /* bfi */ case 603: /* bfm */ value = 603; /* --> bfm. */ break; case 611: /* uxth */ case 610: /* uxtb */ case 613: /* lsr */ case 612: /* lsl */ case 609: /* ubfx */ case 608: /* ubfiz */ case 607: /* ubfm */ value = 607; /* --> ubfm. */ break; case 631: /* cset */ case 630: /* cinc */ case 629: /* csinc */ value = 629; /* --> csinc. */ break; case 634: /* csetm */ case 633: /* cinv */ case 632: /* csinv */ value = 632; /* --> csinv. */ break; case 636: /* cneg */ case 635: /* csneg */ value = 635; /* --> csneg. */ break; case 654: /* rev */ case 655: /* rev64 */ value = 654; /* --> rev. */ break; case 662: /* lsl */ case 661: /* lslv */ value = 661; /* --> lslv. */ break; case 664: /* lsr */ case 663: /* lsrv */ value = 663; /* --> lsrv. */ break; case 666: /* asr */ case 665: /* asrv */ value = 665; /* --> asrv. */ break; case 668: /* ror */ case 667: /* rorv */ value = 667; /* --> rorv. */ break; case 678: /* mul */ case 677: /* madd */ value = 677; /* --> madd. */ break; case 680: /* mneg */ case 679: /* msub */ value = 679; /* --> msub. */ break; case 682: /* smull */ case 681: /* smaddl */ value = 681; /* --> smaddl. */ break; case 684: /* smnegl */ case 683: /* smsubl */ value = 683; /* --> smsubl. */ break; case 687: /* umull */ case 686: /* umaddl */ value = 686; /* --> umaddl. */ break; case 689: /* umnegl */ case 688: /* umsubl */ value = 688; /* --> umsubl. */ break; case 700: /* ror */ case 699: /* extr */ value = 699; /* --> extr. */ break; case 907: /* bic */ case 906: /* and */ value = 906; /* --> and. */ break; case 909: /* mov */ case 908: /* orr */ value = 908; /* --> orr. */ break; case 912: /* tst */ case 911: /* ands */ value = 911; /* --> ands. */ break; case 917: /* uxtw */ case 916: /* mov */ case 915: /* orr */ value = 915; /* --> orr. */ break; case 919: /* mvn */ case 918: /* orn */ value = 918; /* --> orn. */ break; case 923: /* tst */ case 922: /* ands */ value = 922; /* --> ands. */ break; case 1049: /* staddb */ case 953: /* ldaddb */ value = 953; /* --> ldaddb. */ break; case 1050: /* staddh */ case 954: /* ldaddh */ value = 954; /* --> ldaddh. */ break; case 1051: /* stadd */ case 955: /* ldadd */ value = 955; /* --> ldadd. */ break; case 1052: /* staddlb */ case 957: /* ldaddlb */ value = 957; /* --> ldaddlb. */ break; case 1053: /* staddlh */ case 960: /* ldaddlh */ value = 960; /* --> ldaddlh. */ break; case 1054: /* staddl */ case 963: /* ldaddl */ value = 963; /* --> ldaddl. */ break; case 1055: /* stclrb */ case 965: /* ldclrb */ value = 965; /* --> ldclrb. */ break; case 1056: /* stclrh */ case 966: /* ldclrh */ value = 966; /* --> ldclrh. */ break; case 1057: /* stclr */ case 967: /* ldclr */ value = 967; /* --> ldclr. */ break; case 1058: /* stclrlb */ case 969: /* ldclrlb */ value = 969; /* --> ldclrlb. */ break; case 1059: /* stclrlh */ case 972: /* ldclrlh */ value = 972; /* --> ldclrlh. */ break; case 1060: /* stclrl */ case 975: /* ldclrl */ value = 975; /* --> ldclrl. */ break; case 1061: /* steorb */ case 977: /* ldeorb */ value = 977; /* --> ldeorb. */ break; case 1062: /* steorh */ case 978: /* ldeorh */ value = 978; /* --> ldeorh. */ break; case 1063: /* steor */ case 979: /* ldeor */ value = 979; /* --> ldeor. */ break; case 1064: /* steorlb */ case 981: /* ldeorlb */ value = 981; /* --> ldeorlb. */ break; case 1065: /* steorlh */ case 984: /* ldeorlh */ value = 984; /* --> ldeorlh. */ break; case 1066: /* steorl */ case 987: /* ldeorl */ value = 987; /* --> ldeorl. */ break; case 1067: /* stsetb */ case 989: /* ldsetb */ value = 989; /* --> ldsetb. */ break; case 1068: /* stseth */ case 990: /* ldseth */ value = 990; /* --> ldseth. */ break; case 1069: /* stset */ case 991: /* ldset */ value = 991; /* --> ldset. */ break; case 1070: /* stsetlb */ case 993: /* ldsetlb */ value = 993; /* --> ldsetlb. */ break; case 1071: /* stsetlh */ case 996: /* ldsetlh */ value = 996; /* --> ldsetlh. */ break; case 1072: /* stsetl */ case 999: /* ldsetl */ value = 999; /* --> ldsetl. */ break; case 1073: /* stsmaxb */ case 1001: /* ldsmaxb */ value = 1001; /* --> ldsmaxb. */ break; case 1074: /* stsmaxh */ case 1002: /* ldsmaxh */ value = 1002; /* --> ldsmaxh. */ break; case 1075: /* stsmax */ case 1003: /* ldsmax */ value = 1003; /* --> ldsmax. */ break; case 1076: /* stsmaxlb */ case 1005: /* ldsmaxlb */ value = 1005; /* --> ldsmaxlb. */ break; case 1077: /* stsmaxlh */ case 1008: /* ldsmaxlh */ value = 1008; /* --> ldsmaxlh. */ break; case 1078: /* stsmaxl */ case 1011: /* ldsmaxl */ value = 1011; /* --> ldsmaxl. */ break; case 1079: /* stsminb */ case 1013: /* ldsminb */ value = 1013; /* --> ldsminb. */ break; case 1080: /* stsminh */ case 1014: /* ldsminh */ value = 1014; /* --> ldsminh. */ break; case 1081: /* stsmin */ case 1015: /* ldsmin */ value = 1015; /* --> ldsmin. */ break; case 1082: /* stsminlb */ case 1017: /* ldsminlb */ value = 1017; /* --> ldsminlb. */ break; case 1083: /* stsminlh */ case 1020: /* ldsminlh */ value = 1020; /* --> ldsminlh. */ break; case 1084: /* stsminl */ case 1023: /* ldsminl */ value = 1023; /* --> ldsminl. */ break; case 1085: /* stumaxb */ case 1025: /* ldumaxb */ value = 1025; /* --> ldumaxb. */ break; case 1086: /* stumaxh */ case 1026: /* ldumaxh */ value = 1026; /* --> ldumaxh. */ break; case 1087: /* stumax */ case 1027: /* ldumax */ value = 1027; /* --> ldumax. */ break; case 1088: /* stumaxlb */ case 1029: /* ldumaxlb */ value = 1029; /* --> ldumaxlb. */ break; case 1089: /* stumaxlh */ case 1032: /* ldumaxlh */ value = 1032; /* --> ldumaxlh. */ break; case 1090: /* stumaxl */ case 1035: /* ldumaxl */ value = 1035; /* --> ldumaxl. */ break; case 1091: /* stuminb */ case 1037: /* lduminb */ value = 1037; /* --> lduminb. */ break; case 1092: /* stuminh */ case 1038: /* lduminh */ value = 1038; /* --> lduminh. */ break; case 1093: /* stumin */ case 1039: /* ldumin */ value = 1039; /* --> ldumin. */ break; case 1094: /* stuminlb */ case 1041: /* lduminlb */ value = 1041; /* --> lduminlb. */ break; case 1095: /* stuminlh */ case 1044: /* lduminlh */ value = 1044; /* --> lduminlh. */ break; case 1096: /* stuminl */ case 1047: /* lduminl */ value = 1047; /* --> lduminl. */ break; case 1098: /* mov */ case 1097: /* movn */ value = 1097; /* --> movn. */ break; case 1100: /* mov */ case 1099: /* movz */ value = 1099; /* --> movz. */ break; case 1113: /* psb */ case 1112: /* esb */ case 1111: /* sevl */ case 1110: /* sev */ case 1109: /* wfi */ case 1108: /* wfe */ case 1107: /* yield */ case 1106: /* nop */ case 1105: /* hint */ value = 1105; /* --> hint. */ break; case 1122: /* tlbi */ case 1121: /* ic */ case 1120: /* dc */ case 1119: /* at */ case 1118: /* sys */ value = 1118; /* --> sys. */ break; default: return NULL; } return aarch64_opcode_table + value; } const char* aarch64_insert_operand (const aarch64_operand *self, const aarch64_opnd_info *info, aarch64_insn *code, const aarch64_inst *inst) { /* Use the index as the key. */ int key = self - aarch64_operands; switch (key) { case 1: case 2: case 3: case 4: case 5: case 6: case 7: case 8: case 9: case 10: case 14: case 15: case 16: case 17: case 19: case 20: case 21: case 22: case 23: case 24: case 25: case 26: case 27: case 35: case 36: return aarch64_ins_regno (self, info, code, inst); case 12: return aarch64_ins_reg_extended (self, info, code, inst); case 13: return aarch64_ins_reg_shifted (self, info, code, inst); case 18: return aarch64_ins_ft (self, info, code, inst); case 28: case 29: case 30: return aarch64_ins_reglane (self, info, code, inst); case 31: return aarch64_ins_reglist (self, info, code, inst); case 32: return aarch64_ins_ldst_reglist (self, info, code, inst); case 33: return aarch64_ins_ldst_reglist_r (self, info, code, inst); case 34: return aarch64_ins_ldst_elemlist (self, info, code, inst); case 37: case 46: case 47: case 48: case 49: case 50: case 51: case 52: case 53: case 54: case 55: case 56: case 57: case 58: case 67: case 68: case 69: case 70: return aarch64_ins_imm (self, info, code, inst); case 38: case 39: return aarch64_ins_advsimd_imm_shift (self, info, code, inst); case 40: case 41: case 42: return aarch64_ins_advsimd_imm_modified (self, info, code, inst); case 59: return aarch64_ins_limm (self, info, code, inst); case 60: return aarch64_ins_aimm (self, info, code, inst); case 61: return aarch64_ins_imm_half (self, info, code, inst); case 62: return aarch64_ins_fbits (self, info, code, inst); case 64: case 65: return aarch64_ins_cond (self, info, code, inst); case 71: case 77: return aarch64_ins_addr_simple (self, info, code, inst); case 72: return aarch64_ins_addr_regoff (self, info, code, inst); case 73: case 74: case 75: return aarch64_ins_addr_simm (self, info, code, inst); case 76: return aarch64_ins_addr_uimm12 (self, info, code, inst); case 78: return aarch64_ins_simd_addr_post (self, info, code, inst); case 79: return aarch64_ins_sysreg (self, info, code, inst); case 80: return aarch64_ins_pstatefield (self, info, code, inst); case 81: case 82: case 83: case 84: return aarch64_ins_sysins_op (self, info, code, inst); case 85: case 86: return aarch64_ins_barrier (self, info, code, inst); case 87: return aarch64_ins_prfop (self, info, code, inst); case 88: return aarch64_ins_hint (self, info, code, inst); default: assert (0); abort (); } }