aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorRichard Sandiford <richard.sandiford@arm.com>2021-12-02 15:00:56 +0000
committerRichard Sandiford <richard.sandiford@arm.com>2021-12-02 15:00:56 +0000
commitb3e59f8873b9f07e84b19a19d40810f9a61b6d62 (patch)
tree50f74009c8830755ab4abcd476faad6584b49cd1 /include
parentf96093c1f53bf4a930073f6ae862910583d79866 (diff)
downloadgdb-b3e59f8873b9f07e84b19a19d40810f9a61b6d62.zip
gdb-b3e59f8873b9f07e84b19a19d40810f9a61b6d62.tar.gz
gdb-b3e59f8873b9f07e84b19a19d40810f9a61b6d62.tar.bz2
aarch64: Tweak insn sequence code
libopcodes has some code to check constraints across sequences of consecutive instructions. It was added to support MOVPRFX sequences but is going to be useful for the Armv8.8-A MOPS feature as well. Currently the structure has one field to record the instruction that started a sequence and another to record the remaining instructions in the sequence. It's more convenient for the MOPS code if we put the instructions into a single array instead. No functional change intended. include/ * opcode/aarch64.h (aarch64_instr_sequence): Replace num_insns and current_insns with num_added_insns and num_allocated_insns. opcodes/ * aarch64-opc.c (add_insn_to_sequence): New function. (init_insn_sequence): Update for new aarch64_instr_sequence layout. Add the first instruction to the inst array. (verify_constraints): Update for new aarch64_instr_sequence layout. Don't add the last instruction to the array.
Diffstat (limited to 'include')
-rw-r--r--include/opcode/aarch64.h12
1 files changed, 5 insertions, 7 deletions
diff --git a/include/opcode/aarch64.h b/include/opcode/aarch64.h
index 9448d35..fa79aa9 100644
--- a/include/opcode/aarch64.h
+++ b/include/opcode/aarch64.h
@@ -1290,15 +1290,13 @@ struct aarch64_operand_error
dependencies for both assembler and disassembler. */
struct aarch64_instr_sequence
{
- /* The instruction that caused this sequence to be opened. */
+ /* The instructions in the sequence, starting with the one that
+ caused it to be opened. */
aarch64_inst *instr;
- /* The number of instructions the above instruction allows one to be kept in the
- sequence before an automatic close is done. */
- int num_insns;
- /* The instructions currently added to the sequence. */
- aarch64_inst **current_insns;
/* The number of instructions already in the sequence. */
- int next_insn;
+ int num_added_insns;
+ /* The number of instructions allocated to the sequence. */
+ int num_allocated_insns;
};
/* Encoding entrypoint. */