binutils-gdb/opcodes/aarch64-asm-2.c
Szabolcs Nagy 74f5402d08 [AArch64] Add ARMv8.3 combined pointer authentication branch instructions
Add support for ARMv8.3 pointer authentication instructions
that are encoded as unconditional branch instructions.

opcodes/
2016-11-11  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* aarch64-tbl.h (arch64_opcode_table): Add braa, brab, blraa, blrab, braaz,
	brabz, blraaz, blrabz, retaa, retab, eretaa, eretab.
	* aarch64-asm-2.c: Regenerate.
	* aarch64-dis-2.c: Regenerate.
	* aarch64-opc-2.c: Regenerate.

gas/
2016-11-08  Szabolcs Nagy  <szabolcs.nagy@arm.com>

	* testsuite/gas/aarch64/pac.s: Add ARMv8.3 branch instruction tests.
	* testsuite/gas/aarch64/pac.d: Likewise.
2016-11-11 10:43:15 +00:00

813 lines
20 KiB
C

/* This file is automatically generated by aarch64-gen. Do not edit! */
/* Copyright (C) 2012-2016 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 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 404: /* uxtl */
case 403: /* ushll */
value = 403; /* --> ushll. */
break;
case 406: /* uxtl2 */
case 405: /* ushll2 */
value = 405; /* --> ushll2. */
break;
case 527: /* mov */
case 526: /* dup */
value = 526; /* --> dup. */
break;
case 614: /* sxtw */
case 613: /* sxth */
case 612: /* sxtb */
case 615: /* asr */
case 611: /* sbfx */
case 610: /* sbfiz */
case 609: /* sbfm */
value = 609; /* --> sbfm. */
break;
case 618: /* bfc */
case 619: /* bfxil */
case 617: /* bfi */
case 616: /* bfm */
value = 616; /* --> bfm. */
break;
case 624: /* uxth */
case 623: /* uxtb */
case 626: /* lsr */
case 625: /* lsl */
case 622: /* ubfx */
case 621: /* ubfiz */
case 620: /* ubfm */
value = 620; /* --> ubfm. */
break;
case 656: /* cset */
case 655: /* cinc */
case 654: /* csinc */
value = 654; /* --> csinc. */
break;
case 659: /* csetm */
case 658: /* cinv */
case 657: /* csinv */
value = 657; /* --> csinv. */
break;
case 661: /* cneg */
case 660: /* csneg */
value = 660; /* --> csneg. */
break;
case 679: /* rev */
case 680: /* rev64 */
value = 679; /* --> rev. */
break;
case 705: /* lsl */
case 704: /* lslv */
value = 704; /* --> lslv. */
break;
case 707: /* lsr */
case 706: /* lsrv */
value = 706; /* --> lsrv. */
break;
case 709: /* asr */
case 708: /* asrv */
value = 708; /* --> asrv. */
break;
case 711: /* ror */
case 710: /* rorv */
value = 710; /* --> rorv. */
break;
case 722: /* mul */
case 721: /* madd */
value = 721; /* --> madd. */
break;
case 724: /* mneg */
case 723: /* msub */
value = 723; /* --> msub. */
break;
case 726: /* smull */
case 725: /* smaddl */
value = 725; /* --> smaddl. */
break;
case 728: /* smnegl */
case 727: /* smsubl */
value = 727; /* --> smsubl. */
break;
case 731: /* umull */
case 730: /* umaddl */
value = 730; /* --> umaddl. */
break;
case 733: /* umnegl */
case 732: /* umsubl */
value = 732; /* --> umsubl. */
break;
case 744: /* ror */
case 743: /* extr */
value = 743; /* --> extr. */
break;
case 951: /* bic */
case 950: /* and */
value = 950; /* --> and. */
break;
case 953: /* mov */
case 952: /* orr */
value = 952; /* --> orr. */
break;
case 956: /* tst */
case 955: /* ands */
value = 955; /* --> ands. */
break;
case 961: /* uxtw */
case 960: /* mov */
case 959: /* orr */
value = 959; /* --> orr. */
break;
case 963: /* mvn */
case 962: /* orn */
value = 962; /* --> orn. */
break;
case 967: /* tst */
case 966: /* ands */
value = 966; /* --> ands. */
break;
case 1093: /* staddb */
case 997: /* ldaddb */
value = 997; /* --> ldaddb. */
break;
case 1094: /* staddh */
case 998: /* ldaddh */
value = 998; /* --> ldaddh. */
break;
case 1095: /* stadd */
case 999: /* ldadd */
value = 999; /* --> ldadd. */
break;
case 1096: /* staddlb */
case 1001: /* ldaddlb */
value = 1001; /* --> ldaddlb. */
break;
case 1097: /* staddlh */
case 1004: /* ldaddlh */
value = 1004; /* --> ldaddlh. */
break;
case 1098: /* staddl */
case 1007: /* ldaddl */
value = 1007; /* --> ldaddl. */
break;
case 1099: /* stclrb */
case 1009: /* ldclrb */
value = 1009; /* --> ldclrb. */
break;
case 1100: /* stclrh */
case 1010: /* ldclrh */
value = 1010; /* --> ldclrh. */
break;
case 1101: /* stclr */
case 1011: /* ldclr */
value = 1011; /* --> ldclr. */
break;
case 1102: /* stclrlb */
case 1013: /* ldclrlb */
value = 1013; /* --> ldclrlb. */
break;
case 1103: /* stclrlh */
case 1016: /* ldclrlh */
value = 1016; /* --> ldclrlh. */
break;
case 1104: /* stclrl */
case 1019: /* ldclrl */
value = 1019; /* --> ldclrl. */
break;
case 1105: /* steorb */
case 1021: /* ldeorb */
value = 1021; /* --> ldeorb. */
break;
case 1106: /* steorh */
case 1022: /* ldeorh */
value = 1022; /* --> ldeorh. */
break;
case 1107: /* steor */
case 1023: /* ldeor */
value = 1023; /* --> ldeor. */
break;
case 1108: /* steorlb */
case 1025: /* ldeorlb */
value = 1025; /* --> ldeorlb. */
break;
case 1109: /* steorlh */
case 1028: /* ldeorlh */
value = 1028; /* --> ldeorlh. */
break;
case 1110: /* steorl */
case 1031: /* ldeorl */
value = 1031; /* --> ldeorl. */
break;
case 1111: /* stsetb */
case 1033: /* ldsetb */
value = 1033; /* --> ldsetb. */
break;
case 1112: /* stseth */
case 1034: /* ldseth */
value = 1034; /* --> ldseth. */
break;
case 1113: /* stset */
case 1035: /* ldset */
value = 1035; /* --> ldset. */
break;
case 1114: /* stsetlb */
case 1037: /* ldsetlb */
value = 1037; /* --> ldsetlb. */
break;
case 1115: /* stsetlh */
case 1040: /* ldsetlh */
value = 1040; /* --> ldsetlh. */
break;
case 1116: /* stsetl */
case 1043: /* ldsetl */
value = 1043; /* --> ldsetl. */
break;
case 1117: /* stsmaxb */
case 1045: /* ldsmaxb */
value = 1045; /* --> ldsmaxb. */
break;
case 1118: /* stsmaxh */
case 1046: /* ldsmaxh */
value = 1046; /* --> ldsmaxh. */
break;
case 1119: /* stsmax */
case 1047: /* ldsmax */
value = 1047; /* --> ldsmax. */
break;
case 1120: /* stsmaxlb */
case 1049: /* ldsmaxlb */
value = 1049; /* --> ldsmaxlb. */
break;
case 1121: /* stsmaxlh */
case 1052: /* ldsmaxlh */
value = 1052; /* --> ldsmaxlh. */
break;
case 1122: /* stsmaxl */
case 1055: /* ldsmaxl */
value = 1055; /* --> ldsmaxl. */
break;
case 1123: /* stsminb */
case 1057: /* ldsminb */
value = 1057; /* --> ldsminb. */
break;
case 1124: /* stsminh */
case 1058: /* ldsminh */
value = 1058; /* --> ldsminh. */
break;
case 1125: /* stsmin */
case 1059: /* ldsmin */
value = 1059; /* --> ldsmin. */
break;
case 1126: /* stsminlb */
case 1061: /* ldsminlb */
value = 1061; /* --> ldsminlb. */
break;
case 1127: /* stsminlh */
case 1064: /* ldsminlh */
value = 1064; /* --> ldsminlh. */
break;
case 1128: /* stsminl */
case 1067: /* ldsminl */
value = 1067; /* --> ldsminl. */
break;
case 1129: /* stumaxb */
case 1069: /* ldumaxb */
value = 1069; /* --> ldumaxb. */
break;
case 1130: /* stumaxh */
case 1070: /* ldumaxh */
value = 1070; /* --> ldumaxh. */
break;
case 1131: /* stumax */
case 1071: /* ldumax */
value = 1071; /* --> ldumax. */
break;
case 1132: /* stumaxlb */
case 1073: /* ldumaxlb */
value = 1073; /* --> ldumaxlb. */
break;
case 1133: /* stumaxlh */
case 1076: /* ldumaxlh */
value = 1076; /* --> ldumaxlh. */
break;
case 1134: /* stumaxl */
case 1079: /* ldumaxl */
value = 1079; /* --> ldumaxl. */
break;
case 1135: /* stuminb */
case 1081: /* lduminb */
value = 1081; /* --> lduminb. */
break;
case 1136: /* stuminh */
case 1082: /* lduminh */
value = 1082; /* --> lduminh. */
break;
case 1137: /* stumin */
case 1083: /* ldumin */
value = 1083; /* --> ldumin. */
break;
case 1138: /* stuminlb */
case 1085: /* lduminlb */
value = 1085; /* --> lduminlb. */
break;
case 1139: /* stuminlh */
case 1088: /* lduminlh */
value = 1088; /* --> lduminlh. */
break;
case 1140: /* stuminl */
case 1091: /* lduminl */
value = 1091; /* --> lduminl. */
break;
case 1142: /* mov */
case 1141: /* movn */
value = 1141; /* --> movn. */
break;
case 1144: /* mov */
case 1143: /* movz */
value = 1143; /* --> movz. */
break;
case 1182: /* autibsp */
case 1181: /* autibz */
case 1180: /* autiasp */
case 1179: /* autiaz */
case 1178: /* pacibsp */
case 1177: /* pacibz */
case 1176: /* paciasp */
case 1175: /* paciaz */
case 1162: /* psb */
case 1161: /* esb */
case 1160: /* autib1716 */
case 1159: /* autia1716 */
case 1158: /* pacib1716 */
case 1157: /* pacia1716 */
case 1156: /* xpaclri */
case 1155: /* sevl */
case 1154: /* sev */
case 1153: /* wfi */
case 1152: /* wfe */
case 1151: /* yield */
case 1150: /* nop */
case 1149: /* hint */
value = 1149; /* --> hint. */
break;
case 1171: /* tlbi */
case 1170: /* ic */
case 1169: /* dc */
case 1168: /* at */
case 1167: /* sys */
value = 1167; /* --> sys. */
break;
case 1925: /* bic */
case 1230: /* and */
value = 1230; /* --> and. */
break;
case 1213: /* mov */
case 1232: /* and */
value = 1232; /* --> and. */
break;
case 1217: /* movs */
case 1233: /* ands */
value = 1233; /* --> ands. */
break;
case 1926: /* cmple */
case 1268: /* cmpge */
value = 1268; /* --> cmpge. */
break;
case 1929: /* cmplt */
case 1271: /* cmpgt */
value = 1271; /* --> cmpgt. */
break;
case 1927: /* cmplo */
case 1273: /* cmphi */
value = 1273; /* --> cmphi. */
break;
case 1928: /* cmpls */
case 1276: /* cmphs */
value = 1276; /* --> cmphs. */
break;
case 1210: /* mov */
case 1298: /* cpy */
value = 1298; /* --> cpy. */
break;
case 1212: /* mov */
case 1299: /* cpy */
value = 1299; /* --> cpy. */
break;
case 1936: /* fmov */
case 1215: /* mov */
case 1300: /* cpy */
value = 1300; /* --> cpy. */
break;
case 1205: /* mov */
case 1312: /* dup */
value = 1312; /* --> dup. */
break;
case 1207: /* mov */
case 1204: /* mov */
case 1313: /* dup */
value = 1313; /* --> dup. */
break;
case 1935: /* fmov */
case 1209: /* mov */
case 1314: /* dup */
value = 1314; /* --> dup. */
break;
case 1208: /* mov */
case 1315: /* dupm */
value = 1315; /* --> dupm. */
break;
case 1930: /* eon */
case 1317: /* eor */
value = 1317; /* --> eor. */
break;
case 1218: /* not */
case 1319: /* eor */
value = 1319; /* --> eor. */
break;
case 1219: /* nots */
case 1320: /* eors */
value = 1320; /* --> eors. */
break;
case 1931: /* facle */
case 1325: /* facge */
value = 1325; /* --> facge. */
break;
case 1932: /* faclt */
case 1326: /* facgt */
value = 1326; /* --> facgt. */
break;
case 1933: /* fcmle */
case 1335: /* fcmge */
value = 1335; /* --> fcmge. */
break;
case 1934: /* fcmlt */
case 1337: /* fcmgt */
value = 1337; /* --> fcmgt. */
break;
case 1202: /* fmov */
case 1343: /* fcpy */
value = 1343; /* --> fcpy. */
break;
case 1201: /* fmov */
case 1360: /* fdup */
value = 1360; /* --> fdup. */
break;
case 1203: /* mov */
case 1658: /* orr */
value = 1658; /* --> orr. */
break;
case 1937: /* orn */
case 1659: /* orr */
value = 1659; /* --> orr. */
break;
case 1206: /* mov */
case 1661: /* orr */
value = 1661; /* --> orr. */
break;
case 1216: /* movs */
case 1662: /* orrs */
value = 1662; /* --> orrs. */
break;
case 1211: /* mov */
case 1718: /* sel */
value = 1718; /* --> sel. */
break;
case 1214: /* mov */
case 1719: /* sel */
value = 1719; /* --> sel. */
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 11:
case 15:
case 16:
case 17:
case 18:
case 20:
case 21:
case 22:
case 23:
case 24:
case 25:
case 26:
case 27:
case 28:
case 36:
case 37:
case 140:
case 141:
case 142:
case 143:
case 144:
case 145:
case 146:
case 147:
case 148:
case 149:
case 162:
case 163:
case 164:
case 165:
case 166:
case 167:
case 168:
case 169:
case 170:
case 171:
case 174:
return aarch64_ins_regno (self, info, code, inst);
case 13:
return aarch64_ins_reg_extended (self, info, code, inst);
case 14:
return aarch64_ins_reg_shifted (self, info, code, inst);
case 19:
return aarch64_ins_ft (self, info, code, inst);
case 29:
case 30:
case 31:
return aarch64_ins_reglane (self, info, code, inst);
case 32:
return aarch64_ins_reglist (self, info, code, inst);
case 33:
return aarch64_ins_ldst_reglist (self, info, code, inst);
case 34:
return aarch64_ins_ldst_reglist_r (self, info, code, inst);
case 35:
return aarch64_ins_ldst_elemlist (self, info, code, inst);
case 38:
case 48:
case 49:
case 50:
case 51:
case 52:
case 53:
case 54:
case 55:
case 56:
case 57:
case 58:
case 59:
case 60:
case 69:
case 70:
case 71:
case 72:
case 137:
case 139:
case 154:
case 155:
case 156:
case 157:
case 158:
case 159:
case 160:
case 161:
return aarch64_ins_imm (self, info, code, inst);
case 39:
case 40:
return aarch64_ins_advsimd_imm_shift (self, info, code, inst);
case 41:
case 42:
case 43:
return aarch64_ins_advsimd_imm_modified (self, info, code, inst);
case 47:
case 130:
return aarch64_ins_fpimm (self, info, code, inst);
case 61:
case 135:
return aarch64_ins_limm (self, info, code, inst);
case 62:
return aarch64_ins_aimm (self, info, code, inst);
case 63:
return aarch64_ins_imm_half (self, info, code, inst);
case 64:
return aarch64_ins_fbits (self, info, code, inst);
case 66:
case 67:
return aarch64_ins_cond (self, info, code, inst);
case 73:
case 79:
return aarch64_ins_addr_simple (self, info, code, inst);
case 74:
return aarch64_ins_addr_regoff (self, info, code, inst);
case 75:
case 76:
case 77:
return aarch64_ins_addr_simm (self, info, code, inst);
case 78:
return aarch64_ins_addr_uimm12 (self, info, code, inst);
case 80:
return aarch64_ins_simd_addr_post (self, info, code, inst);
case 81:
return aarch64_ins_sysreg (self, info, code, inst);
case 82:
return aarch64_ins_pstatefield (self, info, code, inst);
case 83:
case 84:
case 85:
case 86:
return aarch64_ins_sysins_op (self, info, code, inst);
case 87:
case 88:
return aarch64_ins_barrier (self, info, code, inst);
case 89:
return aarch64_ins_prfop (self, info, code, inst);
case 90:
return aarch64_ins_hint (self, info, code, inst);
case 91:
case 92:
case 93:
case 94:
return aarch64_ins_sve_addr_ri_s4xvl (self, info, code, inst);
case 95:
return aarch64_ins_sve_addr_ri_s6xvl (self, info, code, inst);
case 96:
return aarch64_ins_sve_addr_ri_s9xvl (self, info, code, inst);
case 97:
case 98:
case 99:
case 100:
return aarch64_ins_sve_addr_ri_u6 (self, info, code, inst);
case 101:
case 102:
case 103:
case 104:
case 105:
case 106:
case 107:
case 108:
case 109:
case 110:
case 111:
case 112:
return aarch64_ins_sve_addr_rr_lsl (self, info, code, inst);
case 113:
case 114:
case 115:
case 116:
case 117:
case 118:
case 119:
case 120:
return aarch64_ins_sve_addr_rz_xtw (self, info, code, inst);
case 121:
case 122:
case 123:
case 124:
return aarch64_ins_sve_addr_zi_u5 (self, info, code, inst);
case 125:
return aarch64_ins_sve_addr_zz_lsl (self, info, code, inst);
case 126:
return aarch64_ins_sve_addr_zz_sxtw (self, info, code, inst);
case 127:
return aarch64_ins_sve_addr_zz_uxtw (self, info, code, inst);
case 128:
return aarch64_ins_sve_aimm (self, info, code, inst);
case 129:
return aarch64_ins_sve_asimm (self, info, code, inst);
case 131:
return aarch64_ins_sve_float_half_one (self, info, code, inst);
case 132:
return aarch64_ins_sve_float_half_two (self, info, code, inst);
case 133:
return aarch64_ins_sve_float_zero_one (self, info, code, inst);
case 134:
return aarch64_ins_inv_limm (self, info, code, inst);
case 136:
return aarch64_ins_sve_limm_mov (self, info, code, inst);
case 138:
return aarch64_ins_sve_scale (self, info, code, inst);
case 150:
case 151:
return aarch64_ins_sve_shlimm (self, info, code, inst);
case 152:
case 153:
return aarch64_ins_sve_shrimm (self, info, code, inst);
case 172:
return aarch64_ins_sve_index (self, info, code, inst);
case 173:
case 175:
return aarch64_ins_sve_reglist (self, info, code, inst);
default: assert (0); abort ();
}
}