aboutsummaryrefslogtreecommitdiff
path: root/opcodes/aarch64-dis-2.c
diff options
context:
space:
mode:
authorMatthew Malcomson <matthew.malcomson@arm.com>2019-11-07 16:38:59 +0000
committerMatthew Malcomson <matthew.malcomson@arm.com>2019-11-07 16:42:36 +0000
commitdf6780137dc9d832db8c5525ecc760acdbcde5c9 (patch)
tree13d42c9514e6d84686a0f15776cf27c70854cf32 /opcodes/aarch64-dis-2.c
parent8ae2d3d9eabfd3dff6a540e7789e368e8d75fbce (diff)
downloadgdb-df6780137dc9d832db8c5525ecc760acdbcde5c9.zip
gdb-df6780137dc9d832db8c5525ecc760acdbcde5c9.tar.gz
gdb-df6780137dc9d832db8c5525ecc760acdbcde5c9.tar.bz2
[binutils][aarch64] Bfloat16 enablement [2/X]
Hi, This patch is part of a series that adds support for Armv8.6-A (Matrix Multiply and BFloat16 extensions) to binutils. This patch introduces the following BFloat16 instructions to the aarch64 backend: bfdot, bfmmla, bfcvt, bfcvtnt, bfmlal[t/b], bfcvtn2. Committed on behalf of Mihail Ionescu. gas/ChangeLog: 2019-11-07 Mihail Ionescu <mihail.ionescu@arm.com> 2019-11-07 Matthew Malcomson <matthew.malcomson@arm.com> * config/tc-aarch64.c (vectype_to_qualifier): Special case the S_2H operand qualifier. * doc/c-aarch64.texi: Document bf16 and bf16mmla4 extensions. * testsuite/gas/aarch64/bfloat16.d: New test. * testsuite/gas/aarch64/bfloat16.s: New test. * testsuite/gas/aarch64/illegal-bfloat16.d: New test. * testsuite/gas/aarch64/illegal-bfloat16.l: New test. * testsuite/gas/aarch64/illegal-bfloat16.s: New test. * testsuite/gas/aarch64/sve-bfloat-movprfx.s: New test. * testsuite/gas/aarch64/sve-bfloat-movprfx.d: New test. include/ChangeLog: 2019-11-07 Mihail Ionescu <mihail.ionescu@arm.com> 2019-11-07 Matthew Malcomson <matthew.malcomson@arm.com> * opcode/aarch64.h (AARCH64_FEATURE_BFLOAT16): New feature macros. (AARCH64_ARCH_V8_6): Include BFloat16 feature macros. (enum aarch64_opnd_qualifier): Introduce new operand qualifier AARCH64_OPND_QLF_S_2H. (enum aarch64_insn_class): Introduce new class "bfloat16". (BFLOAT16_SVE_INSNC): New feature set for bfloat16 instructions to support the movprfx constraint. opcodes/ChangeLog: 2019-11-07 Mihail Ionescu <mihail.ionescu@arm.com> 2019-11-07 Matthew Malcomson <matthew.malcomson@arm.com> * aarch64-asm.c (aarch64_ins_reglane): Use AARCH64_OPND_QLF_S_2H in reglane special case. * aarch64-dis-2.c (aarch64_opcode_lookup_1, aarch64_find_next_opcode): Account for new instructions. * aarch64-dis.c (aarch64_ext_reglane): Use AARCH64_OPND_QLF_S_2H in reglane special case. * aarch64-opc.c (struct operand_qualifier_data): Add data for new AARCH64_OPND_QLF_S_2H qualifier. * aarch64-tbl.h (QL_BFDOT QL_BFDOT64, QL_BFDOT64I, QL_BFMMLA2, QL_BFCVT64, QL_BFCVTN64, QL_BFCVTN2_64): New qualifiers. (aarch64_feature_bfloat16, aarch64_feature_bfloat16_sve, aarch64_feature_bfloat16_bfmmla4): New feature sets. (BFLOAT_SVE, BFLOAT): New feature set macros. (BFLOAT_SVE_INSN, BFLOAT_BFMMLA4_INSN, BFLOAT_INSN): New macros to define BFloat16 instructions. (aarch64_opcode_table): Define new instructions bfdot, bfmmla, bfcvt, bfcvtnt, bfdot, bfdot, bfcvtn, bfmlal[b/t] bfcvtn2, bfcvt. Regression tested on aarch64-elf. Is it ok for trunk? Regards, Mihail
Diffstat (limited to 'opcodes/aarch64-dis-2.c')
-rw-r--r--opcodes/aarch64-dis-2.c336
1 files changed, 268 insertions, 68 deletions
diff --git a/opcodes/aarch64-dis-2.c b/opcodes/aarch64-dis-2.c
index 17edc76..cd1f6b9 100644
--- a/opcodes/aarch64-dis-2.c
+++ b/opcodes/aarch64-dis-2.c
@@ -8660,11 +8660,22 @@ aarch64_opcode_lookup_1 (uint32_t word)
{
if (((word >> 16) & 0x1) == 0)
{
- /* 33222222222211111111110000000000
- 10987654321098765432109876543210
- 011001x0100xxxx0101xxxxxxxxxxxxx
- fcvtnt. */
- return 2068;
+ if (((word >> 17) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ 011001x0100xxx00101xxxxxxxxxxxxx
+ fcvtnt. */
+ return 2068;
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ 011001x0100xxx10101xxxxxxxxxxxxx
+ bfcvtnt. */
+ return 2394;
+ }
}
else
{
@@ -9118,19 +9129,52 @@ aarch64_opcode_lookup_1 (uint32_t word)
{
if (((word >> 23) & 0x1) == 0)
{
- /* 33222222222211111111110000000000
- 10987654321098765432109876543210
- x11001x0011xxxxx010xxxxxxxxxxxxx
- st1b. */
- return 1868;
+ if (((word >> 31) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ 011001x0011xxxxx010xxxxxxxxxxxxx
+ bfdot. */
+ return 2391;
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ 111001x0011xxxxx010xxxxxxxxxxxxx
+ st1b. */
+ return 1868;
+ }
}
else
{
- /* 33222222222211111111110000000000
- 10987654321098765432109876543210
- x11001x0111xxxxx010xxxxxxxxxxxxx
- st1h. */
- return 1889;
+ if (((word >> 31) & 0x1) == 0)
+ {
+ if (((word >> 10) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ 011001x0111xxxxx010xx0xxxxxxxxxx
+ bfmlalb. */
+ return 2398;
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ 011001x0111xxxxx010xx1xxxxxxxxxx
+ bfmlalt. */
+ return 2397;
+ }
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ 111001x0111xxxxx010xxxxxxxxxxxxx
+ st1h. */
+ return 1889;
+ }
}
}
}
@@ -9169,11 +9213,44 @@ aarch64_opcode_lookup_1 (uint32_t word)
}
else
{
- /* 33222222222211111111110000000000
- 10987654321098765432109876543210
- x11001x0x11xxxxx1x0xxxxxxxxxxxxx
- st1h. */
- return 1890;
+ if (((word >> 23) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ x11001x0011xxxxx1x0xxxxxxxxxxxxx
+ bfdot. */
+ return 2390;
+ }
+ else
+ {
+ if (((word >> 31) & 0x1) == 0)
+ {
+ if (((word >> 10) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ 011001x0111xxxxx1x0xx0xxxxxxxxxx
+ bfmlalb. */
+ return 2396;
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ 011001x0111xxxxx1x0xx1xxxxxxxxxx
+ bfmlalt. */
+ return 2395;
+ }
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ 111001x0111xxxxx1x0xxxxxxxxxxxxx
+ st1h. */
+ return 1890;
+ }
+ }
}
}
}
@@ -9529,9 +9606,9 @@ aarch64_opcode_lookup_1 (uint32_t word)
}
else
{
- if (((word >> 20) & 0x1) == 0)
+ if (((word >> 22) & 0x1) == 0)
{
- if (((word >> 22) & 0x1) == 0)
+ if (((word >> 20) & 0x1) == 0)
{
if (((word >> 23) & 0x1) == 0)
{
@@ -9556,50 +9633,61 @@ aarch64_opcode_lookup_1 (uint32_t word)
{
/* 33222222222211111111110000000000
10987654321098765432109876543210
- x11001x00110xxxx111xxxxxxxxxxxxx
- st1b. */
- return 1874;
+ x11001x00011xxxx111xxxxxxxxxxxxx
+ st2b. */
+ return 1909;
}
else
{
/* 33222222222211111111110000000000
10987654321098765432109876543210
- x11001x01110xxxx111xxxxxxxxxxxxx
- st1h. */
- return 1895;
+ x11001x01011xxxx111xxxxxxxxxxxxx
+ st2h. */
+ return 1913;
}
}
}
else
{
- if (((word >> 22) & 0x1) == 0)
+ if (((word >> 23) & 0x1) == 0)
{
- if (((word >> 23) & 0x1) == 0)
+ if (((word >> 31) & 0x1) == 0)
{
/* 33222222222211111111110000000000
10987654321098765432109876543210
- x11001x00011xxxx111xxxxxxxxxxxxx
- st2b. */
- return 1909;
+ 011001x0011xxxxx111xxxxxxxxxxxxx
+ bfmmla. */
+ return 2392;
}
else
{
- /* 33222222222211111111110000000000
- 10987654321098765432109876543210
- x11001x01011xxxx111xxxxxxxxxxxxx
- st2h. */
- return 1913;
+ if (((word >> 20) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ 111001x00110xxxx111xxxxxxxxxxxxx
+ st1b. */
+ return 1874;
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ 111001x00111xxxx111xxxxxxxxxxxxx
+ st4b. */
+ return 1925;
+ }
}
}
else
{
- if (((word >> 23) & 0x1) == 0)
+ if (((word >> 20) & 0x1) == 0)
{
/* 33222222222211111111110000000000
10987654321098765432109876543210
- x11001x00111xxxx111xxxxxxxxxxxxx
- st4b. */
- return 1925;
+ x11001x01110xxxx111xxxxxxxxxxxxx
+ st1h. */
+ return 1895;
}
else
{
@@ -13993,11 +14081,22 @@ aarch64_opcode_lookup_1 (uint32_t word)
{
if (((word >> 22) & 0x1) == 0)
{
- /* 33222222222211111111110000000000
- 10987654321098765432109876543210
- 011001x1x0001x10101xxxxxxxxxxxxx
- fcvtx. */
- return 2070;
+ if (((word >> 23) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ 011001x100001x10101xxxxxxxxxxxxx
+ fcvtx. */
+ return 2070;
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ 011001x110001x10101xxxxxxxxxxxxx
+ bfcvt. */
+ return 2393;
+ }
}
else
{
@@ -16503,11 +16602,55 @@ aarch64_opcode_lookup_1 (uint32_t word)
}
else
{
- /* 33222222222211111111110000000000
- 10987654321098765432109876543210
- xx101110xx0xxxxx1x1xx1xxxxxxxxxx
- fcadd. */
- return 373;
+ if (((word >> 11) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ xx101110xx0xxxxx1x1x01xxxxxxxxxx
+ fcadd. */
+ return 373;
+ }
+ else
+ {
+ if (((word >> 12) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ xx101110xx0xxxxx1x1011xxxxxxxxxx
+ bfmmla. */
+ return 2401;
+ }
+ else
+ {
+ if (((word >> 23) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ xx1011100x0xxxxx1x1111xxxxxxxxxx
+ bfdot. */
+ return 2399;
+ }
+ else
+ {
+ if (((word >> 30) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ x01011101x0xxxxx1x1111xxxxxxxxxx
+ bfmlalb. */
+ return 2406;
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ x11011101x0xxxxx1x1111xxxxxxxxxx
+ bfmlalt. */
+ return 2405;
+ }
+ }
+ }
+ }
}
}
}
@@ -17060,21 +17203,43 @@ aarch64_opcode_lookup_1 (uint32_t word)
}
else
{
- if (((word >> 30) & 0x1) == 0)
+ if (((word >> 23) & 0x1) == 0)
{
- /* 33222222222211111111110000000000
- 10987654321098765432109876543210
- 00001110xx1xxxx1011010xxxxxxxxxx
- fcvtn. */
- return 178;
+ if (((word >> 30) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ 000011100x1xxxx1011010xxxxxxxxxx
+ fcvtn. */
+ return 178;
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ 010011100x1xxxx1011010xxxxxxxxxx
+ fcvtn2. */
+ return 179;
+ }
}
else
{
- /* 33222222222211111111110000000000
- 10987654321098765432109876543210
- 01001110xx1xxxx1011010xxxxxxxxxx
- fcvtn2. */
- return 179;
+ if (((word >> 30) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ 000011101x1xxxx1011010xxxxxxxxxx
+ bfcvtn. */
+ return 2402;
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ 010011101x1xxxx1011010xxxxxxxxxx
+ bfcvtn2. */
+ return 2403;
+ }
}
}
}
@@ -22165,11 +22330,44 @@ aarch64_opcode_lookup_1 (uint32_t word)
}
else
{
- /* 33222222222211111111110000000000
- 10987654321098765432109876543210
- xxx01111xxxxxxxx1111x0xxxxxxxxxx
- sqrdmlsh. */
- return 130;
+ if (((word >> 29) & 0x1) == 0)
+ {
+ if (((word >> 23) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ xx0011110xxxxxxx1111x0xxxxxxxxxx
+ bfdot. */
+ return 2400;
+ }
+ else
+ {
+ if (((word >> 30) & 0x1) == 0)
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ x00011111xxxxxxx1111x0xxxxxxxxxx
+ bfmlalb. */
+ return 2408;
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ x10011111xxxxxxx1111x0xxxxxxxxxx
+ bfmlalt. */
+ return 2407;
+ }
+ }
+ }
+ else
+ {
+ /* 33222222222211111111110000000000
+ 10987654321098765432109876543210
+ xx101111xxxxxxxx1111x0xxxxxxxxxx
+ sqrdmlsh. */
+ return 130;
+ }
}
}
}
@@ -22787,6 +22985,8 @@ aarch64_find_next_opcode (const aarch64_opcode *opcode)
case 823: return NULL; /* fsqrt --> NULL. */
case 831: value = 832; break; /* frintz --> frintz. */
case 832: return NULL; /* frintz --> NULL. */
+ case 824: value = 2404; break; /* fcvt --> bfcvt. */
+ case 2404: return NULL; /* bfcvt --> NULL. */
case 833: value = 834; break; /* frinta --> frinta. */
case 834: return NULL; /* frinta --> NULL. */
case 835: value = 836; break; /* frintx --> frintx. */