diff options
author | Srinath Parvathaneni <srinath.parvathaneni@arm.com> | 2024-01-09 10:30:20 +0000 |
---|---|---|
committer | srinath <srinath.parvathaneni@arm.com> | 2024-01-09 10:39:37 +0000 |
commit | e318eb09309c641b2029c828fe37ecd1fbbeb92f (patch) | |
tree | e7c76d6f05581459fd39778680b1b6af9931e7be /opcodes | |
parent | e244fa1a6be53ba8025005ae0fee2e420075db9f (diff) | |
download | gdb-e318eb09309c641b2029c828fe37ecd1fbbeb92f.zip gdb-e318eb09309c641b2029c828fe37ecd1fbbeb92f.tar.gz gdb-e318eb09309c641b2029c828fe37ecd1fbbeb92f.tar.bz2 |
aarch64: ADD FEAT_THE RCWCAS instructions.
This patch adds support for FEAT_THE doubleword and quadword instructions.
doubleword insturctions are enabled by "+the" flag whereas quadword
instructions are enabled on passing both "+the and +d128" flags.
Support for following sets of instructions is added in this patch.
Read check write compare and swap doubleword:
(rcwcas, rcwcasa, rcwcasal, rcwcasl)
Read check write compare and swap quadword:
(rcwcasp,rcwcaspa, rcwcaspal, rcwcaspl)
Read check write software compare and swap doubleword:
(rcwscas, rcwscasa, rcwscasal, rcwscasl)
Read check write software compare and swap quadword:
(rcwscasp, rcwscaspa, rcwscaspal, rcwscaspl)
Read check write atomic bit clear on doubleword:
(rcwclr, rcwclra, rcwclral, rcwclrl)
Read check write atomic bit clear on quadword:
(rcwclrp, rcwclrpa, rcwclrpal, rcwclrpl)
Read check write software atomic bit clear on doubleword:
(rcwsclr, rcwsclra, rcwsclral, rcwsclrl)
Read check write software atomic bit clear on quadword:
(rcwsclrp,rcwsclrpa, rcwsclrpal,rcwsclrpl)
Read check write atomic bit set on doubleword:
(rcwset,rcwseta, rcwsetal,rcwsetl)
Read check write atomic bit set on quadword:
(rcwsetp,rcwsetpa,rcwsetpal,rcwsetpl)
Read check write software atomic bit set on doubleword:
(rcwsset,rcwsseta,rcwssetal,rcwssetl)
Read check write software atomic bit set on quadword:
(rcwssetp,rcwssetpa,rcwssetpal,rcwssetpl)
Read check write swap doubleword:
(rcwswp,rcwswpa,rcwswpal,rcwswpl)
Read check write swap quadword:
(rcwswpp,rcwswppa, rcwswppal,rcwswppl)
Read check write software swap doubleword:
(rcwsswp,rcwsswpa,rcwsswpal,rcwsswpl)
Read check write software swap quadword:
(rcwsswpp,rcwsswppa,rcwsswppal,rcwsswppl)
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/aarch64-dis-2.c | 982 | ||||
-rw-r--r-- | opcodes/aarch64-tbl.h | 118 |
2 files changed, 961 insertions, 139 deletions
diff --git a/opcodes/aarch64-dis-2.c b/opcodes/aarch64-dis-2.c index b543bd3..cfaecb5 100644 --- a/opcodes/aarch64-dis-2.c +++ b/opcodes/aarch64-dis-2.c @@ -7019,11 +7019,99 @@ aarch64_opcode_lookup_1 (uint32_t word) } else { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx111000xx1xxxxx101000xxxxxxxxxx - st64bv0. */ - return 994; + if (((word >> 22) & 0x1) == 0) + { + if (((word >> 23) & 0x1) == 0) + { + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0111000001xxxxx101000xxxxxxxxxx + rcwswp. */ + return 3247; + } + else + { + if (((word >> 31) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 01111000001xxxxx101000xxxxxxxxxx + rcwsswp. */ + return 3255; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 11111000001xxxxx101000xxxxxxxxxx + st64bv0. */ + return 994; + } + } + } + else + { + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0111000101xxxxx101000xxxxxxxxxx + rcwswpa. */ + return 3248; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1111000101xxxxx101000xxxxxxxxxx + rcwsswpa. */ + return 3256; + } + } + } + else + { + if (((word >> 23) & 0x1) == 0) + { + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0111000011xxxxx101000xxxxxxxxxx + rcwswpl. */ + return 3250; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1111000011xxxxx101000xxxxxxxxxx + rcwsswpl. */ + return 3258; + } + } + else + { + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0111000111xxxxx101000xxxxxxxxxx + rcwswpal. */ + return 3249; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1111000111xxxxx101000xxxxxxxxxx + rcwsswpal. */ + return 3257; + } + } + } } } else @@ -7294,11 +7382,99 @@ aarch64_opcode_lookup_1 (uint32_t word) } else { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx111000xx1xxxxx100100xxxxxxxxxx - st64b. */ - return 992; + if (((word >> 22) & 0x1) == 0) + { + if (((word >> 23) & 0x1) == 0) + { + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0111000001xxxxx100100xxxxxxxxxx + rcwclr. */ + return 3215; + } + else + { + if (((word >> 31) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 01111000001xxxxx100100xxxxxxxxxx + rcwsclr. */ + return 3223; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 11111000001xxxxx100100xxxxxxxxxx + st64b. */ + return 992; + } + } + } + else + { + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0111000101xxxxx100100xxxxxxxxxx + rcwclra. */ + return 3216; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1111000101xxxxx100100xxxxxxxxxx + rcwsclra. */ + return 3224; + } + } + } + else + { + if (((word >> 23) & 0x1) == 0) + { + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0111000011xxxxx100100xxxxxxxxxx + rcwclrl. */ + return 3218; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1111000011xxxxx100100xxxxxxxxxx + rcwsclrl. */ + return 3226; + } + } + else + { + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0111000111xxxxx100100xxxxxxxxxx + rcwclral. */ + return 3217; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1111000111xxxxx100100xxxxxxxxxx + rcwsclral. */ + return 3225; + } + } + } } } else @@ -7577,11 +7753,99 @@ aarch64_opcode_lookup_1 (uint32_t word) } else { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx111000xx1xxxxx101100xxxxxxxxxx - st64bv. */ - return 993; + if (((word >> 22) & 0x1) == 0) + { + if (((word >> 23) & 0x1) == 0) + { + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0111000001xxxxx101100xxxxxxxxxx + rcwset. */ + return 3231; + } + else + { + if (((word >> 31) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 01111000001xxxxx101100xxxxxxxxxx + rcwsset. */ + return 3239; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 11111000001xxxxx101100xxxxxxxxxx + st64bv. */ + return 993; + } + } + } + else + { + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0111000101xxxxx101100xxxxxxxxxx + rcwseta. */ + return 3232; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1111000101xxxxx101100xxxxxxxxxx + rcwsseta. */ + return 3240; + } + } + } + else + { + if (((word >> 23) & 0x1) == 0) + { + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0111000011xxxxx101100xxxxxxxxxx + rcwsetl. */ + return 3234; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1111000011xxxxx101100xxxxxxxxxx + rcwssetl. */ + return 3242; + } + } + else + { + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0111000111xxxxx101100xxxxxxxxxx + rcwsetal. */ + return 3233; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1111000111xxxxx101100xxxxxxxxxx + rcwssetal. */ + return 3241; + } + } + } } } else @@ -8101,51 +8365,139 @@ aarch64_opcode_lookup_1 (uint32_t word) { if (((word >> 12) & 0x1) == 0) { - if (((word >> 15) & 0x1) == 0) + if (((word >> 13) & 0x1) == 0) { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx011001001xxxxx0xx000xxxxxxxxxx - stzgm. */ - return 964; + if (((word >> 15) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + xx011001001xxxxx0x0000xxxxxxxxxx + stzgm. */ + return 964; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + xx011001001xxxxx1x0000xxxxxxxxxx + swpp. */ + return 1194; + } } else { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx011001001xxxxx1xx000xxxxxxxxxx - swpp. */ - return 1194; + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0011001001xxxxxxx1000xxxxxxxxxx + rcwswpp. */ + return 3251; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1011001001xxxxxxx1000xxxxxxxxxx + rcwsswpp. */ + return 3259; + } } } else { if (((word >> 13) & 0x1) == 0) { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx011001001xxxxxxx0100xxxxxxxxxx - ldclrp. */ - return 1186; + if (((word >> 15) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + xx011001001xxxxx0x0100xxxxxxxxxx + ldclrp. */ + return 1186; + } + else + { + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0011001001xxxxx1x0100xxxxxxxxxx + rcwclrp. */ + return 3219; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1011001001xxxxx1x0100xxxxxxxxxx + rcwsclrp. */ + return 3227; + } + } } else { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx011001001xxxxxxx1100xxxxxxxxxx - ldsetp. */ - return 1190; + if (((word >> 15) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + xx011001001xxxxx0x1100xxxxxxxxxx + ldsetp. */ + return 1190; + } + else + { + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0011001001xxxxx1x1100xxxxxxxxxx + rcwsetp. */ + return 3235; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1011001001xxxxx1x1100xxxxxxxxxx + rcwssetp. */ + return 3243; + } + } } } } } else { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx01100100xxxxxxxxxx10xxxxxxxxxx - stg. */ - return 881; + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x001100100xxxxxxxxxx10xxxxxxxxxx + rcwcas. */ + return 3199; + } + else + { + if (((word >> 31) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 0101100100xxxxxxxxxx10xxxxxxxxxx + rcwscas. */ + return 3207; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 1101100100xxxxxxxxxx10xxxxxxxxxx + stg. */ + return 881; + } + } } } else @@ -8347,11 +8699,33 @@ aarch64_opcode_lookup_1 (uint32_t word) } else { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx011001001xxxxxxxxxx1xxxxxxxxxx - stg. */ - return 885; + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0011001001xxxxxxxxxx1xxxxxxxxxx + rcwcasp. */ + return 3203; + } + else + { + if (((word >> 31) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 01011001001xxxxxxxxxx1xxxxxxxxxx + rcwscasp. */ + return 3211; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 11011001001xxxxxxxxxx1xxxxxxxxxx + stg. */ + return 885; + } + } } } } @@ -8441,49 +8815,137 @@ aarch64_opcode_lookup_1 (uint32_t word) { if (((word >> 12) & 0x1) == 0) { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - x0011001011xxxxxxxx000xxxxxxxxxx - swppl. */ - return 1197; - } - else - { if (((word >> 13) & 0x1) == 0) { /* 33222222222211111111110000000000 10987654321098765432109876543210 - x0011001011xxxxxxx0100xxxxxxxxxx - ldclrpl. */ - return 1189; + x0011001011xxxxxxx0000xxxxxxxxxx + swppl. */ + return 1197; } else { /* 33222222222211111111110000000000 10987654321098765432109876543210 - x0011001011xxxxxxx1100xxxxxxxxxx - ldsetpl. */ - return 1193; + x0011001011xxxxxxx1000xxxxxxxxxx + rcwswppl. */ + return 3254; + } + } + else + { + if (((word >> 13) & 0x1) == 0) + { + if (((word >> 15) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0011001011xxxxx0x0100xxxxxxxxxx + ldclrpl. */ + return 1189; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0011001011xxxxx1x0100xxxxxxxxxx + rcwclrpl. */ + return 3222; + } + } + else + { + if (((word >> 15) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0011001011xxxxx0x1100xxxxxxxxxx + ldsetpl. */ + return 1193; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0011001011xxxxx1x1100xxxxxxxxxx + rcwsetpl. */ + return 3238; + } } } } else { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - x1011001011xxxxxxxxx00xxxxxxxxxx - ldg. */ - return 934; + if (((word >> 31) & 0x1) == 0) + { + if (((word >> 12) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 01011001011xxxxxxxx000xxxxxxxxxx + rcwsswppl. */ + return 3262; + } + else + { + if (((word >> 13) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 01011001011xxxxxxx0100xxxxxxxxxx + rcwsclrpl. */ + return 3230; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 01011001011xxxxxxx1100xxxxxxxxxx + rcwssetpl. */ + return 3246; + } + } + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 11011001011xxxxxxxxx00xxxxxxxxxx + ldg. */ + return 934; + } } } } else { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx01100101xxxxxxxxxx10xxxxxxxxxx - stzg. */ - return 882; + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x001100101xxxxxxxxxx10xxxxxxxxxx + rcwcasl. */ + return 3202; + } + else + { + if (((word >> 31) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 0101100101xxxxxxxxxx10xxxxxxxxxx + rcwscasl. */ + return 3210; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 1101100101xxxxxxxxxx10xxxxxxxxxx + stzg. */ + return 882; + } + } } } else @@ -8663,11 +9125,33 @@ aarch64_opcode_lookup_1 (uint32_t word) } else { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx011001011xxxxxxxxxx1xxxxxxxxxx - stzg. */ - return 886; + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0011001011xxxxxxxxxx1xxxxxxxxxx + rcwcaspl. */ + return 3206; + } + else + { + if (((word >> 31) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 01011001011xxxxxxxxxx1xxxxxxxxxx + rcwscaspl. */ + return 3214; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 11011001011xxxxxxxxxx1xxxxxxxxxx + stzg. */ + return 886; + } + } } } } @@ -8767,42 +9251,86 @@ aarch64_opcode_lookup_1 (uint32_t word) { if (((word >> 12) & 0x1) == 0) { - if (((word >> 15) & 0x1) == 0) + if (((word >> 13) & 0x1) == 0) { - if (((word >> 22) & 0x1) == 0) + if (((word >> 15) & 0x1) == 0) { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx011001101xxxxx0xx000xxxxxxxxxx - stgm. */ - return 963; + if (((word >> 22) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + xx011001101xxxxx0x0000xxxxxxxxxx + stgm. */ + return 963; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + xx011001111xxxxx0x0000xxxxxxxxxx + ldgm. */ + return 962; + } } else { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx011001111xxxxx0xx000xxxxxxxxxx - ldgm. */ - return 962; + if (((word >> 22) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + xx011001101xxxxx1x0000xxxxxxxxxx + swppa. */ + return 1195; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + xx011001111xxxxx1x0000xxxxxxxxxx + swppal. */ + return 1196; + } } } else { if (((word >> 22) & 0x1) == 0) { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx011001101xxxxx1xx000xxxxxxxxxx - swppa. */ - return 1195; + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0011001101xxxxxxx1000xxxxxxxxxx + rcwswppa. */ + return 3252; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1011001101xxxxxxx1000xxxxxxxxxx + rcwsswppa. */ + return 3260; + } } else { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx011001111xxxxx1xx000xxxxxxxxxx - swppal. */ - return 1196; + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0011001111xxxxxxx1000xxxxxxxxxx + rcwswppal. */ + return 3253; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1011001111xxxxxxx1000xxxxxxxxxx + rcwsswppal. */ + return 3261; + } } } } @@ -8810,40 +9338,128 @@ aarch64_opcode_lookup_1 (uint32_t word) { if (((word >> 13) & 0x1) == 0) { - if (((word >> 22) & 0x1) == 0) + if (((word >> 15) & 0x1) == 0) { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx011001101xxxxxxx0100xxxxxxxxxx - ldclrpa. */ - return 1187; + if (((word >> 22) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + xx011001101xxxxx0x0100xxxxxxxxxx + ldclrpa. */ + return 1187; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + xx011001111xxxxx0x0100xxxxxxxxxx + ldclrpal. */ + return 1188; + } } else { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx011001111xxxxxxx0100xxxxxxxxxx - ldclrpal. */ - return 1188; + if (((word >> 22) & 0x1) == 0) + { + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0011001101xxxxx1x0100xxxxxxxxxx + rcwclrpa. */ + return 3220; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1011001101xxxxx1x0100xxxxxxxxxx + rcwsclrpa. */ + return 3228; + } + } + else + { + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0011001111xxxxx1x0100xxxxxxxxxx + rcwclrpal. */ + return 3221; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1011001111xxxxx1x0100xxxxxxxxxx + rcwsclrpal. */ + return 3229; + } + } } } else { - if (((word >> 22) & 0x1) == 0) + if (((word >> 15) & 0x1) == 0) { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx011001101xxxxxxx1100xxxxxxxxxx - ldsetpa. */ - return 1191; + if (((word >> 22) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + xx011001101xxxxx0x1100xxxxxxxxxx + ldsetpa. */ + return 1191; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + xx011001111xxxxx0x1100xxxxxxxxxx + ldsetpal. */ + return 1192; + } } else { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx011001111xxxxxxx1100xxxxxxxxxx - ldsetpal. */ - return 1192; + if (((word >> 22) & 0x1) == 0) + { + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0011001101xxxxx1x1100xxxxxxxxxx + rcwsetpa. */ + return 3236; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1011001101xxxxx1x1100xxxxxxxxxx + rcwssetpa. */ + return 3244; + } + } + else + { + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0011001111xxxxx1x1100xxxxxxxxxx + rcwsetpal. */ + return 3237; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x1011001111xxxxx1x1100xxxxxxxxxx + rcwssetpal. */ + return 3245; + } + } } } } @@ -8853,19 +9469,63 @@ aarch64_opcode_lookup_1 (uint32_t word) { if (((word >> 22) & 0x1) == 0) { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx01100110xxxxxxxxxx10xxxxxxxxxx - st2g. */ - return 883; + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x001100110xxxxxxxxxx10xxxxxxxxxx + rcwcasa. */ + return 3200; + } + else + { + if (((word >> 31) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 0101100110xxxxxxxxxx10xxxxxxxxxx + rcwscasa. */ + return 3208; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 1101100110xxxxxxxxxx10xxxxxxxxxx + st2g. */ + return 883; + } + } } else { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx01100111xxxxxxxxxx10xxxxxxxxxx - stz2g. */ - return 884; + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x001100111xxxxxxxxxx10xxxxxxxxxx + rcwcasal. */ + return 3201; + } + else + { + if (((word >> 31) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 0101100111xxxxxxxxxx10xxxxxxxxxx + rcwscasal. */ + return 3209; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 1101100111xxxxxxxxxx10xxxxxxxxxx + stz2g. */ + return 884; + } + } } } } @@ -9180,19 +9840,63 @@ aarch64_opcode_lookup_1 (uint32_t word) { if (((word >> 22) & 0x1) == 0) { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx011001101xxxxxxxxxx1xxxxxxxxxx - st2g. */ - return 887; + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0011001101xxxxxxxxxx1xxxxxxxxxx + rcwcaspa. */ + return 3204; + } + else + { + if (((word >> 31) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 01011001101xxxxxxxxxx1xxxxxxxxxx + rcwscaspa. */ + return 3212; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 11011001101xxxxxxxxxx1xxxxxxxxxx + st2g. */ + return 887; + } + } } else { - /* 33222222222211111111110000000000 - 10987654321098765432109876543210 - xx011001111xxxxxxxxxx1xxxxxxxxxx - stz2g. */ - return 888; + if (((word >> 30) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + x0011001111xxxxxxxxxx1xxxxxxxxxx + rcwcaspal. */ + return 3205; + } + else + { + if (((word >> 31) & 0x1) == 0) + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 01011001111xxxxxxxxxx1xxxxxxxxxx + rcwscaspal. */ + return 3213; + } + else + { + /* 33222222222211111111110000000000 + 10987654321098765432109876543210 + 11011001111xxxxxxxxxx1xxxxxxxxxx + stz2g. */ + return 888; + } + } } } } diff --git a/opcodes/aarch64-tbl.h b/opcodes/aarch64-tbl.h index 288b3dd..2ddeca9 100644 --- a/opcodes/aarch64-tbl.h +++ b/opcodes/aarch64-tbl.h @@ -1189,6 +1189,12 @@ QLF5(X, X, X, X, NIL), \ } +/* e.g. RCWCASP <Xt1>, <Xt1+1>, <Xt2>, <Xt2+1>, [<Xn|SP>{,#0}]. */ +#define QL_X4NIL \ +{ \ + QLF5(X, X, X, X, NIL), \ +} + /* e.g. STXP <Ws>, <Xt1>, <Xt2>, [<Xn|SP>{,#0}]. */ #define QL_R3_LDST_EXC \ { \ @@ -2604,6 +2610,10 @@ static const aarch64_feature_set aarch64_feature_ite = AARCH64_FEATURE (ITE); static const aarch64_feature_set aarch64_feature_d128 = AARCH64_FEATURE (D128); +static const aarch64_feature_set aarch64_feature_the = + AARCH64_FEATURE (THE); +static const aarch64_feature_set aarch64_feature_d128_the = + AARCH64_FEATURES (2, D128, THE); #define CORE &aarch64_feature_v8 #define FP &aarch64_feature_fp @@ -2668,6 +2678,8 @@ static const aarch64_feature_set aarch64_feature_d128 = #define GCS &aarch64_feature_gcs #define ITE &aarch64_feature_ite #define D128 &aarch64_feature_d128 +#define THE &aarch64_feature_the +#define D128_THE &aarch64_feature_d128_the #define CORE_INSN(NAME,OPCODE,MASK,CLASS,OP,OPS,QUALS,FLAGS) \ { NAME, OPCODE, MASK, CLASS, OP, CORE, OPS, QUALS, FLAGS, 0, 0, NULL } @@ -2823,6 +2835,10 @@ static const aarch64_feature_set aarch64_feature_d128 = { NAME, OPCODE, MASK, gcs, 0, GCS, OPS, QUALS, FLAGS, 0, 0, NULL } #define D128_INSN(NAME,OPCODE,MASK,OPS,QUALS,FLAGS) \ { NAME, OPCODE, MASK, ic_system, 0, D128, OPS, QUALS, FLAGS, 0, 0, NULL } +#define THE_INSN(NAME,OPCODE,MASK,OPS,QUALS,FLAGS) \ + { NAME, OPCODE, MASK, the, 0, THE, OPS, QUALS, FLAGS, 0, 0, NULL } +#define D128_THE_INSN(NAME,OPCODE,MASK,OPS,QUALS,FLAGS) \ + { NAME, OPCODE, MASK, the, 0, D128_THE, OPS, QUALS, FLAGS, 0, 0, NULL } #define MOPS_CPY_OP1_OP2_PME_INSN(NAME, OPCODE, MASK, FLAGS, CONSTRAINTS) \ MOPS_INSN (NAME, OPCODE, MASK, 0, \ @@ -6154,6 +6170,108 @@ const struct aarch64_opcode aarch64_opcode_table[] = ITE_INSN ("trcit", 0xd50b72e0, 0xffffffe0, ic_system, OP1 (Rt), QL_I1X, F_ALIAS), +/* Read check write compare and swap doubleword in memory instructions. */ + THE_INSN("rcwcas", 0x19200800, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwcasa", 0x19a00800, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwcasal", 0x19e00800, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwcasl", 0x19600800, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + +/* Read check write compare and swap quadword in memory instructions. */ + D128_THE_INSN("rcwcasp", 0x19200c00, 0xffe0fc00, OP5 (Rs, PAIRREG, Rt, PAIRREG, ADDR_SIMPLE), QL_X4NIL, 0), + D128_THE_INSN("rcwcaspa", 0x19a00c00, 0xffe0fc00, OP5 (Rs, PAIRREG, Rt, PAIRREG, ADDR_SIMPLE), QL_X4NIL, 0), + D128_THE_INSN("rcwcaspal", 0x19e00c00, 0xffe0fc00, OP5 (Rs, PAIRREG, Rt, PAIRREG, ADDR_SIMPLE), QL_X4NIL, 0), + D128_THE_INSN("rcwcaspl", 0x19600c00, 0xffe0fc00, OP5 (Rs, PAIRREG, Rt, PAIRREG, ADDR_SIMPLE), QL_X4NIL, 0), + +/* Read check write software compare and swap doubleword in memory + instructions. */ + THE_INSN("rcwscas", 0x59200800, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwscasa", 0x59a00800, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwscasal", 0x59e00800, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwscasl", 0x59600800, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + +/* Read check write software compare and swap quadword in memory + instructions. */ + D128_THE_INSN("rcwscasp", 0x59200c00, 0xffe0fc00, OP5 (Rs, PAIRREG, Rt, PAIRREG, ADDR_SIMPLE), QL_X4NIL, 0), + D128_THE_INSN("rcwscaspa", 0x59a00c00, 0xffe0fc00, OP5 (Rs, PAIRREG, Rt, PAIRREG, ADDR_SIMPLE), QL_X4NIL, 0), + D128_THE_INSN("rcwscaspal", 0x59e00c00, 0xffe0fc00, OP5 (Rs, PAIRREG, Rt, PAIRREG, ADDR_SIMPLE), QL_X4NIL, 0), + D128_THE_INSN("rcwscaspl", 0x59600c00, 0xffe0fc00, OP5 (Rs, PAIRREG, Rt, PAIRREG, ADDR_SIMPLE), QL_X4NIL, 0), + +/* Read check write atomic bit clear on doubleword in memory instructions. */ + THE_INSN("rcwclr", 0x38209000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwclra", 0x38a09000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwclral", 0x38e09000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwclrl", 0x38609000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + +/* Read check write atomic bit clear on quadword in memory instructions. */ + D128_THE_INSN("rcwclrp", 0x19209000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + D128_THE_INSN("rcwclrpa", 0x19a09000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + D128_THE_INSN("rcwclrpal", 0x19e09000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + D128_THE_INSN("rcwclrpl", 0x19609000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + +/* Read check write software atomic bit clear on doubleword in memory + instructions. */ + THE_INSN("rcwsclr", 0x78209000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwsclra", 0x78a09000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwsclral", 0x78e09000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwsclrl", 0x78609000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + +/* Read check write software atomic bit clear on quadword in memory + instructions. */ + D128_THE_INSN("rcwsclrp", 0x59209000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + D128_THE_INSN("rcwsclrpa", 0x59a09000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + D128_THE_INSN("rcwsclrpal", 0x59e09000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + D128_THE_INSN("rcwsclrpl", 0x59609000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + +/* Read check write atomic bit set on doubleword in memory instructions. */ + THE_INSN("rcwset", 0x3820b000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwseta", 0x38a0b000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwsetal", 0x38e0b000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwsetl", 0x3860b000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + +/* Read check write atomic bit set on quadword in memory instructions. */ + D128_THE_INSN("rcwsetp", 0x1920b000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + D128_THE_INSN("rcwsetpa", 0x19a0b000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + D128_THE_INSN("rcwsetpal", 0x19e0b000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + D128_THE_INSN("rcwsetpl", 0x1960b000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + +/* Read check write software atomic bit set on doubleword in memory + instructions. */ + THE_INSN("rcwsset", 0x7820b000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwsseta", 0x78a0b000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwssetal", 0x78e0b000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwssetl", 0x7860b000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + +/* Read check write software atomic bit set on quadword in memory + instructions. */ + D128_THE_INSN("rcwssetp", 0x5920b000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + D128_THE_INSN("rcwssetpa", 0x59a0b000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + D128_THE_INSN("rcwssetpal", 0x59e0b000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + D128_THE_INSN("rcwssetpl", 0x5960b000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + +/* Read check write swap doubleword in memory instructions. */ + THE_INSN("rcwswp", 0x3820a000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwswpa", 0x38a0a000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwswpal", 0x38e0a000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwswpl", 0x3860a000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + +/* Read check write swap quadword in memory instructions. */ + D128_THE_INSN("rcwswpp", 0x1920a000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + D128_THE_INSN("rcwswppa", 0x19a0a000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + D128_THE_INSN("rcwswppal", 0x19e0a000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + D128_THE_INSN("rcwswppl", 0x1960a000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + +/* Read check write software swap doubleword in memory instructions. */ + THE_INSN("rcwsswp", 0x7820a000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwsswpa", 0x78a0a000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwsswpal", 0x78e0a000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + THE_INSN("rcwsswpl", 0x7860a000, 0xffe0fc00, OP3 (Rs, Rt, ADDR_SIMPLE), QL_X2NIL, 0), + +/* Read check write software swap quadword in memory instructions. */ + D128_THE_INSN("rcwsswpp", 0x5920a000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + D128_THE_INSN("rcwsswppa", 0x59a0a000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + D128_THE_INSN("rcwsswppal", 0x59e0a000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + D128_THE_INSN("rcwsswppl", 0x5960a000, 0xffe0fc00, OP3 (Rt, Rs, ADDR_SIMPLE), QL_X2NIL, 0), + {0, 0, 0, 0, 0, 0, {}, {}, 0, 0, 0, NULL}, }; |