aboutsummaryrefslogtreecommitdiff
path: root/opcodes/aarch64-gen.c
diff options
context:
space:
mode:
authorMatthew Wahab <matthew.wahab@arm.com>2015-11-27 15:02:26 +0000
committerMatthew Wahab <matthew.wahab@arm.com>2015-11-27 15:05:09 +0000
commit35822b3812f74319dfad28876d37645589b83a80 (patch)
treed43a1073d6c7e3c1dcf236a29452fa07f33e8047 /opcodes/aarch64-gen.c
parent805035d70cd8637c169caf97800accdd267d1d8e (diff)
downloadgdb-35822b3812f74319dfad28876d37645589b83a80.zip
gdb-35822b3812f74319dfad28876d37645589b83a80.tar.gz
gdb-35822b3812f74319dfad28876d37645589b83a80.tar.bz2
[AArch64] Let aliased instructions be their preferred form.
Although the AArch64 backend supports aliased instructions, the aliasing forms are always preferred over the real instruction. This makes it awkward to handle instructions which have aliases but which are their own preferred form. This patch includes the instruction being aliased in the list of alternatives which is searched when considering which form to use. opcodes/ 2015-11-27 Matthew Wahab <matthew.wahab@arm.com> * aarch64-asm-2.c: Regenerate. * aarch64-dis-2.c: Regenerate. * aarch64-dis.c: Weaken assert. * aarch64-gen.c: Include the instruction in the list of its possible aliases. Change-Id: I1f23eb25fccef76a64d3d732d58761bd25fad94e
Diffstat (limited to 'opcodes/aarch64-gen.c')
-rw-r--r--opcodes/aarch64-gen.c4
1 files changed, 3 insertions, 1 deletions
diff --git a/opcodes/aarch64-gen.c b/opcodes/aarch64-gen.c
index bc1e58a..155ec85 100644
--- a/opcodes/aarch64-gen.c
+++ b/opcodes/aarch64-gen.c
@@ -693,12 +693,14 @@ find_alias_opcode (const aarch64_opcode *opcode)
/* Assume maximum of 8 disassemble preference candidates. */
const int max_num_aliases = 8;
const aarch64_opcode *ent;
- const aarch64_opcode *preferred[max_num_aliases];
+ const aarch64_opcode *preferred[max_num_aliases + 1];
opcode_node head, **next;
assert (opcode_has_alias (opcode));
i = 0;
+ if (opcode->name != NULL)
+ preferred[i++] = opcode;
ent = aarch64_opcode_table;
while (ent->name != NULL)
{