summaryrefslogtreecommitdiff
path: root/opcodes/aarch64-dis-2.c
diff options
context:
space:
mode:
authorAndre Vieira <andre.simoesdiasvieira@arm.com>2022-11-14 16:47:22 +0000
committerAndre Vieira <andre.simoesdiasvieira@arm.com>2022-11-14 16:47:22 +0000
commit1f7b42d52a8cb690c259eaa4975a608e82d7267a (patch)
tree8e0d1faeeb5f8cfb1cf2caf218936c625ac46e98 /opcodes/aarch64-dis-2.c
parent255571cdbf05213cc96feefb779c4158df453398 (diff)
downloadbinutils-gdb-1f7b42d52a8cb690c259eaa4975a608e82d7267a.tar.gz
aarch64: Add support for Common Short Sequence Compression extension
This patch adds support for the CSSC extension and its corresponding instructions: ABS, CNT, CTZ, SMAX, UMAX, SMIN, UMIN. gas/ChangeLog: * config/tc-aarch64.c (parse_operands): Handle new operand types. * doc/c-aarch64.texi: Document new extension. * testsuite/gas/aarch64/cssc.d: New test. * testsuite/gas/aarch64/cssc.s: New test. include/ChangeLog: * opcode/aarch64.h (AARCH64_FEATURE_CSSC): New feature Macro. (enum aarch64_opnd): New operand types. (enum aarch64_insn_class): New instruction class. opcodes/ChangeLog: * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Regenerate. * aarch64-opc-2.c: Regenerate. * aarch64-opc.c (operand_general_constraint_met_p): Update for new operand types. (aarch64_print_operand): Likewise. * aarch64-opc.h (enum aarch64_field_kind): Declare FLD_CSSC_imm8 field. * aarch64-tbl.h (aarch64_feature_cssc): Define new feature set. (CSSC): Define new feature set Macro. (CSSC_INSN): Define new instruction type. (aarch64_opcode_table): Add new instructions.
Diffstat (limited to 'opcodes/aarch64-dis-2.c')
-rw-r--r--opcodes/aarch64-dis-2.c177
1 files changed, 130 insertions, 47 deletions
diff --git a/opcodes/aarch64-dis-2.c b/opcodes/aarch64-dis-2.c
index 69a15789947..318b0717c39 100644
--- a/opcodes/aarch64-dis-2.c
+++ b/opcodes/aarch64-dis-2.c
@@ -4201,21 +4201,43 @@ aarch64_opcode_lookup_1 (uint32_t word)
}
else
{
- if (((word >> 30) & 0x1) == 0)
+ if (((word >> 14) & 0x1) == 0)
{
- /* 33222222222211111111110000000000
- 10987654321098765432109876543210
- x0x11010110xxxxxxx1000xxxxxxxxxx
- lslv. */
- return 713;
+ if (((word >> 30) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ x0x11010110xxxxxx01000xxxxxxxxxx
+ lslv. */
+ return 713;
+ }
+ else
+ {
+ if (((word >> 16) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ x1x11010110xxxx0x01000xxxxxxxxxx
+ abs. */
+ return 2640;
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ x1x11010110xxxx1x01000xxxxxxxxxx
+ paciza. */
+ return 701;
+ }
+ }
}
else
{
/* 33222222222211111111110000000000
10987654321098765432109876543210
- x1x11010110xxxxxxx1000xxxxxxxxxx
- paciza. */
- return 701;
+ xxx11010110xxxxxx11000xxxxxxxxxx
+ smax. */
+ return 2643;
}
}
}
@@ -4385,21 +4407,32 @@ aarch64_opcode_lookup_1 (uint32_t word)
}
else
{
- if (((word >> 30) & 0x1) == 0)
+ if (((word >> 14) & 0x1) == 0)
{
- /* 33222222222211111111110000000000
- 10987654321098765432109876543210
- x0x11010110xxxxxxx1010xxxxxxxxxx
- asrv. */
- return 717;
+ if (((word >> 30) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ x0x11010110xxxxxx01010xxxxxxxxxx
+ asrv. */
+ return 717;
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ x1x11010110xxxxxx01010xxxxxxxxxx
+ pacdza. */
+ return 703;
+ }
}
else
{
/* 33222222222211111111110000000000
10987654321098765432109876543210
- x1x11010110xxxxxxx1010xxxxxxxxxx
- pacdza. */
- return 703;
+ xxx11010110xxxxxx11010xxxxxxxxxx
+ smin. */
+ return 2645;
}
}
}
@@ -4409,11 +4442,22 @@ aarch64_opcode_lookup_1 (uint32_t word)
{
if (((word >> 14) & 0x1) == 0)
{
- /* 33222222222211111111110000000000
- 10987654321098765432109876543210
- xxx11010110xxxxxx00110xxxxxxxxxx
- autda. */
- return 699;
+ if (((word >> 16) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ xxx11010110xxxx0x00110xxxxxxxxxx
+ ctz. */
+ return 2642;
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ xxx11010110xxxx1x00110xxxxxxxxxx
+ autda. */
+ return 699;
+ }
}
else
{
@@ -4518,21 +4562,32 @@ aarch64_opcode_lookup_1 (uint32_t word)
}
else
{
- if (((word >> 30) & 0x1) == 0)
+ if (((word >> 14) & 0x1) == 0)
{
- /* 33222222222211111111110000000000
- 10987654321098765432109876543210
- x0x11010x10xxxxxxx1001xxxxxxxxxx
- lsrv. */
- return 715;
+ if (((word >> 30) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ x0x11010x10xxxxxx01001xxxxxxxxxx
+ lsrv. */
+ return 715;
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ x1x11010x10xxxxxx01001xxxxxxxxxx
+ pacizb. */
+ return 702;
+ }
}
else
{
/* 33222222222211111111110000000000
10987654321098765432109876543210
- x1x11010x10xxxxxxx1001xxxxxxxxxx
- pacizb. */
- return 702;
+ xxx11010x10xxxxxx11001xxxxxxxxxx
+ umax. */
+ return 2644;
}
}
}
@@ -4637,21 +4692,32 @@ aarch64_opcode_lookup_1 (uint32_t word)
}
else
{
- if (((word >> 30) & 0x1) == 0)
+ if (((word >> 14) & 0x1) == 0)
{
- /* 33222222222211111111110000000000
- 10987654321098765432109876543210
- x0x11010xx0xxxxxxx1011xxxxxxxxxx
- rorv. */
- return 719;
+ if (((word >> 30) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ x0x11010xx0xxxxxx01011xxxxxxxxxx
+ rorv. */
+ return 719;
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ x1x11010xx0xxxxxx01011xxxxxxxxxx
+ pacdzb. */
+ return 704;
+ }
}
else
{
/* 33222222222211111111110000000000
10987654321098765432109876543210
- x1x11010xx0xxxxxxx1011xxxxxxxxxx
- pacdzb. */
- return 704;
+ xxx11010xx0xxxxxx11011xxxxxxxxxx
+ umin. */
+ return 2646;
}
}
}
@@ -4661,11 +4727,22 @@ aarch64_opcode_lookup_1 (uint32_t word)
{
if (((word >> 14) & 0x1) == 0)
{
- /* 33222222222211111111110000000000
- 10987654321098765432109876543210
- xxx11010xx0xxxxxx00111xxxxxxxxxx
- autdb. */
- return 700;
+ if (((word >> 16) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ xxx11010xx0xxxx0x00111xxxxxxxxxx
+ cnt. */
+ return 2641;
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ xxx11010xx0xxxx1x00111xxxxxxxxxx
+ autdb. */
+ return 700;
+ }
}
else
{
@@ -25111,7 +25188,11 @@ aarch64_find_next_opcode (const aarch64_opcode *opcode)
case 2403: value = 2408; break; /* st1q --> st1q. */
case 2408: return NULL; /* st1q --> NULL. */
case 12: value = 19; break; /* add --> addg. */
- case 19: return NULL; /* addg --> NULL. */
+ case 19: value = 2636; break; /* addg --> smax. */
+ case 2636: value = 2637; break; /* smax --> umax. */
+ case 2637: value = 2638; break; /* umax --> smin. */
+ case 2638: value = 2639; break; /* smin --> umin. */
+ case 2639: return NULL; /* umin --> NULL. */
case 16: value = 20; break; /* sub --> subg. */
case 20: return NULL; /* subg --> NULL. */
case 971: value = 975; break; /* stnp --> stp. */
@@ -25830,6 +25911,8 @@ aarch64_extract_operand (const aarch64_operand *self,
case 190:
case 215:
case 221:
+ case 226:
+ case 227:
return aarch64_ext_imm (self, info, code, inst, errors);
case 44:
case 45: