binutils-gdb/opcodes/aarch64-asm-2.c
Sudakshina Das b731bc3b1b [BINUTILS, AARCH64, 3/8] Add Pointer Arithmetic instructions in Memory Tagging Extension
This patch is part of the patch series to add support for ARMv8.5-A
Memory Tagging Extensions which is an optional extension to
ARMv8.5-A and is enabled using the +memtag command line option.

This patch add support to the Pointer Arithmetic instructions from
MTE. These are the following instructions added in this patch:
- SUBP <Xd>, <Xn|SP>, <Xm|SP>
- SUBPS <Xd>, <Xn|SP>, <Xm|SP>
- CMPP <Xn|SP>, <Xm|SP>
where CMPP is an alias to SUBPS XZR, <Xn|SP>, <Xm|SP>

where
<Xd> : Is the 64-bit destination GPR.
<Xn|SP> : Is the 64-bit first source GPR or Stack pointer.
<Xm|SP> : Is the 64-bit second source GPR or Stack pointer.

*** opcodes/ChangeLog ***

2018-11-12  Sudakshina Das  <sudi.das@arm.com>

	* aarch64-tbl.h (aarch64_opcode_table): Add subp, subps and cmpp.
	* aarch64-asm-2.c: Regenerated.
	* aarch64-dis-2.c: Regenerated.
	* aarch64-opc-2.c: Regenerated.

*** gas/ChangeLog ***

2018-11-12  Sudakshina Das  <sudi.das@arm.com>

	* testsuite/gas/aarch64/armv8_5-a-memtag.s: Add tests for subp,
	subps and cmpp.
	* testsuite/gas/aarch64/armv8_5-a-memtag.d: Likewise.
	* testsuite/gas/aarch64/illegal-memtag.s: Likewise.
	* testsuite/gas/aarch64/illegal-memtag.l: Likewise.
2018-11-12 12:59:42 +00:00

855 lines
22 KiB
C

/* This file is automatically generated by aarch64-gen. Do not edit! */
/* Copyright (C) 2012-2018 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 23: /* cmn */
case 22: /* adds */
value = 22; /* --> adds. */
break;
case 25: /* neg */
case 24: /* sub */
value = 24; /* --> sub. */
break;
case 27: /* cmp */
case 28: /* negs */
case 26: /* subs */
value = 26; /* --> subs. */
break;
case 153: /* mov */
case 152: /* umov */
value = 152; /* --> umov. */
break;
case 155: /* mov */
case 154: /* ins */
value = 154; /* --> ins. */
break;
case 157: /* mov */
case 156: /* ins */
value = 156; /* --> ins. */
break;
case 243: /* mvn */
case 242: /* not */
value = 242; /* --> not. */
break;
case 318: /* mov */
case 317: /* orr */
value = 317; /* --> orr. */
break;
case 389: /* sxtl */
case 388: /* sshll */
value = 388; /* --> sshll. */
break;
case 391: /* sxtl2 */
case 390: /* sshll2 */
value = 390; /* --> sshll2. */
break;
case 413: /* uxtl */
case 412: /* ushll */
value = 412; /* --> ushll. */
break;
case 415: /* uxtl2 */
case 414: /* ushll2 */
value = 414; /* --> ushll2. */
break;
case 536: /* mov */
case 535: /* dup */
value = 535; /* --> dup. */
break;
case 623: /* sxtw */
case 622: /* sxth */
case 621: /* sxtb */
case 624: /* asr */
case 620: /* sbfx */
case 619: /* sbfiz */
case 618: /* sbfm */
value = 618; /* --> sbfm. */
break;
case 627: /* bfc */
case 628: /* bfxil */
case 626: /* bfi */
case 625: /* bfm */
value = 625; /* --> bfm. */
break;
case 633: /* uxth */
case 632: /* uxtb */
case 635: /* lsr */
case 634: /* lsl */
case 631: /* ubfx */
case 630: /* ubfiz */
case 629: /* ubfm */
value = 629; /* --> ubfm. */
break;
case 665: /* cset */
case 664: /* cinc */
case 663: /* csinc */
value = 663; /* --> csinc. */
break;
case 668: /* csetm */
case 667: /* cinv */
case 666: /* csinv */
value = 666; /* --> csinv. */
break;
case 670: /* cneg */
case 669: /* csneg */
value = 669; /* --> csneg. */
break;
case 688: /* rev */
case 689: /* rev64 */
value = 688; /* --> rev. */
break;
case 714: /* lsl */
case 713: /* lslv */
value = 713; /* --> lslv. */
break;
case 716: /* lsr */
case 715: /* lsrv */
value = 715; /* --> lsrv. */
break;
case 718: /* asr */
case 717: /* asrv */
value = 717; /* --> asrv. */
break;
case 720: /* ror */
case 719: /* rorv */
value = 719; /* --> rorv. */
break;
case 723: /* cmpp */
case 722: /* subps */
value = 722; /* --> subps. */
break;
case 736: /* mul */
case 735: /* madd */
value = 735; /* --> madd. */
break;
case 738: /* mneg */
case 737: /* msub */
value = 737; /* --> msub. */
break;
case 740: /* smull */
case 739: /* smaddl */
value = 739; /* --> smaddl. */
break;
case 742: /* smnegl */
case 741: /* smsubl */
value = 741; /* --> smsubl. */
break;
case 745: /* umull */
case 744: /* umaddl */
value = 744; /* --> umaddl. */
break;
case 747: /* umnegl */
case 746: /* umsubl */
value = 746; /* --> umsubl. */
break;
case 758: /* ror */
case 757: /* extr */
value = 757; /* --> extr. */
break;
case 977: /* bic */
case 976: /* and */
value = 976; /* --> and. */
break;
case 979: /* mov */
case 978: /* orr */
value = 978; /* --> orr. */
break;
case 982: /* tst */
case 981: /* ands */
value = 981; /* --> ands. */
break;
case 987: /* uxtw */
case 986: /* mov */
case 985: /* orr */
value = 985; /* --> orr. */
break;
case 989: /* mvn */
case 988: /* orn */
value = 988; /* --> orn. */
break;
case 993: /* tst */
case 992: /* ands */
value = 992; /* --> ands. */
break;
case 1119: /* staddb */
case 1023: /* ldaddb */
value = 1023; /* --> ldaddb. */
break;
case 1120: /* staddh */
case 1024: /* ldaddh */
value = 1024; /* --> ldaddh. */
break;
case 1121: /* stadd */
case 1025: /* ldadd */
value = 1025; /* --> ldadd. */
break;
case 1122: /* staddlb */
case 1027: /* ldaddlb */
value = 1027; /* --> ldaddlb. */
break;
case 1123: /* staddlh */
case 1030: /* ldaddlh */
value = 1030; /* --> ldaddlh. */
break;
case 1124: /* staddl */
case 1033: /* ldaddl */
value = 1033; /* --> ldaddl. */
break;
case 1125: /* stclrb */
case 1035: /* ldclrb */
value = 1035; /* --> ldclrb. */
break;
case 1126: /* stclrh */
case 1036: /* ldclrh */
value = 1036; /* --> ldclrh. */
break;
case 1127: /* stclr */
case 1037: /* ldclr */
value = 1037; /* --> ldclr. */
break;
case 1128: /* stclrlb */
case 1039: /* ldclrlb */
value = 1039; /* --> ldclrlb. */
break;
case 1129: /* stclrlh */
case 1042: /* ldclrlh */
value = 1042; /* --> ldclrlh. */
break;
case 1130: /* stclrl */
case 1045: /* ldclrl */
value = 1045; /* --> ldclrl. */
break;
case 1131: /* steorb */
case 1047: /* ldeorb */
value = 1047; /* --> ldeorb. */
break;
case 1132: /* steorh */
case 1048: /* ldeorh */
value = 1048; /* --> ldeorh. */
break;
case 1133: /* steor */
case 1049: /* ldeor */
value = 1049; /* --> ldeor. */
break;
case 1134: /* steorlb */
case 1051: /* ldeorlb */
value = 1051; /* --> ldeorlb. */
break;
case 1135: /* steorlh */
case 1054: /* ldeorlh */
value = 1054; /* --> ldeorlh. */
break;
case 1136: /* steorl */
case 1057: /* ldeorl */
value = 1057; /* --> ldeorl. */
break;
case 1137: /* stsetb */
case 1059: /* ldsetb */
value = 1059; /* --> ldsetb. */
break;
case 1138: /* stseth */
case 1060: /* ldseth */
value = 1060; /* --> ldseth. */
break;
case 1139: /* stset */
case 1061: /* ldset */
value = 1061; /* --> ldset. */
break;
case 1140: /* stsetlb */
case 1063: /* ldsetlb */
value = 1063; /* --> ldsetlb. */
break;
case 1141: /* stsetlh */
case 1066: /* ldsetlh */
value = 1066; /* --> ldsetlh. */
break;
case 1142: /* stsetl */
case 1069: /* ldsetl */
value = 1069; /* --> ldsetl. */
break;
case 1143: /* stsmaxb */
case 1071: /* ldsmaxb */
value = 1071; /* --> ldsmaxb. */
break;
case 1144: /* stsmaxh */
case 1072: /* ldsmaxh */
value = 1072; /* --> ldsmaxh. */
break;
case 1145: /* stsmax */
case 1073: /* ldsmax */
value = 1073; /* --> ldsmax. */
break;
case 1146: /* stsmaxlb */
case 1075: /* ldsmaxlb */
value = 1075; /* --> ldsmaxlb. */
break;
case 1147: /* stsmaxlh */
case 1078: /* ldsmaxlh */
value = 1078; /* --> ldsmaxlh. */
break;
case 1148: /* stsmaxl */
case 1081: /* ldsmaxl */
value = 1081; /* --> ldsmaxl. */
break;
case 1149: /* stsminb */
case 1083: /* ldsminb */
value = 1083; /* --> ldsminb. */
break;
case 1150: /* stsminh */
case 1084: /* ldsminh */
value = 1084; /* --> ldsminh. */
break;
case 1151: /* stsmin */
case 1085: /* ldsmin */
value = 1085; /* --> ldsmin. */
break;
case 1152: /* stsminlb */
case 1087: /* ldsminlb */
value = 1087; /* --> ldsminlb. */
break;
case 1153: /* stsminlh */
case 1090: /* ldsminlh */
value = 1090; /* --> ldsminlh. */
break;
case 1154: /* stsminl */
case 1093: /* ldsminl */
value = 1093; /* --> ldsminl. */
break;
case 1155: /* stumaxb */
case 1095: /* ldumaxb */
value = 1095; /* --> ldumaxb. */
break;
case 1156: /* stumaxh */
case 1096: /* ldumaxh */
value = 1096; /* --> ldumaxh. */
break;
case 1157: /* stumax */
case 1097: /* ldumax */
value = 1097; /* --> ldumax. */
break;
case 1158: /* stumaxlb */
case 1099: /* ldumaxlb */
value = 1099; /* --> ldumaxlb. */
break;
case 1159: /* stumaxlh */
case 1102: /* ldumaxlh */
value = 1102; /* --> ldumaxlh. */
break;
case 1160: /* stumaxl */
case 1105: /* ldumaxl */
value = 1105; /* --> ldumaxl. */
break;
case 1161: /* stuminb */
case 1107: /* lduminb */
value = 1107; /* --> lduminb. */
break;
case 1162: /* stuminh */
case 1108: /* lduminh */
value = 1108; /* --> lduminh. */
break;
case 1163: /* stumin */
case 1109: /* ldumin */
value = 1109; /* --> ldumin. */
break;
case 1164: /* stuminlb */
case 1111: /* lduminlb */
value = 1111; /* --> lduminlb. */
break;
case 1165: /* stuminlh */
case 1114: /* lduminlh */
value = 1114; /* --> lduminlh. */
break;
case 1166: /* stuminl */
case 1117: /* lduminl */
value = 1117; /* --> lduminl. */
break;
case 1168: /* mov */
case 1167: /* movn */
value = 1167; /* --> movn. */
break;
case 1170: /* mov */
case 1169: /* movz */
value = 1169; /* --> movz. */
break;
case 1216: /* autibsp */
case 1215: /* autibz */
case 1214: /* autiasp */
case 1213: /* autiaz */
case 1212: /* pacibsp */
case 1211: /* pacibz */
case 1210: /* paciasp */
case 1209: /* paciaz */
case 1190: /* psb */
case 1189: /* esb */
case 1188: /* autib1716 */
case 1187: /* autia1716 */
case 1186: /* pacib1716 */
case 1185: /* pacia1716 */
case 1184: /* xpaclri */
case 1183: /* sevl */
case 1182: /* sev */
case 1181: /* wfi */
case 1180: /* wfe */
case 1179: /* yield */
case 1178: /* bti */
case 1177: /* csdb */
case 1176: /* nop */
case 1175: /* hint */
value = 1175; /* --> hint. */
break;
case 1194: /* pssbb */
case 1193: /* ssbb */
case 1192: /* dsb */
value = 1192; /* --> dsb. */
break;
case 1205: /* cpp */
case 1204: /* dvp */
case 1203: /* cfp */
case 1202: /* tlbi */
case 1201: /* ic */
case 1200: /* dc */
case 1199: /* at */
case 1198: /* sys */
value = 1198; /* --> sys. */
break;
case 2014: /* bic */
case 1264: /* and */
value = 1264; /* --> and. */
break;
case 1247: /* mov */
case 1266: /* and */
value = 1266; /* --> and. */
break;
case 1251: /* movs */
case 1267: /* ands */
value = 1267; /* --> ands. */
break;
case 2015: /* cmple */
case 1302: /* cmpge */
value = 1302; /* --> cmpge. */
break;
case 2018: /* cmplt */
case 1305: /* cmpgt */
value = 1305; /* --> cmpgt. */
break;
case 2016: /* cmplo */
case 1307: /* cmphi */
value = 1307; /* --> cmphi. */
break;
case 2017: /* cmpls */
case 1310: /* cmphs */
value = 1310; /* --> cmphs. */
break;
case 1244: /* mov */
case 1332: /* cpy */
value = 1332; /* --> cpy. */
break;
case 1246: /* mov */
case 1333: /* cpy */
value = 1333; /* --> cpy. */
break;
case 2025: /* fmov */
case 1249: /* mov */
case 1334: /* cpy */
value = 1334; /* --> cpy. */
break;
case 1239: /* mov */
case 1346: /* dup */
value = 1346; /* --> dup. */
break;
case 1241: /* mov */
case 1238: /* mov */
case 1347: /* dup */
value = 1347; /* --> dup. */
break;
case 2024: /* fmov */
case 1243: /* mov */
case 1348: /* dup */
value = 1348; /* --> dup. */
break;
case 1242: /* mov */
case 1349: /* dupm */
value = 1349; /* --> dupm. */
break;
case 2019: /* eon */
case 1351: /* eor */
value = 1351; /* --> eor. */
break;
case 1252: /* not */
case 1353: /* eor */
value = 1353; /* --> eor. */
break;
case 1253: /* nots */
case 1354: /* eors */
value = 1354; /* --> eors. */
break;
case 2020: /* facle */
case 1359: /* facge */
value = 1359; /* --> facge. */
break;
case 2021: /* faclt */
case 1360: /* facgt */
value = 1360; /* --> facgt. */
break;
case 2022: /* fcmle */
case 1373: /* fcmge */
value = 1373; /* --> fcmge. */
break;
case 2023: /* fcmlt */
case 1375: /* fcmgt */
value = 1375; /* --> fcmgt. */
break;
case 1236: /* fmov */
case 1381: /* fcpy */
value = 1381; /* --> fcpy. */
break;
case 1235: /* fmov */
case 1404: /* fdup */
value = 1404; /* --> fdup. */
break;
case 1237: /* mov */
case 1735: /* orr */
value = 1735; /* --> orr. */
break;
case 2026: /* orn */
case 1736: /* orr */
value = 1736; /* --> orr. */
break;
case 1240: /* mov */
case 1738: /* orr */
value = 1738; /* --> orr. */
break;
case 1250: /* movs */
case 1739: /* orrs */
value = 1739; /* --> orrs. */
break;
case 1245: /* mov */
case 1801: /* sel */
value = 1801; /* --> sel. */
break;
case 1248: /* mov */
case 1802: /* sel */
value = 1802; /* --> sel. */
break;
default: return NULL;
}
return aarch64_opcode_table + value;
}
bfd_boolean
aarch64_insert_operand (const aarch64_operand *self,
const aarch64_opnd_info *info,
aarch64_insn *code, const aarch64_inst *inst,
aarch64_operand_error *errors)
{
/* 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 29:
case 157:
case 158:
case 159:
case 160:
case 161:
case 162:
case 163:
case 164:
case 165:
case 166:
case 179:
case 180:
case 181:
case 182:
case 183:
case 184:
case 185:
case 186:
case 187:
case 191:
case 194:
return aarch64_ins_regno (self, info, code, inst, errors);
case 13:
return aarch64_ins_reg_extended (self, info, code, inst, errors);
case 14:
return aarch64_ins_reg_shifted (self, info, code, inst, errors);
case 19:
return aarch64_ins_ft (self, info, code, inst, errors);
case 30:
case 31:
case 32:
case 33:
case 196:
return aarch64_ins_reglane (self, info, code, inst, errors);
case 34:
return aarch64_ins_reglist (self, info, code, inst, errors);
case 35:
return aarch64_ins_ldst_reglist (self, info, code, inst, errors);
case 36:
return aarch64_ins_ldst_reglist_r (self, info, code, inst, errors);
case 37:
return aarch64_ins_ldst_elemlist (self, info, code, inst, errors);
case 38:
case 39:
case 40:
case 41:
case 51:
case 52:
case 53:
case 54:
case 55:
case 56:
case 57:
case 58:
case 59:
case 60:
case 61:
case 62:
case 63:
case 64:
case 65:
case 66:
case 78:
case 79:
case 80:
case 81:
case 154:
case 156:
case 171:
case 172:
case 173:
case 174:
case 175:
case 176:
case 177:
case 178:
return aarch64_ins_imm (self, info, code, inst, errors);
case 42:
case 43:
return aarch64_ins_advsimd_imm_shift (self, info, code, inst, errors);
case 44:
case 45:
case 46:
return aarch64_ins_advsimd_imm_modified (self, info, code, inst, errors);
case 50:
case 145:
return aarch64_ins_fpimm (self, info, code, inst, errors);
case 67:
case 152:
return aarch64_ins_limm (self, info, code, inst, errors);
case 68:
return aarch64_ins_aimm (self, info, code, inst, errors);
case 69:
return aarch64_ins_imm_half (self, info, code, inst, errors);
case 70:
return aarch64_ins_fbits (self, info, code, inst, errors);
case 72:
case 73:
case 150:
return aarch64_ins_imm_rotate2 (self, info, code, inst, errors);
case 74:
case 149:
return aarch64_ins_imm_rotate1 (self, info, code, inst, errors);
case 75:
case 76:
return aarch64_ins_cond (self, info, code, inst, errors);
case 82:
case 89:
return aarch64_ins_addr_simple (self, info, code, inst, errors);
case 83:
return aarch64_ins_addr_regoff (self, info, code, inst, errors);
case 84:
case 85:
case 86:
return aarch64_ins_addr_simm (self, info, code, inst, errors);
case 87:
return aarch64_ins_addr_simm10 (self, info, code, inst, errors);
case 88:
return aarch64_ins_addr_uimm12 (self, info, code, inst, errors);
case 90:
return aarch64_ins_addr_offset (self, info, code, inst, errors);
case 91:
return aarch64_ins_simd_addr_post (self, info, code, inst, errors);
case 92:
return aarch64_ins_sysreg (self, info, code, inst, errors);
case 93:
return aarch64_ins_pstatefield (self, info, code, inst, errors);
case 94:
case 95:
case 96:
case 97:
case 98:
return aarch64_ins_sysins_op (self, info, code, inst, errors);
case 99:
case 100:
return aarch64_ins_barrier (self, info, code, inst, errors);
case 101:
return aarch64_ins_prfop (self, info, code, inst, errors);
case 102:
case 103:
return aarch64_ins_hint (self, info, code, inst, errors);
case 104:
return aarch64_ins_sve_addr_ri_s4 (self, info, code, inst, errors);
case 105:
case 106:
case 107:
case 108:
return aarch64_ins_sve_addr_ri_s4xvl (self, info, code, inst, errors);
case 109:
return aarch64_ins_sve_addr_ri_s6xvl (self, info, code, inst, errors);
case 110:
return aarch64_ins_sve_addr_ri_s9xvl (self, info, code, inst, errors);
case 111:
case 112:
case 113:
case 114:
return aarch64_ins_sve_addr_ri_u6 (self, info, code, inst, errors);
case 115:
case 116:
case 117:
case 118:
case 119:
case 120:
case 121:
case 122:
case 123:
case 124:
case 125:
case 126:
case 127:
return aarch64_ins_sve_addr_rr_lsl (self, info, code, inst, errors);
case 128:
case 129:
case 130:
case 131:
case 132:
case 133:
case 134:
case 135:
return aarch64_ins_sve_addr_rz_xtw (self, info, code, inst, errors);
case 136:
case 137:
case 138:
case 139:
return aarch64_ins_sve_addr_zi_u5 (self, info, code, inst, errors);
case 140:
return aarch64_ins_sve_addr_zz_lsl (self, info, code, inst, errors);
case 141:
return aarch64_ins_sve_addr_zz_sxtw (self, info, code, inst, errors);
case 142:
return aarch64_ins_sve_addr_zz_uxtw (self, info, code, inst, errors);
case 143:
return aarch64_ins_sve_aimm (self, info, code, inst, errors);
case 144:
return aarch64_ins_sve_asimm (self, info, code, inst, errors);
case 146:
return aarch64_ins_sve_float_half_one (self, info, code, inst, errors);
case 147:
return aarch64_ins_sve_float_half_two (self, info, code, inst, errors);
case 148:
return aarch64_ins_sve_float_zero_one (self, info, code, inst, errors);
case 151:
return aarch64_ins_inv_limm (self, info, code, inst, errors);
case 153:
return aarch64_ins_sve_limm_mov (self, info, code, inst, errors);
case 155:
return aarch64_ins_sve_scale (self, info, code, inst, errors);
case 167:
case 168:
return aarch64_ins_sve_shlimm (self, info, code, inst, errors);
case 169:
case 170:
return aarch64_ins_sve_shrimm (self, info, code, inst, errors);
case 188:
case 189:
case 190:
return aarch64_ins_sve_quad_index (self, info, code, inst, errors);
case 192:
return aarch64_ins_sve_index (self, info, code, inst, errors);
case 193:
case 195:
return aarch64_ins_sve_reglist (self, info, code, inst, errors);
default: assert (0); abort ();
}
}