[PATCH 37/57][Arm][OBJDUMP] Add framework for MVE instructions
Andre Vieira (lists)
andre.simoesdiasvieira@arm.com
Wed May 1 17:38:00 GMT 2019
Hi,
This patch adds a framework to OBJDUMP to support MVE instructions.
Since MVE and NEON share some encoding space, but may need a slightly
different decoding, we decided to split up instruction decoding based on
whether '-marmv8.1-m.main' has been passed to OBJDUMP. The new function
'is_mve_architecture' will check this and direct 'print_insn_thumb32' to
either use 'print_insn_neon' or 'print_insn_mve'.
This framework also includes helper functions to determine encoding
conflicts, undefined encodings and unpredictable encodings. These are
further implemented for each relevant instruction in subsequent patches.
By encoding conflicts we refer to encodings where two different
instructions have overlapping base opcodes, but can be distinguished
based on specific operand values. In the ISA specification such
'conflicts' can be identified by looking for clauses that redirect you
to 'Related Encodings' or specific instructions. The VMLALDAV
instruction is an example of the latter, where if RdaHi (bits 20-22) has
value 7, then the encoding is actually to be decoded as the VMLADAV
instruction.
This patch also sets force_thumb when passing '-marmv8.1-m.main' to
objdump. This makes it unnecessary to use '-M force-thumb' when
disassembling for non-elf targets.
opcodes/ChangeLog:
2019-05-01 Andre Vieira <andre.simoesdiasvieira@arm.com>
Michael Collison <michael.collison@arm.com>
* arm-dis.c (enum mve_instructions): New enum.
(enum mve_unpredictable): Likewise.
(enum mve_undefined): Likewise.
(struct mopcode32): New struct.
(is_mve_okay_in_it): New function.
(is_mve_architecture): Likewise.
(arm_decode_field): Likewise.
(arm_decode_field_multiple): Likewise.
(is_mve_encoding_conflict): Likewise.
(is_mve_undefined): Likewise.
(is_mve_unpredictable): Likewise.
(print_mve_undefined): Likewise.
(print_mve_unpredictable): Likewise.
(print_insn_coprocessor_1): Use arm_decode_field_multiple.
(print_insn_mve): New function.
(print_insn_thumb32): Handle MVE architecture.
(select_arm_features): Force thumb for Armv8.1-m Mainline.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: 37.patch
Type: text/x-patch
Size: 9456 bytes
Desc: not available
URL: <https://sourceware.org/pipermail/binutils/attachments/20190501/824abc70/attachment.bin>
More information about the Binutils
mailing list