[PATCH][GAS] aarch64: Add WFIT instruction for Armv8.7-a

This patch adds new to Armv8.7 WFIT instruction which take one operand:

    WFIT <Xt>

Where:
    <Xt> is 64-bit name of the general-purpose source register, encoded in the
         "Rd" field.

For more details regarding WFIT (Wait For Interrupt with Timeout) instruction for
Armv8.7-a please refer to Arm A64 Instruction set documentation for Armv8-A
architecture profile, see document pages 570 of [0].

	[0]: https://developer.arm.com/docs/ddi0596/i

gas/ChangeLog:

2020-10-30  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	* NEWS: Update docs.
	* testsuite/gas/aarch64/system-5.d: Update test with WFIT insn.
	* testsuite/gas/aarch64/system-5.s: Update test with WFIT insn.

opcodes/ChangeLog:

2020-10-30  Przemyslaw Wirkus  <przemyslaw.wirkus@arm.com>

	* aarch64-tbl.h (struct aarch64_opcode): New instruction WFIT.
	* aarch64-asm-2.c: Regenerated.
	* aarch64-dis-2.c: Regenerated.
	* aarch64-opc-2.c: Regenerated.
This commit is contained in:
Przemyslaw Wirkus 2020-10-30 10:27:24 +00:00
parent b78b3a297b
commit a984d94aab
7 changed files with 1421 additions and 1350 deletions

View file

@ -21,7 +21,7 @@
* Add support for Armv8-R and Armv8.7-A AArch64.
* Add support for DSB memory nXS barrier and WFET instruction for Armv8.7
* Add support for DSB memory nXS barrier, WFET and WFIT instruction for Armv8.7
AArch64.
* Add support for +csre feature for -march. Add CSR PDEC instruction for CSRE

View file

@ -1,4 +1,4 @@
#name: WFET (Wait For Event with Timeout) instruction
#name: WFET and WFIT instructions
#objdump: -dr
.*: file format .*
@ -37,3 +37,34 @@ Disassembly of section \.text:
.*: d503101c wfet x28
.*: d503101d wfet x29
.*: d503101e wfet x30
.*: d5031020 wfit x0
.*: d5031021 wfit x1
.*: d5031022 wfit x2
.*: d5031023 wfit x3
.*: d5031024 wfit x4
.*: d5031025 wfit x5
.*: d5031026 wfit x6
.*: d5031027 wfit x7
.*: d5031028 wfit x8
.*: d5031029 wfit x9
.*: d503102a wfit x10
.*: d503102b wfit x11
.*: d503102c wfit x12
.*: d503102d wfit x13
.*: d503102e wfit x14
.*: d503102f wfit x15
.*: d5031030 wfit x16
.*: d5031031 wfit x17
.*: d5031032 wfit x18
.*: d5031033 wfit x19
.*: d5031034 wfit x20
.*: d5031035 wfit x21
.*: d5031036 wfit x22
.*: d5031037 wfit x23
.*: d5031038 wfit x24
.*: d5031039 wfit x25
.*: d503103a wfit x26
.*: d503103b wfit x27
.*: d503103c wfit x28
.*: d503103d wfit x29
.*: d503103e wfit x30

View file

@ -32,3 +32,37 @@
wfet x28
wfet x29
wfet x30
/* Wait For Interrupt with Timeout. */
wfit x0
wfit x1
wfit x2
wfit x3
wfit x4
wfit x5
wfit x6
wfit x7
wfit x8
wfit x9
wfit x10
wfit x11
wfit x12
wfit x13
wfit x14
wfit x15
wfit x16
wfit x17
wfit x18
wfit x19
wfit x20
wfit x21
wfit x22
wfit x23
wfit x24
wfit x25
wfit x26
wfit x27
wfit x28
wfit x29
wfit x30

View file

@ -426,14 +426,14 @@ aarch64_find_real_opcode (const aarch64_opcode *opcode)
case 1184: /* movz */
value = 1184; /* --> movz. */
break;
case 1242: /* autibsp */
case 1241: /* autibz */
case 1240: /* autiasp */
case 1239: /* autiaz */
case 1238: /* pacibsp */
case 1237: /* pacibz */
case 1236: /* paciasp */
case 1235: /* paciaz */
case 1243: /* autibsp */
case 1242: /* autibz */
case 1241: /* autiasp */
case 1240: /* autiaz */
case 1239: /* pacibsp */
case 1238: /* pacibz */
case 1237: /* paciasp */
case 1236: /* paciaz */
case 1212: /* tsb */
case 1211: /* psb */
case 1210: /* esb */
@ -462,9 +462,9 @@ aarch64_find_real_opcode (const aarch64_opcode *opcode)
case 1215: /* dsb */
value = 1215; /* --> dsb. */
break;
case 1230: /* cpp */
case 1229: /* dvp */
case 1228: /* cfp */
case 1231: /* cpp */
case 1230: /* dvp */
case 1229: /* cfp */
case 1226: /* tlbi */
case 1225: /* ic */
case 1224: /* dc */
@ -475,125 +475,128 @@ aarch64_find_real_opcode (const aarch64_opcode *opcode)
case 1227: /* wfet */
value = 1227; /* --> wfet. */
break;
case 2040: /* bic */
case 1290: /* and */
value = 1290; /* --> and. */
case 1228: /* wfit */
value = 1228; /* --> wfit. */
break;
case 1273: /* mov */
case 1292: /* and */
value = 1292; /* --> and. */
case 2041: /* bic */
case 1291: /* and */
value = 1291; /* --> and. */
break;
case 1277: /* movs */
case 1293: /* ands */
value = 1293; /* --> ands. */
case 1274: /* mov */
case 1293: /* and */
value = 1293; /* --> and. */
break;
case 2041: /* cmple */
case 1328: /* cmpge */
value = 1328; /* --> cmpge. */
case 1278: /* movs */
case 1294: /* ands */
value = 1294; /* --> ands. */
break;
case 2044: /* cmplt */
case 1331: /* cmpgt */
value = 1331; /* --> cmpgt. */
case 2042: /* cmple */
case 1329: /* cmpge */
value = 1329; /* --> cmpge. */
break;
case 2042: /* cmplo */
case 1333: /* cmphi */
value = 1333; /* --> cmphi. */
case 2045: /* cmplt */
case 1332: /* cmpgt */
value = 1332; /* --> cmpgt. */
break;
case 2043: /* cmpls */
case 1336: /* cmphs */
value = 1336; /* --> cmphs. */
case 2043: /* cmplo */
case 1334: /* cmphi */
value = 1334; /* --> cmphi. */
break;
case 1270: /* mov */
case 1358: /* cpy */
value = 1358; /* --> cpy. */
case 2044: /* cmpls */
case 1337: /* cmphs */
value = 1337; /* --> cmphs. */
break;
case 1272: /* mov */
case 1271: /* mov */
case 1359: /* cpy */
value = 1359; /* --> cpy. */
break;
case 2051: /* fmov */
case 1275: /* mov */
case 1273: /* mov */
case 1360: /* cpy */
value = 1360; /* --> cpy. */
break;
case 1265: /* mov */
case 1372: /* dup */
value = 1372; /* --> dup. */
case 2052: /* fmov */
case 1276: /* mov */
case 1361: /* cpy */
value = 1361; /* --> cpy. */
break;
case 1267: /* mov */
case 1264: /* mov */
case 1266: /* mov */
case 1373: /* dup */
value = 1373; /* --> dup. */
break;
case 2050: /* fmov */
case 1269: /* mov */
case 1268: /* mov */
case 1265: /* mov */
case 1374: /* dup */
value = 1374; /* --> dup. */
break;
case 1268: /* mov */
case 1375: /* dupm */
value = 1375; /* --> dupm. */
case 2051: /* fmov */
case 1270: /* mov */
case 1375: /* dup */
value = 1375; /* --> dup. */
break;
case 2045: /* eon */
case 1377: /* eor */
value = 1377; /* --> eor. */
case 1269: /* mov */
case 1376: /* dupm */
value = 1376; /* --> dupm. */
break;
case 1278: /* not */
case 1379: /* eor */
value = 1379; /* --> eor. */
case 2046: /* eon */
case 1378: /* eor */
value = 1378; /* --> eor. */
break;
case 1279: /* nots */
case 1380: /* eors */
value = 1380; /* --> eors. */
case 1279: /* not */
case 1380: /* eor */
value = 1380; /* --> eor. */
break;
case 2046: /* facle */
case 1385: /* facge */
value = 1385; /* --> facge. */
case 1280: /* nots */
case 1381: /* eors */
value = 1381; /* --> eors. */
break;
case 2047: /* faclt */
case 1386: /* facgt */
value = 1386; /* --> facgt. */
case 2047: /* facle */
case 1386: /* facge */
value = 1386; /* --> facge. */
break;
case 2048: /* fcmle */
case 1399: /* fcmge */
value = 1399; /* --> fcmge. */
case 2048: /* faclt */
case 1387: /* facgt */
value = 1387; /* --> facgt. */
break;
case 2049: /* fcmlt */
case 1401: /* fcmgt */
value = 1401; /* --> fcmgt. */
case 2049: /* fcmle */
case 1400: /* fcmge */
value = 1400; /* --> fcmge. */
break;
case 2050: /* fcmlt */
case 1402: /* fcmgt */
value = 1402; /* --> fcmgt. */
break;
case 1263: /* fmov */
case 1408: /* fcpy */
value = 1408; /* --> fcpy. */
break;
case 1262: /* fmov */
case 1407: /* fcpy */
value = 1407; /* --> fcpy. */
case 1431: /* fdup */
value = 1431; /* --> fdup. */
break;
case 1261: /* fmov */
case 1430: /* fdup */
value = 1430; /* --> fdup. */
break;
case 1263: /* mov */
case 1761: /* orr */
value = 1761; /* --> orr. */
break;
case 2052: /* orn */
case 1264: /* mov */
case 1762: /* orr */
value = 1762; /* --> orr. */
break;
case 1266: /* mov */
case 1764: /* orr */
value = 1764; /* --> orr. */
case 2053: /* orn */
case 1763: /* orr */
value = 1763; /* --> orr. */
break;
case 1276: /* movs */
case 1765: /* orrs */
value = 1765; /* --> orrs. */
case 1267: /* mov */
case 1765: /* orr */
value = 1765; /* --> orr. */
break;
case 1271: /* mov */
case 1827: /* sel */
value = 1827; /* --> sel. */
case 1277: /* movs */
case 1766: /* orrs */
value = 1766; /* --> orrs. */
break;
case 1274: /* mov */
case 1272: /* mov */
case 1828: /* sel */
value = 1828; /* --> sel. */
break;
case 1275: /* mov */
case 1829: /* sel */
value = 1829; /* --> sel. */
break;
default: return NULL;
}

File diff suppressed because it is too large Load diff

View file

@ -311,17 +311,17 @@ static const unsigned op_enum_table [] =
391,
413,
415,
1266,
1271,
1264,
1263,
1267,
1274,
1276,
1272,
1265,
1264,
1268,
1275,
1277,
1273,
1279,
1278,
1274,
1280,
1279,
131,
};

View file

@ -3876,6 +3876,7 @@ struct aarch64_opcode aarch64_opcode_table[] =
CORE_INSN ("ic", 0xd5080000, 0xfff80000, ic_system, 0, OP2 (SYSREG_IC, Rt_SYS), QL_SRC_X, F_ALIAS | F_OPD1_OPT | F_DEFAULT (0x1F)),
CORE_INSN ("tlbi",0xd5080000, 0xfff80000, ic_system, 0, OP2 (SYSREG_TLBI, Rt_SYS), QL_SRC_X, F_ALIAS | F_OPD1_OPT | F_DEFAULT (0x1F)),
V8_7_INSN ("wfet", 0xd5031000, 0xffffffe0, ic_system, OP1 (Rd), QL_I1X, F_HAS_ALIAS),
V8_7_INSN ("wfit", 0xd5031020, 0xffffffe0, ic_system, OP1 (Rd), QL_I1X, F_HAS_ALIAS),
PREDRES_INSN ("cfp", 0xd50b7380, 0xffffffe0, ic_system, OP2 (SYSREG_SR, Rt), QL_SRC_X, F_ALIAS),
PREDRES_INSN ("dvp", 0xd50b73a0, 0xffffffe0, ic_system, OP2 (SYSREG_SR, Rt), QL_SRC_X, F_ALIAS),
PREDRES_INSN ("cpp", 0xd50b73e0, 0xffffffe0, ic_system, OP2 (SYSREG_SR, Rt), QL_SRC_X, F_ALIAS),