[ARC] Disassemble correctly extension instructions.
authorClaudiu Zissulescu <claziss@synopsys.com>
Thu, 15 Sep 2016 10:24:24 +0000 (12:24 +0200)
committerClaudiu Zissulescu <claziss@synopsys.com>
Fri, 16 Sep 2016 12:49:33 +0000 (14:49 +0200)
commitf807f43d7eba5bba3042554f9b3e884d71a68309
treeec9c600313b94d50ab2982fb20db1c256b799add
parent0a0df908277bc9c63ec546fb7cd15ea14ad4d9a0
[ARC] Disassemble correctly extension instructions.

For each MAJOR-MINOR opcode tuple, we can have either a 3-operand, or
2-operand, or a single operand instruction format, depending on the
values present in i-field, and a-field.

The disassembler is reading the section containing the extension
instruction format and stores them in a table.  Each table element
represents a linked list with encodings for a particular MAJOR-MINOR
tuple.

The current implementation checks only against the first element of
the list, hence, the issue.

This patch is walking the linked list until empty or finds an opcode
match.  It also adds a test outlining the found problem.

opcodes/
2016-09-15  Claudiu Zissulescu  <claziss@synopsys.com>

* arc-dis.c (find_format): Walk the linked list pointed by einsn.

gas/
2016-09-15  Claudiu Zissulescu  <claziss@synopsys.com>

* testsuite/gas/arc/textinsnxop.d: New file.
* testsuite/gas/arc/textinsnxop.s: Likewise.
gas/ChangeLog
gas/testsuite/gas/arc/textinsnxop.d [new file with mode: 0644]
gas/testsuite/gas/arc/textinsnxop.s [new file with mode: 0644]
opcodes/ChangeLog
opcodes/arc-dis.c
This page took 0.024752 seconds and 4 git commands to generate.