[opcodes, ARM, 14/16] Add mode availability to coprocessor table entries
authorAndre Vieira <andre.simoesdiasvieira@arm.com>
Mon, 15 Apr 2019 11:14:38 +0000 (12:14 +0100)
committerAndre Vieira <andre.simoesdiasvieira@arm.com>
Mon, 15 Apr 2019 11:32:01 +0000 (12:32 +0100)
commit6b0dd094741bc5e9963eabc64a7030783e471941
tree9b51fdb0c08a52c361bc6a566332875baf0acfb9
parent4b5a202f107b5393da30fd0b488c3eff2bc758a5
[opcodes, ARM, 14/16] Add mode availability to coprocessor table entries

The coprocessor_opcodes table is used both to share commonalities in coprocessor-related instructions and to avoid duplication between Arm and Thumb mode. However, some instructions do have differences between Arm and Thumb. For instance, vldmia allows PC as base register in Arm mode but not in Thumb mode.

In that very case the distinction becomes necessary because the encoding with PC as base register is used in Thumb mode to denote a VSCCLRM. It is thus necessary to distinguish what is Arm or Thumb only from what is shared. This patch adds an extra field to the coprocessor_opcodes table entries to indicate what mode is a given instruction available in. The print_insn_coprocessor then uses that field to determine if an entry that matched the mark and value checked should be allowed to match or not given the current mode.

ChangeLog entry is as follows:

*** opcodes/ChangeLog ***

2019-04-15  Thomas Preud'homme  <thomas.preudhomme@arm.com>

* arm-dis.c (enum isa): New enum.
(struct sopcode32): New structure.
(coprocessor_opcodes): change type of entries to struct sopcode32 and
set isa field of all current entries to ANY.
(print_insn_coprocessor): Change type of insn to struct sopcode32.
Only match an entry if its isa field allows the current mode.
opcodes/ChangeLog
opcodes/arm-dis.c
This page took 0.023647 seconds and 4 git commands to generate.