binutils-gdb/opcodes/aarch64-asm-2.c

571 lines
14 KiB
C
Raw Normal View History

/* 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 <http://www.gnu.org/licenses/>. */
#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 145: /* mov */
case 144: /* umov */
value = 144; /* --> umov. */
break;
case 147: /* mov */
case 146: /* ins */
value = 146; /* --> ins. */
break;
case 149: /* mov */
case 148: /* ins */
value = 148; /* --> ins. */
break;
case 231: /* mvn */
case 230: /* not */
value = 230; /* --> not. */
break;
case 306: /* mov */
case 305: /* orr */
value = 305; /* --> orr. */
break;
case 375: /* sxtl */
case 374: /* sshll */
value = 374; /* --> sshll. */
break;
case 377: /* sxtl2 */
case 376: /* sshll2 */
value = 376; /* --> sshll2. */
break;
case 397: /* uxtl */
case 396: /* ushll */
value = 396; /* --> ushll. */
break;
case 399: /* uxtl2 */
case 398: /* ushll2 */
value = 398; /* --> ushll2. */
break;
case 518: /* mov */
case 517: /* dup */
value = 517; /* --> dup. */
break;
case 596: /* sxtw */
case 595: /* sxth */
case 594: /* sxtb */
case 597: /* asr */
case 593: /* sbfx */
case 592: /* sbfiz */
case 591: /* sbfm */
value = 591; /* --> sbfm. */
break;
case 600: /* bfc */
case 601: /* bfxil */
case 599: /* bfi */
case 598: /* bfm */
value = 598; /* --> bfm. */
break;
case 606: /* uxth */
case 605: /* uxtb */
case 608: /* lsr */
case 607: /* lsl */
case 604: /* ubfx */
case 603: /* ubfiz */
case 602: /* ubfm */
value = 602; /* --> ubfm. */
break;
case 626: /* cset */
case 625: /* cinc */
case 624: /* csinc */
value = 624; /* --> csinc. */
break;
case 629: /* csetm */
case 628: /* cinv */
case 627: /* csinv */
value = 627; /* --> csinv. */
break;
case 631: /* cneg */
case 630: /* csneg */
value = 630; /* --> csneg. */
break;
case 649: /* rev */
case 650: /* rev64 */
value = 649; /* --> rev. */
break;
case 657: /* lsl */
case 656: /* lslv */
value = 656; /* --> lslv. */
break;
case 659: /* lsr */
case 658: /* lsrv */
value = 658; /* --> lsrv. */
break;
case 661: /* asr */
case 660: /* asrv */
value = 660; /* --> asrv. */
break;
case 663: /* ror */
case 662: /* rorv */
value = 662; /* --> rorv. */
break;
case 673: /* mul */
case 672: /* madd */
value = 672; /* --> madd. */
break;
case 675: /* mneg */
case 674: /* msub */
value = 674; /* --> msub. */
break;
case 677: /* smull */
case 676: /* smaddl */
value = 676; /* --> smaddl. */
break;
case 679: /* smnegl */
case 678: /* smsubl */
value = 678; /* --> smsubl. */
break;
case 682: /* umull */
case 681: /* umaddl */
value = 681; /* --> umaddl. */
break;
case 684: /* umnegl */
case 683: /* umsubl */
value = 683; /* --> umsubl. */
break;
case 695: /* ror */
case 694: /* extr */
value = 694; /* --> extr. */
break;
case 902: /* bic */
case 901: /* and */
value = 901; /* --> and. */
break;
case 904: /* mov */
case 903: /* orr */
value = 903; /* --> orr. */
break;
case 907: /* tst */
case 906: /* ands */
value = 906; /* --> ands. */
break;
case 912: /* uxtw */
case 911: /* mov */
case 910: /* orr */
value = 910; /* --> orr. */
break;
case 914: /* mvn */
case 913: /* orn */
value = 913; /* --> orn. */
break;
case 918: /* tst */
case 917: /* ands */
value = 917; /* --> ands. */
break;
case 1044: /* staddb */
case 948: /* ldaddb */
value = 948; /* --> ldaddb. */
break;
case 1045: /* staddh */
case 949: /* ldaddh */
value = 949; /* --> ldaddh. */
break;
case 1046: /* stadd */
case 950: /* ldadd */
value = 950; /* --> ldadd. */
break;
case 1047: /* staddlb */
case 952: /* ldaddlb */
value = 952; /* --> ldaddlb. */
break;
case 1048: /* staddlh */
case 955: /* ldaddlh */
value = 955; /* --> ldaddlh. */
break;
case 1049: /* staddl */
case 958: /* ldaddl */
value = 958; /* --> ldaddl. */
break;
case 1050: /* stclrb */
case 960: /* ldclrb */
value = 960; /* --> ldclrb. */
break;
case 1051: /* stclrh */
case 961: /* ldclrh */
value = 961; /* --> ldclrh. */
break;
case 1052: /* stclr */
case 962: /* ldclr */
value = 962; /* --> ldclr. */
break;
case 1053: /* stclrlb */
case 964: /* ldclrlb */
value = 964; /* --> ldclrlb. */
break;
case 1054: /* stclrlh */
case 967: /* ldclrlh */
value = 967; /* --> ldclrlh. */
break;
case 1055: /* stclrl */
case 970: /* ldclrl */
value = 970; /* --> ldclrl. */
break;
case 1056: /* steorb */
case 972: /* ldeorb */
value = 972; /* --> ldeorb. */
break;
case 1057: /* steorh */
case 973: /* ldeorh */
value = 973; /* --> ldeorh. */
break;
case 1058: /* steor */
case 974: /* ldeor */
value = 974; /* --> ldeor. */
break;
case 1059: /* steorlb */
case 976: /* ldeorlb */
value = 976; /* --> ldeorlb. */
break;
case 1060: /* steorlh */
case 979: /* ldeorlh */
value = 979; /* --> ldeorlh. */
break;
case 1061: /* steorl */
case 982: /* ldeorl */
value = 982; /* --> ldeorl. */
break;
case 1062: /* stsetb */
case 984: /* ldsetb */
value = 984; /* --> ldsetb. */
break;
case 1063: /* stseth */
case 985: /* ldseth */
value = 985; /* --> ldseth. */
break;
case 1064: /* stset */
case 986: /* ldset */
value = 986; /* --> ldset. */
break;
case 1065: /* stsetlb */
case 988: /* ldsetlb */
value = 988; /* --> ldsetlb. */
break;
case 1066: /* stsetlh */
case 991: /* ldsetlh */
value = 991; /* --> ldsetlh. */
break;
case 1067: /* stsetl */
case 994: /* ldsetl */
value = 994; /* --> ldsetl. */
break;
case 1068: /* stsmaxb */
case 996: /* ldsmaxb */
value = 996; /* --> ldsmaxb. */
break;
case 1069: /* stsmaxh */
case 997: /* ldsmaxh */
value = 997; /* --> ldsmaxh. */
break;
case 1070: /* stsmax */
case 998: /* ldsmax */
value = 998; /* --> ldsmax. */
break;
case 1071: /* stsmaxlb */
case 1000: /* ldsmaxlb */
value = 1000; /* --> ldsmaxlb. */
break;
case 1072: /* stsmaxlh */
case 1003: /* ldsmaxlh */
value = 1003; /* --> ldsmaxlh. */
break;
case 1073: /* stsmaxl */
case 1006: /* ldsmaxl */
value = 1006; /* --> ldsmaxl. */
break;
case 1074: /* stsminb */
case 1008: /* ldsminb */
value = 1008; /* --> ldsminb. */
break;
case 1075: /* stsminh */
case 1009: /* ldsminh */
value = 1009; /* --> ldsminh. */
break;
case 1076: /* stsmin */
case 1010: /* ldsmin */
value = 1010; /* --> ldsmin. */
break;
case 1077: /* stsminlb */
case 1012: /* ldsminlb */
value = 1012; /* --> ldsminlb. */
break;
case 1078: /* stsminlh */
case 1015: /* ldsminlh */
value = 1015; /* --> ldsminlh. */
break;
case 1079: /* stsminl */
case 1018: /* ldsminl */
value = 1018; /* --> ldsminl. */
break;
case 1080: /* stumaxb */
case 1020: /* ldumaxb */
value = 1020; /* --> ldumaxb. */
break;
case 1081: /* stumaxh */
case 1021: /* ldumaxh */
value = 1021; /* --> ldumaxh. */
break;
case 1082: /* stumax */
case 1022: /* ldumax */
value = 1022; /* --> ldumax. */
break;
case 1083: /* stumaxlb */
case 1024: /* ldumaxlb */
value = 1024; /* --> ldumaxlb. */
break;
case 1084: /* stumaxlh */
case 1027: /* ldumaxlh */
value = 1027; /* --> ldumaxlh. */
break;
case 1085: /* stumaxl */
case 1030: /* ldumaxl */
value = 1030; /* --> ldumaxl. */
break;
case 1086: /* stuminb */
case 1032: /* lduminb */
value = 1032; /* --> lduminb. */
break;
case 1087: /* stuminh */
case 1033: /* lduminh */
value = 1033; /* --> lduminh. */
break;
case 1088: /* stumin */
case 1034: /* ldumin */
value = 1034; /* --> ldumin. */
break;
case 1089: /* stuminlb */
case 1036: /* lduminlb */
value = 1036; /* --> lduminlb. */
break;
case 1090: /* stuminlh */
case 1039: /* lduminlh */
value = 1039; /* --> lduminlh. */
break;
case 1091: /* stuminl */
case 1042: /* lduminl */
value = 1042; /* --> lduminl. */
break;
case 1093: /* mov */
case 1092: /* movn */
value = 1092; /* --> movn. */
break;
case 1095: /* mov */
case 1094: /* movz */
value = 1094; /* --> movz. */
break;
case 1108: /* psb */
case 1107: /* esb */
case 1106: /* sevl */
case 1105: /* sev */
case 1104: /* wfi */
case 1103: /* wfe */
case 1102: /* yield */
case 1101: /* nop */
case 1100: /* hint */
value = 1100; /* --> hint. */
break;
case 1117: /* tlbi */
case 1116: /* ic */
case 1115: /* dc */
case 1114: /* at */
case 1113: /* sys */
value = 1113; /* --> 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);
[AArch64][Patch 5/5] Add instruction PSB CSYNC The Statistical Profile Extension adds the instruction PSB CSYNC as an alias for the HINT #17 instruction. This patch adds the instruction to binutils as a HINT alias that takes an operand. A new operand type, AARCH64_OPND_BARRIER_PSB, is added to represent the operand to PSB. A parser for the operand type is added to the assembler and a printer to the disassembler. The operand name "csync" is added to the list of HINT options with HINT number #17. Encoding and decoding of the operand is handled by the ins_hint/ext_hint functions added in the preceding patches. gas/ 2015-12-11 Matthew Wahab <matthew.wahab@arm.com> * config/tc-aarch64.c (aarch64_hint_opt_hsh): New. (parse_barrier_psb): New. (parse_operands): Add case for AARCH64_OPND_BARRIER_PSB. (md_begin): Set up aarch64_hint_opt_hsh. gas/testsuite/ 2015-12-11 Matthew Wahab <matthew.wahab@arm.com> * gas/aarch64/system-2.d: Enable the statistical profiling extension. Update the expected output. * gas/aarch64/system-2.s: Add tests for PSB CSYNC. * gas/aarch64/system.d: Update the expected output. include/opcode/ 2015-12-11 Matthew Wahab <matthew.wahab@arm.com> * aarch64.h (aarch64_opnd): Add AARCH64_OPND_BARRIER_PSB. * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Regenerate. * aarch64-opc-2.c: Regenerate. * aarch64-opc.c (aarch64_hint_options): Add "csync". (aarch64_print_operands): Handle AARCH64_OPND_BARRIER_PSB. * aarch64-tbl.h (aarch64_feature_stat_profile): New. (STAT_PROFILE): New. (aarch64_opcode_table): Add "psb". (AARCH64_OPERANDS): Add "BARRIER_PSB". Change-Id: I5ffb672d26a8b15b48785478d359350a9b70ca09
2015-12-11 18:22:40 +08:00
case 88:
return aarch64_ins_hint (self, info, code, inst);
default: assert (0); abort ();
}
}