binutils-gdb/opcodes/aarch64-asm-2.c
Szabolcs Nagy 3f06e55061 [AArch64] Add ARMv8.3 combined pointer authentication load instructions
Add support for ARMv8.3 LDRAA and LDRAB combined pointer authentication and
load instructions.

These instructions authenticate the base register and load 8 byte from it plus
a scaled 10-bit offset with optional writeback to update the base register.

A new instruction class (ldst_imm10) and operand type (AARCH64_OPND_ADDR_SIMM10)
were introduced to handle the special addressing form.

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

	* opcode/aarch64.h (enum aarch64_opnd): Add AARCH64_OPND_ADDR_SIMM10.
	(enum aarch64_insn_class): Add ldst_imm10.

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

	* aarch64-tbl.h (QL_X1NIL): New.
	(arch64_opcode_table): Add ldraa, ldrab.
	(AARCH64_OPERANDS): Add "ADDR_SIMM10".
	* aarch64-asm.h (aarch64_ins_addr_simm10): Declare.
	* aarch64-asm.c (aarch64_ins_addr_simm10): Define.
	* aarch64-dis.h (aarch64_ext_addr_simm10): Declare.
	* aarch64-dis.c (aarch64_ext_addr_simm10): Define.
	* aarch64-opc.h (enum aarch64_field_kind): Add FLD_S_simm10.
	* aarch64-opc.c (fields): Add data for FLD_S_simm10.
	(operand_general_constraint_met_p): Handle AARCH64_OPND_ADDR_SIMM10.
	(aarch64_print_operand): Likewise.
	* aarch64-asm-2.c: Regenerate.
	* aarch64-dis-2.c: Regenerate.
	* aarch64-opc-2.c: Regenerate.

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

	* config/tc-aarch64.c (parse_operands): Handle AARCH64_OPND_ADDR_SIMM10.
	(fix_insn): Likewise.
	(warn_unpredictable_ldst): Handle ldst_imm10.
	* testsuite/gas/aarch64/pac.s: Add ldraa and ldrab tests.
	* testsuite/gas/aarch64/pac.d: Likewise.
	* testsuite/gas/aarch64/illegal-ldraa.s: New.
	* testsuite/gas/aarch64/illegal-ldraa.l: New.
	* testsuite/gas/aarch64/illegal-ldraa.d: New.
2016-11-18 09:49:06 +00:00

815 lines
21 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 953: /* bic */
case 952: /* and */
value = 952; /* --> and. */
break;
case 955: /* mov */
case 954: /* orr */
value = 954; /* --> orr. */
break;
case 958: /* tst */
case 957: /* ands */
value = 957; /* --> ands. */
break;
case 963: /* uxtw */
case 962: /* mov */
case 961: /* orr */
value = 961; /* --> orr. */
break;
case 965: /* mvn */
case 964: /* orn */
value = 964; /* --> orn. */
break;
case 969: /* tst */
case 968: /* ands */
value = 968; /* --> ands. */
break;
case 1095: /* staddb */
case 999: /* ldaddb */
value = 999; /* --> ldaddb. */
break;
case 1096: /* staddh */
case 1000: /* ldaddh */
value = 1000; /* --> ldaddh. */
break;
case 1097: /* stadd */
case 1001: /* ldadd */
value = 1001; /* --> ldadd. */
break;
case 1098: /* staddlb */
case 1003: /* ldaddlb */
value = 1003; /* --> ldaddlb. */
break;
case 1099: /* staddlh */
case 1006: /* ldaddlh */
value = 1006; /* --> ldaddlh. */
break;
case 1100: /* staddl */
case 1009: /* ldaddl */
value = 1009; /* --> ldaddl. */
break;
case 1101: /* stclrb */
case 1011: /* ldclrb */
value = 1011; /* --> ldclrb. */
break;
case 1102: /* stclrh */
case 1012: /* ldclrh */
value = 1012; /* --> ldclrh. */
break;
case 1103: /* stclr */
case 1013: /* ldclr */
value = 1013; /* --> ldclr. */
break;
case 1104: /* stclrlb */
case 1015: /* ldclrlb */
value = 1015; /* --> ldclrlb. */
break;
case 1105: /* stclrlh */
case 1018: /* ldclrlh */
value = 1018; /* --> ldclrlh. */
break;
case 1106: /* stclrl */
case 1021: /* ldclrl */
value = 1021; /* --> ldclrl. */
break;
case 1107: /* steorb */
case 1023: /* ldeorb */
value = 1023; /* --> ldeorb. */
break;
case 1108: /* steorh */
case 1024: /* ldeorh */
value = 1024; /* --> ldeorh. */
break;
case 1109: /* steor */
case 1025: /* ldeor */
value = 1025; /* --> ldeor. */
break;
case 1110: /* steorlb */
case 1027: /* ldeorlb */
value = 1027; /* --> ldeorlb. */
break;
case 1111: /* steorlh */
case 1030: /* ldeorlh */
value = 1030; /* --> ldeorlh. */
break;
case 1112: /* steorl */
case 1033: /* ldeorl */
value = 1033; /* --> ldeorl. */
break;
case 1113: /* stsetb */
case 1035: /* ldsetb */
value = 1035; /* --> ldsetb. */
break;
case 1114: /* stseth */
case 1036: /* ldseth */
value = 1036; /* --> ldseth. */
break;
case 1115: /* stset */
case 1037: /* ldset */
value = 1037; /* --> ldset. */
break;
case 1116: /* stsetlb */
case 1039: /* ldsetlb */
value = 1039; /* --> ldsetlb. */
break;
case 1117: /* stsetlh */
case 1042: /* ldsetlh */
value = 1042; /* --> ldsetlh. */
break;
case 1118: /* stsetl */
case 1045: /* ldsetl */
value = 1045; /* --> ldsetl. */
break;
case 1119: /* stsmaxb */
case 1047: /* ldsmaxb */
value = 1047; /* --> ldsmaxb. */
break;
case 1120: /* stsmaxh */
case 1048: /* ldsmaxh */
value = 1048; /* --> ldsmaxh. */
break;
case 1121: /* stsmax */
case 1049: /* ldsmax */
value = 1049; /* --> ldsmax. */
break;
case 1122: /* stsmaxlb */
case 1051: /* ldsmaxlb */
value = 1051; /* --> ldsmaxlb. */
break;
case 1123: /* stsmaxlh */
case 1054: /* ldsmaxlh */
value = 1054; /* --> ldsmaxlh. */
break;
case 1124: /* stsmaxl */
case 1057: /* ldsmaxl */
value = 1057; /* --> ldsmaxl. */
break;
case 1125: /* stsminb */
case 1059: /* ldsminb */
value = 1059; /* --> ldsminb. */
break;
case 1126: /* stsminh */
case 1060: /* ldsminh */
value = 1060; /* --> ldsminh. */
break;
case 1127: /* stsmin */
case 1061: /* ldsmin */
value = 1061; /* --> ldsmin. */
break;
case 1128: /* stsminlb */
case 1063: /* ldsminlb */
value = 1063; /* --> ldsminlb. */
break;
case 1129: /* stsminlh */
case 1066: /* ldsminlh */
value = 1066; /* --> ldsminlh. */
break;
case 1130: /* stsminl */
case 1069: /* ldsminl */
value = 1069; /* --> ldsminl. */
break;
case 1131: /* stumaxb */
case 1071: /* ldumaxb */
value = 1071; /* --> ldumaxb. */
break;
case 1132: /* stumaxh */
case 1072: /* ldumaxh */
value = 1072; /* --> ldumaxh. */
break;
case 1133: /* stumax */
case 1073: /* ldumax */
value = 1073; /* --> ldumax. */
break;
case 1134: /* stumaxlb */
case 1075: /* ldumaxlb */
value = 1075; /* --> ldumaxlb. */
break;
case 1135: /* stumaxlh */
case 1078: /* ldumaxlh */
value = 1078; /* --> ldumaxlh. */
break;
case 1136: /* stumaxl */
case 1081: /* ldumaxl */
value = 1081; /* --> ldumaxl. */
break;
case 1137: /* stuminb */
case 1083: /* lduminb */
value = 1083; /* --> lduminb. */
break;
case 1138: /* stuminh */
case 1084: /* lduminh */
value = 1084; /* --> lduminh. */
break;
case 1139: /* stumin */
case 1085: /* ldumin */
value = 1085; /* --> ldumin. */
break;
case 1140: /* stuminlb */
case 1087: /* lduminlb */
value = 1087; /* --> lduminlb. */
break;
case 1141: /* stuminlh */
case 1090: /* lduminlh */
value = 1090; /* --> lduminlh. */
break;
case 1142: /* stuminl */
case 1093: /* lduminl */
value = 1093; /* --> lduminl. */
break;
case 1144: /* mov */
case 1143: /* movn */
value = 1143; /* --> movn. */
break;
case 1146: /* mov */
case 1145: /* movz */
value = 1145; /* --> movz. */
break;
case 1184: /* autibsp */
case 1183: /* autibz */
case 1182: /* autiasp */
case 1181: /* autiaz */
case 1180: /* pacibsp */
case 1179: /* pacibz */
case 1178: /* paciasp */
case 1177: /* paciaz */
case 1164: /* psb */
case 1163: /* esb */
case 1162: /* autib1716 */
case 1161: /* autia1716 */
case 1160: /* pacib1716 */
case 1159: /* pacia1716 */
case 1158: /* xpaclri */
case 1157: /* sevl */
case 1156: /* sev */
case 1155: /* wfi */
case 1154: /* wfe */
case 1153: /* yield */
case 1152: /* nop */
case 1151: /* hint */
value = 1151; /* --> hint. */
break;
case 1173: /* tlbi */
case 1172: /* ic */
case 1171: /* dc */
case 1170: /* at */
case 1169: /* sys */
value = 1169; /* --> sys. */
break;
case 1927: /* bic */
case 1232: /* and */
value = 1232; /* --> and. */
break;
case 1215: /* mov */
case 1234: /* and */
value = 1234; /* --> and. */
break;
case 1219: /* movs */
case 1235: /* ands */
value = 1235; /* --> ands. */
break;
case 1928: /* cmple */
case 1270: /* cmpge */
value = 1270; /* --> cmpge. */
break;
case 1931: /* cmplt */
case 1273: /* cmpgt */
value = 1273; /* --> cmpgt. */
break;
case 1929: /* cmplo */
case 1275: /* cmphi */
value = 1275; /* --> cmphi. */
break;
case 1930: /* cmpls */
case 1278: /* cmphs */
value = 1278; /* --> cmphs. */
break;
case 1212: /* mov */
case 1300: /* cpy */
value = 1300; /* --> cpy. */
break;
case 1214: /* mov */
case 1301: /* cpy */
value = 1301; /* --> cpy. */
break;
case 1938: /* fmov */
case 1217: /* mov */
case 1302: /* cpy */
value = 1302; /* --> cpy. */
break;
case 1207: /* mov */
case 1314: /* dup */
value = 1314; /* --> dup. */
break;
case 1209: /* mov */
case 1206: /* mov */
case 1315: /* dup */
value = 1315; /* --> dup. */
break;
case 1937: /* fmov */
case 1211: /* mov */
case 1316: /* dup */
value = 1316; /* --> dup. */
break;
case 1210: /* mov */
case 1317: /* dupm */
value = 1317; /* --> dupm. */
break;
case 1932: /* eon */
case 1319: /* eor */
value = 1319; /* --> eor. */
break;
case 1220: /* not */
case 1321: /* eor */
value = 1321; /* --> eor. */
break;
case 1221: /* nots */
case 1322: /* eors */
value = 1322; /* --> eors. */
break;
case 1933: /* facle */
case 1327: /* facge */
value = 1327; /* --> facge. */
break;
case 1934: /* faclt */
case 1328: /* facgt */
value = 1328; /* --> facgt. */
break;
case 1935: /* fcmle */
case 1337: /* fcmge */
value = 1337; /* --> fcmge. */
break;
case 1936: /* fcmlt */
case 1339: /* fcmgt */
value = 1339; /* --> fcmgt. */
break;
case 1204: /* fmov */
case 1345: /* fcpy */
value = 1345; /* --> fcpy. */
break;
case 1203: /* fmov */
case 1362: /* fdup */
value = 1362; /* --> fdup. */
break;
case 1205: /* mov */
case 1660: /* orr */
value = 1660; /* --> orr. */
break;
case 1939: /* orn */
case 1661: /* orr */
value = 1661; /* --> orr. */
break;
case 1208: /* mov */
case 1663: /* orr */
value = 1663; /* --> orr. */
break;
case 1218: /* movs */
case 1664: /* orrs */
value = 1664; /* --> orrs. */
break;
case 1213: /* mov */
case 1720: /* sel */
value = 1720; /* --> sel. */
break;
case 1216: /* mov */
case 1721: /* sel */
value = 1721; /* --> 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 141:
case 142:
case 143:
case 144:
case 145:
case 146:
case 147:
case 148:
case 149:
case 150:
case 163:
case 164:
case 165:
case 166:
case 167:
case 168:
case 169:
case 170:
case 171:
case 172:
case 175:
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 138:
case 140:
case 155:
case 156:
case 157:
case 158:
case 159:
case 160:
case 161:
case 162:
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 131:
return aarch64_ins_fpimm (self, info, code, inst);
case 61:
case 136:
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 80:
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_simm10 (self, info, code, inst);
case 79:
return aarch64_ins_addr_uimm12 (self, info, code, inst);
case 81:
return aarch64_ins_simd_addr_post (self, info, code, inst);
case 82:
return aarch64_ins_sysreg (self, info, code, inst);
case 83:
return aarch64_ins_pstatefield (self, info, code, inst);
case 84:
case 85:
case 86:
case 87:
return aarch64_ins_sysins_op (self, info, code, inst);
case 88:
case 89:
return aarch64_ins_barrier (self, info, code, inst);
case 90:
return aarch64_ins_prfop (self, info, code, inst);
case 91:
return aarch64_ins_hint (self, info, code, inst);
case 92:
case 93:
case 94:
case 95:
return aarch64_ins_sve_addr_ri_s4xvl (self, info, code, inst);
case 96:
return aarch64_ins_sve_addr_ri_s6xvl (self, info, code, inst);
case 97:
return aarch64_ins_sve_addr_ri_s9xvl (self, info, code, inst);
case 98:
case 99:
case 100:
case 101:
return aarch64_ins_sve_addr_ri_u6 (self, info, code, inst);
case 102:
case 103:
case 104:
case 105:
case 106:
case 107:
case 108:
case 109:
case 110:
case 111:
case 112:
case 113:
return aarch64_ins_sve_addr_rr_lsl (self, info, code, inst);
case 114:
case 115:
case 116:
case 117:
case 118:
case 119:
case 120:
case 121:
return aarch64_ins_sve_addr_rz_xtw (self, info, code, inst);
case 122:
case 123:
case 124:
case 125:
return aarch64_ins_sve_addr_zi_u5 (self, info, code, inst);
case 126:
return aarch64_ins_sve_addr_zz_lsl (self, info, code, inst);
case 127:
return aarch64_ins_sve_addr_zz_sxtw (self, info, code, inst);
case 128:
return aarch64_ins_sve_addr_zz_uxtw (self, info, code, inst);
case 129:
return aarch64_ins_sve_aimm (self, info, code, inst);
case 130:
return aarch64_ins_sve_asimm (self, info, code, inst);
case 132:
return aarch64_ins_sve_float_half_one (self, info, code, inst);
case 133:
return aarch64_ins_sve_float_half_two (self, info, code, inst);
case 134:
return aarch64_ins_sve_float_zero_one (self, info, code, inst);
case 135:
return aarch64_ins_inv_limm (self, info, code, inst);
case 137:
return aarch64_ins_sve_limm_mov (self, info, code, inst);
case 139:
return aarch64_ins_sve_scale (self, info, code, inst);
case 151:
case 152:
return aarch64_ins_sve_shlimm (self, info, code, inst);
case 153:
case 154:
return aarch64_ins_sve_shrimm (self, info, code, inst);
case 173:
return aarch64_ins_sve_index (self, info, code, inst);
case 174:
case 176:
return aarch64_ins_sve_reglist (self, info, code, inst);
default: assert (0); abort ();
}
}