Commit 824d332f authored by Sudi Das's avatar Sudi Das Committed by Tamar Christina
Browse files

AArch64: Add new STZGM instruction for Armv8.5-A Memory Tagging Extension.

This patch is part of a series of patches to introduce a few changes to the
Armv8.5-A Memory Tagging Extension. This patch adds the new STZGM instruction.

STGZM Xt, [<Xn|SP>]

Committed on behalf of Sudakshina Das.

*** gas/ChangeLog ***

	* testsuite/gas/aarch64/armv8_5-a-memtag.d: New tests for stzgm.
	* testsuite/gas/aarch64/armv8_5-a-memtag.s: Likewise.
	* testsuite/gas/aarch64/illegal-memtag.l: Likewise.
	* testsuite/gas/aarch64/illegal-memtag.s: Likewise.

*** opcodes/ChangeLog ***

	* aarch64-asm-2.c: Regenerated.
	* aarch64-dis-2.c: Likewise.
	* aarch64-opc-2.c: Likewise.
	* aarch64-tbl.h (aarch64_opcode): Add new stzgm.

(cherry picked from commit 20a4ca55)
parent 64485cb2
2019-01-25 Sudakshina Das <sudi.das@arm.com>
* testsuite/gas/aarch64/armv8_5-a-memtag.d: New tests for stzgm.
* testsuite/gas/aarch64/armv8_5-a-memtag.s: Likewise.
* testsuite/gas/aarch64/illegal-memtag.l: Likewise.
* testsuite/gas/aarch64/illegal-memtag.s: Likewise.
2019-01-25 Sudakshina Das <sudi.das@arm.com>
Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
......
......@@ -121,3 +121,9 @@ Disassembly of section \.text:
.*: d960001f ldg xzr, \[x0\]
.*: d96ff000 ldg x0, \[x0, #4080\]
.*: d9700000 ldg x0, \[x0, #-4096\]
.*: d9200000 stzgm x0, \[x0\]
.*: d920001b stzgm x27, \[x0\]
.*: d9200360 stzgm x0, \[x27\]
.*: d9200379 stzgm x25, \[x27\]
.*: d92003e0 stzgm x0, \[sp\]
.*: d920001f stzgm xzr, \[x0\]
......@@ -30,6 +30,15 @@ func:
\op [sp], #-4096
.endm
.macro expand_ldg_bulk op
\op x0, [x0]
\op x27, [x0]
\op x0, [x27]
\op x25, [x27]
\op x0, [sp]
\op xzr, [x0]
.endm
# IRG
expand_3_reg irg
irg sp, x0
......@@ -98,3 +107,5 @@ func:
ldg xzr, [x0, #0]
ldg x0, [x0, #4080]
ldg x0, [x0, #-4096]
expand_ldg_bulk stzgm
......@@ -12,6 +12,8 @@
[^:]*:[0-9]+: Error: immediate offset out of range -1024 to 1008 at operand 3 -- `stgp x1,x2,\[x3,#1009\]'
[^:]*:[0-9]+: Error: immediate value must be a multiple of 16 at operand 3 -- `stgp x1,x2,\[x3,#33\]'
[^:]*:[0-9]+: Error: immediate offset out of range -1024 to 1008 at operand 3 -- `stgp x1,x2,\[x3,#-1025\]'
[^:]*:[0-9]+: Error: the optional immediate offset can only be 0 at operand 2 -- `stzgm x2,\[x3,#16\]'
[^:]*:[0-9]+: Error: invalid addressing mode at operand 2 -- `stzgm x4,\[x5,#16\]!'
[^:]*:[0-9]+: Error: operand 1 must be an integer or stack pointer register -- `irg xzr,x2,x3'
[^:]*:[0-9]+: Error: operand 2 must be an integer or stack pointer register -- `irg x1,xzr,x3'
[^:]*:[0-9]+: Error: operand 3 must be an integer register -- `irg x1,x2,sp'
......@@ -37,3 +39,5 @@
[^:]*:[0-9]+: Error: 64-bit integer or SP register expected at operand 3 -- `stgp x0,x0,\[xzr\]'
[^:]*:[0-9]+: Error: operand 1 must be an integer register -- `ldg sp,\[x0,#16\]'
[^:]*:[0-9]+: Error: 64-bit integer or SP register expected at operand 2 -- `ldg x0,\[xzr,#16\]'
[^:]*:[0-9]+: Error: 64-bit integer or SP register expected at operand 2 -- `stzgm x0,\[xzr\]'
[^:]*:[0-9]+: Error: operand 1 must be an integer register -- `stzgm sp,\[x3\]'
......@@ -20,6 +20,10 @@ func:
stgp x1, x2, [x3, #33]
stgp x1, x2, [x3, #-1025]
# STZGM
stzgm x2, [x3, #16]
stzgm x4, [x5, #16]!
# Illegal SP/XZR registers
irg xzr, x2, x3
irg x1, xzr, x3
......@@ -46,3 +50,5 @@ func:
stgp x0, x0, [xzr]
ldg sp, [x0, #16]
ldg x0, [xzr, #16]
stzgm x0, [xzr]
stzgm sp, [x3]
2019-01-25 Sudakshina Das <sudi.das@arm.com>
* aarch64-asm-2.c: Regenerated.
* aarch64-dis-2.c: Likewise.
* aarch64-opc-2.c: Likewise.
* aarch64-tbl.h (aarch64_opcode): Add new stzgm.
2019-01-25 Sudakshina Das <sudi.das@arm.com>
Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
......
......@@ -201,391 +201,391 @@ aarch64_find_real_opcode (const aarch64_opcode *opcode)
case 757: /* extr */
value = 757; /* --> extr. */
break;
case 988: /* bic */
case 987: /* and */
value = 987; /* --> and. */
break;
case 990: /* mov */
case 989: /* orr */
value = 989; /* --> orr. */
break;
case 993: /* tst */
case 992: /* ands */
value = 992; /* --> ands. */
break;
case 998: /* uxtw */
case 997: /* mov */
case 996: /* orr */
value = 996; /* --> orr. */
case 989: /* bic */
case 988: /* and */
value = 988; /* --> and. */
break;
case 991: /* mov */
case 990: /* orr */
value = 990; /* --> orr. */
break;
case 994: /* tst */
case 993: /* ands */
value = 993; /* --> ands. */
break;
case 999: /* uxtw */
case 998: /* mov */
case 997: /* orr */
value = 997; /* --> orr. */
break;
case 1000: /* mvn */
case 999: /* orn */
value = 999; /* --> orn. */
case 1001: /* mvn */
case 1000: /* orn */
value = 1000; /* --> orn. */
break;
case 1004: /* tst */
case 1003: /* ands */
value = 1003; /* --> ands. */
case 1005: /* tst */
case 1004: /* ands */
value = 1004; /* --> ands. */
break;
case 1130: /* staddb */
case 1034: /* ldaddb */
value = 1034; /* --> ldaddb. */
case 1131: /* staddb */
case 1035: /* ldaddb */
value = 1035; /* --> ldaddb. */
break;
case 1131: /* staddh */
case 1035: /* ldaddh */
value = 1035; /* --> ldaddh. */
case 1132: /* staddh */
case 1036: /* ldaddh */
value = 1036; /* --> ldaddh. */
break;
case 1132: /* stadd */
case 1036: /* ldadd */
value = 1036; /* --> ldadd. */
case 1133: /* stadd */
case 1037: /* ldadd */
value = 1037; /* --> ldadd. */
break;
case 1133: /* staddlb */
case 1038: /* ldaddlb */
value = 1038; /* --> ldaddlb. */
case 1134: /* staddlb */
case 1039: /* ldaddlb */
value = 1039; /* --> ldaddlb. */
break;
case 1134: /* staddlh */
case 1041: /* ldaddlh */
value = 1041; /* --> ldaddlh. */
case 1135: /* staddlh */
case 1042: /* ldaddlh */
value = 1042; /* --> ldaddlh. */
break;
case 1135: /* staddl */
case 1044: /* ldaddl */
value = 1044; /* --> ldaddl. */
case 1136: /* staddl */
case 1045: /* ldaddl */
value = 1045; /* --> ldaddl. */
break;
case 1136: /* stclrb */
case 1046: /* ldclrb */
value = 1046; /* --> ldclrb. */
case 1137: /* stclrb */
case 1047: /* ldclrb */
value = 1047; /* --> ldclrb. */
break;
case 1137: /* stclrh */
case 1047: /* ldclrh */
value = 1047; /* --> ldclrh. */
case 1138: /* stclrh */
case 1048: /* ldclrh */
value = 1048; /* --> ldclrh. */
break;
case 1138: /* stclr */
case 1048: /* ldclr */
value = 1048; /* --> ldclr. */
case 1139: /* stclr */
case 1049: /* ldclr */
value = 1049; /* --> ldclr. */
break;
case 1139: /* stclrlb */
case 1050: /* ldclrlb */
value = 1050; /* --> ldclrlb. */
case 1140: /* stclrlb */
case 1051: /* ldclrlb */
value = 1051; /* --> ldclrlb. */
break;
case 1140: /* stclrlh */
case 1053: /* ldclrlh */
value = 1053; /* --> ldclrlh. */
case 1141: /* stclrlh */
case 1054: /* ldclrlh */
value = 1054; /* --> ldclrlh. */
break;
case 1141: /* stclrl */
case 1056: /* ldclrl */
value = 1056; /* --> ldclrl. */
case 1142: /* stclrl */
case 1057: /* ldclrl */
value = 1057; /* --> ldclrl. */
break;
case 1142: /* steorb */
case 1058: /* ldeorb */
value = 1058; /* --> ldeorb. */
case 1143: /* steorb */
case 1059: /* ldeorb */
value = 1059; /* --> ldeorb. */
break;
case 1143: /* steorh */
case 1059: /* ldeorh */
value = 1059; /* --> ldeorh. */
case 1144: /* steorh */
case 1060: /* ldeorh */
value = 1060; /* --> ldeorh. */
break;
case 1144: /* steor */
case 1060: /* ldeor */
value = 1060; /* --> ldeor. */
case 1145: /* steor */
case 1061: /* ldeor */
value = 1061; /* --> ldeor. */
break;
case 1145: /* steorlb */
case 1062: /* ldeorlb */
value = 1062; /* --> ldeorlb. */
case 1146: /* steorlb */
case 1063: /* ldeorlb */
value = 1063; /* --> ldeorlb. */
break;
case 1146: /* steorlh */
case 1065: /* ldeorlh */
value = 1065; /* --> ldeorlh. */
case 1147: /* steorlh */
case 1066: /* ldeorlh */
value = 1066; /* --> ldeorlh. */
break;
case 1147: /* steorl */
case 1068: /* ldeorl */
value = 1068; /* --> ldeorl. */
case 1148: /* steorl */
case 1069: /* ldeorl */
value = 1069; /* --> ldeorl. */
break;
case 1148: /* stsetb */
case 1070: /* ldsetb */
value = 1070; /* --> ldsetb. */
case 1149: /* stsetb */
case 1071: /* ldsetb */
value = 1071; /* --> ldsetb. */
break;
case 1149: /* stseth */
case 1071: /* ldseth */
value = 1071; /* --> ldseth. */
case 1150: /* stseth */
case 1072: /* ldseth */
value = 1072; /* --> ldseth. */
break;
case 1150: /* stset */
case 1072: /* ldset */
value = 1072; /* --> ldset. */
case 1151: /* stset */
case 1073: /* ldset */
value = 1073; /* --> ldset. */
break;
case 1151: /* stsetlb */
case 1074: /* ldsetlb */
value = 1074; /* --> ldsetlb. */
case 1152: /* stsetlb */
case 1075: /* ldsetlb */
value = 1075; /* --> ldsetlb. */
break;
case 1152: /* stsetlh */
case 1077: /* ldsetlh */
value = 1077; /* --> ldsetlh. */
case 1153: /* stsetlh */
case 1078: /* ldsetlh */
value = 1078; /* --> ldsetlh. */
break;
case 1153: /* stsetl */
case 1080: /* ldsetl */
value = 1080; /* --> ldsetl. */
case 1154: /* stsetl */
case 1081: /* ldsetl */
value = 1081; /* --> ldsetl. */
break;
case 1154: /* stsmaxb */
case 1082: /* ldsmaxb */
value = 1082; /* --> ldsmaxb. */
case 1155: /* stsmaxb */
case 1083: /* ldsmaxb */
value = 1083; /* --> ldsmaxb. */
break;
case 1155: /* stsmaxh */
case 1083: /* ldsmaxh */
value = 1083; /* --> ldsmaxh. */
case 1156: /* stsmaxh */
case 1084: /* ldsmaxh */
value = 1084; /* --> ldsmaxh. */
break;
case 1156: /* stsmax */
case 1084: /* ldsmax */
value = 1084; /* --> ldsmax. */
break;
case 1157: /* stsmaxlb */
case 1086: /* ldsmaxlb */
value = 1086; /* --> ldsmaxlb. */
break;
case 1158: /* stsmaxlh */
case 1089: /* ldsmaxlh */
value = 1089; /* --> ldsmaxlh. */
break;
case 1159: /* stsmaxl */
case 1092: /* ldsmaxl */
value = 1092; /* --> ldsmaxl. */
break;
case 1160: /* stsminb */
case 1094: /* ldsminb */
value = 1094; /* --> ldsminb. */
break;
case 1161: /* stsminh */
case 1095: /* ldsminh */
value = 1095; /* --> ldsminh. */
break;
case 1162: /* stsmin */
case 1096: /* ldsmin */
value = 1096; /* --> ldsmin. */
break;
case 1163: /* stsminlb */
case 1098: /* ldsminlb */
value = 1098; /* --> ldsminlb. */
break;
case 1164: /* stsminlh */
case 1101: /* ldsminlh */
value = 1101; /* --> ldsminlh. */
break;
case 1165: /* stsminl */
case 1104: /* ldsminl */
value = 1104; /* --> ldsminl. */
break;
case 1166: /* stumaxb */
case 1106: /* ldumaxb */
value = 1106; /* --> ldumaxb. */
break;
case 1167: /* stumaxh */
case 1107: /* ldumaxh */
value = 1107; /* --> ldumaxh. */
break;
case 1168: /* stumax */
case 1108: /* ldumax */
value = 1108; /* --> ldumax. */
break;
case 1169: /* stumaxlb */
case 1110: /* ldumaxlb */
value = 1110; /* --> ldumaxlb. */
break;
case 1170: /* stumaxlh */
case 1113: /* ldumaxlh */
value = 1113; /* --> ldumaxlh. */
break;
case 1171: /* stumaxl */
case 1116: /* ldumaxl */
value = 1116; /* --> ldumaxl. */
break;
case 1172: /* stuminb */
case 1118: /* lduminb */
value = 1118; /* --> lduminb. */
break;
case 1173: /* stuminh */
case 1119: /* lduminh */
value = 1119; /* --> lduminh. */
break;
case 1174: /* stumin */
case 1120: /* ldumin */
value = 1120; /* --> ldumin. */
break;
case 1175: /* stuminlb */
case 1122: /* lduminlb */
value = 1122; /* --> lduminlb. */
break;
case 1176: /* stuminlh */
case 1125: /* lduminlh */
value = 1125; /* --> lduminlh. */
break;
case 1177: /* stuminl */
case 1128: /* lduminl */
value = 1128; /* --> lduminl. */
break;
case 1179: /* mov */
case 1178: /* movn */
value = 1178; /* --> movn. */
break;
case 1181: /* mov */
case 1180: /* movz */
value = 1180; /* --> movz. */
break;
case 1227: /* autibsp */
case 1226: /* autibz */
case 1225: /* autiasp */
case 1224: /* autiaz */
case 1223: /* pacibsp */
case 1222: /* pacibz */
case 1221: /* paciasp */
case 1220: /* paciaz */
case 1201: /* psb */
case 1200: /* esb */
case 1199: /* autib1716 */
case 1198: /* autia1716 */
case 1197: /* pacib1716 */
case 1196: /* pacia1716 */
case 1195: /* xpaclri */
case 1194: /* sevl */
case 1193: /* sev */
case 1192: /* wfi */
case 1191: /* wfe */
case 1190: /* yield */
case 1189: /* bti */
case 1188: /* csdb */
case 1187: /* nop */
case 1186: /* hint */
value = 1186; /* --> hint. */
break;
case 1205: /* pssbb */
case 1204: /* ssbb */
case 1203: /* dsb */
value = 1203; /* --> dsb. */
break;
case 1216: /* cpp */
case 1215: /* dvp */
case 1214: /* cfp */
case 1213: /* tlbi */
case 1212: /* ic */
case 1211: /* dc */
case 1210: /* at */
case 1209: /* sys */
value = 1209; /* --> sys. */
break;
case 2025: /* bic */
case 1275: /* and */
value = 1275; /* --> and. */
case 1157: /* stsmax */
case 1085: /* ldsmax */
value = 1085; /* --> ldsmax. */
break;
case 1158: /* stsmaxlb */
case 1087: /* ldsmaxlb */
value = 1087; /* --> ldsmaxlb. */
break;
case 1159: /* stsmaxlh */
case 1090: /* ldsmaxlh */
value = 1090; /* --> ldsmaxlh. */
break;
case 1160: /* stsmaxl */
case 1093: /* ldsmaxl */
value = 1093; /* --> ldsmaxl. */
break;
case 1161: /* stsminb */
case 1095: /* ldsminb */
value = 1095; /* --> ldsminb. */
break;
case 1162: /* stsminh */
case 1096: /* ldsminh */
value = 1096; /* --> ldsminh. */
break;
case 1163: /* stsmin */
case 1097: /* ldsmin */
value = 1097; /* --> ldsmin. */
break;
case 1164: /* stsminlb */
case 1099: /* ldsminlb */
value = 1099; /* --> ldsminlb. */
break;
case 1165: /* stsminlh */
case 1102: /* ldsminlh */
value = 1102; /* --> ldsminlh. */
break;
case 1166: /* stsminl */
case 1105: /* ldsminl */
value = 1105; /* --> ldsminl. */
break;
case 1167: /* stumaxb */
case 1107: /* ldumaxb */
value = 1107; /* --> ldumaxb. */
break;
case 1168: /* stumaxh */
case 1108: /* ldumaxh */
value = 1108; /* --> ldumaxh. */
break;
case 1169: /* stumax */
case 1109: /* ldumax */
value = 1109; /* --> ldumax. */
break;
case 1170: /* stumaxlb */
case 1111: /* ldumaxlb */
value = 1111; /* --> ldumaxlb. */
break;
case 1171: /* stumaxlh */
case 1114: /* ldumaxlh */
value = 1114; /* --> ldumaxlh. */
break;
case 1172: /* stumaxl */
case 1117: /* ldumaxl */
value = 1117; /* --> ldumaxl. */
break;
case 1173: /* stuminb */
case 1119: /* lduminb */
value = 1119; /* --> lduminb. */
break;
case 1174: /* stuminh */
case 1120: /* lduminh */
value = 1120; /* --> lduminh. */
break;
case 1175: /* stumin */
case 1121: /* ldumin */
value = 1121; /* --> ldumin. */
break;
case 1176: /* stuminlb */
case 1123: /* lduminlb */
value = 1123; /* --> lduminlb. */
break;
case 1177: /* stuminlh */
case 1126: /* lduminlh */
value = 1126; /* --> lduminlh. */
break;
case 1178: /* stuminl */
case 1129: /* lduminl */
value = 1129; /* --> lduminl. */
break;
case 1180: /* mov */
case 1179: /* movn */
value = 1179; /* --> movn. */
break;
case 1182: /* mov */
case 1181: /* movz */
value = 1181; /* --> movz. */
break;
case 1228: /* autibsp */
case 1227: /* autibz */
case 1226: /* autiasp */
case 1225: /* autiaz */
case 1224: /* pacibsp */
case 1223: /* pacibz */
case 1222: /* paciasp */
case 1221: /* paciaz */
case 1202: /* psb */
case 1201: /* esb */
case 1200: /* autib1716 */
case 1199: /* autia1716 */
case 1198: /* pacib1716 */
case 1197: /* pacia1716 */
case 1196: /* xpaclri */
case 1195: /* sevl */
case 1194: /* sev */
case 1193: /* wfi */
case 1192: /* wfe */
case 1191: /* yield */
case 1190: /* bti */
case 1189: /* csdb */
case 1188: /* nop */
case 1187: /* hint */
value = 1187; /* --> hint. */
break;
case 1206: /* pssbb */
case 1205: /* ssbb */
case 1204: /* dsb */
value = 1204; /* --> dsb. */
break;
case 1217: /* cpp */
case 1216: /* dvp */
case 1215: /* cfp */
case 1214: /* tlbi */
case 1213: /* ic */
case 1212: /* dc */
case 1211: /* at */
case 1210: /* sys */
value = 1210; /* --> sys. */
break;
case 2026: /* bic */
case 1276: /* and */
value = 1276; /* --> and. */
break;
case 1258: /* mov */
case 1277: /* and */
value = 1277; /* --> and. */
break;