diff options
author | Richard Sandiford <richard.sandiford@arm.com> | 2016-09-21 16:52:30 +0100 |
---|---|---|
committer | Richard Sandiford <richard.sandiford@arm.com> | 2016-09-21 16:52:30 +0100 |
commit | 0c608d6b62f9164203685ab125b4b3ad113eb26e (patch) | |
tree | e01cae5bc0e942f357798fcd92160aec3e2521ee /gas | |
parent | 01dbfe4c0e2b832c6b1076e8d373b162e2faa376 (diff) | |
download | gdb-0c608d6b62f9164203685ab125b4b3ad113eb26e.zip gdb-0c608d6b62f9164203685ab125b4b3ad113eb26e.tar.gz gdb-0c608d6b62f9164203685ab125b4b3ad113eb26e.tar.bz2 |
[AArch64][SVE 20/32] Add support for tied operands
SVE has some instructions in which the same register appears twice
in the assembly string, once as an input and once as an output.
This patch adds a general mechanism for that.
The patch needs to add new information to the instruction entries.
One option would have been to extend the flags field of the opcode
to 64 bits (since we already rely on 64-bit integers being available
on the host). However, the *_INSN macros mean that it's easy to add
new information as top-level fields without affecting the existing
table entries too much. Going for that option seemed to give slightly
neater code.
include/
* opcode/aarch64.h (aarch64_opcode): Add a tied_operand field.
(AARCH64_OPDE_UNTIED_OPERAND): New aarch64_operand_error_kind.
opcodes/
* aarch64-tbl.h (CORE_INSN, __FP_INSN, SIMD_INSN, CRYP_INSN)
(_CRC_INSN, _LSE_INSN, _LOR_INSN, RDMA_INSN, FP16_INSN, SF16_INSN)
(V8_2_INSN, aarch64_opcode_table): Initialize tied_operand field.
* aarch64-opc.c (aarch64_match_operands_constraint): Check for
tied operands.
gas/
* config/tc-aarch64.c (output_operand_error_record): Handle
AARCH64_OPDE_UNTIED_OPERAND.
Diffstat (limited to 'gas')
-rw-r--r-- | gas/ChangeLog | 5 | ||||
-rw-r--r-- | gas/config/tc-aarch64.c | 5 |
2 files changed, 10 insertions, 0 deletions
diff --git a/gas/ChangeLog b/gas/ChangeLog index ac9d359..425c37a 100644 --- a/gas/ChangeLog +++ b/gas/ChangeLog @@ -1,5 +1,10 @@ 2016-09-21 Richard Sandiford <richard.sandiford@arm.com> + * config/tc-aarch64.c (output_operand_error_record): Handle + AARCH64_OPDE_UNTIED_OPERAND. + +2016-09-21 Richard Sandiford <richard.sandiford@arm.com> + * config/tc-aarch64.c (find_best_match): Simplify, allowing an instruction with all-NIL qualifiers to fail to match. diff --git a/gas/config/tc-aarch64.c b/gas/config/tc-aarch64.c index f50de70..8335230 100644 --- a/gas/config/tc-aarch64.c +++ b/gas/config/tc-aarch64.c @@ -4371,6 +4371,11 @@ output_operand_error_record (const operand_error_record *record, char *str) } break; + case AARCH64_OPDE_UNTIED_OPERAND: + as_bad (_("operand %d must be the same register as operand 1 -- `%s'"), + detail->index + 1, str); + break; + case AARCH64_OPDE_OUT_OF_RANGE: if (detail->data[0] != detail->data[1]) as_bad (_("%s out of range %d to %d at operand %d -- `%s'"), |