diff options
author | Max Filippov <jcmvbkbc@gmail.com> | 2021-05-01 02:22:19 -0700 |
---|---|---|
committer | Max Filippov <jcmvbkbc@gmail.com> | 2021-05-01 02:47:30 -0700 |
commit | 6aee2cb249daca249353d0dcceb0329a1662623c (patch) | |
tree | 89226724c64cb1f448bd778b9ba4bed6c4c07d74 /opcodes | |
parent | 698d38980e3a339459bc767213d43f0c908d5a60 (diff) | |
download | binutils-6aee2cb249daca249353d0dcceb0329a1662623c.zip binutils-6aee2cb249daca249353d0dcceb0329a1662623c.tar.gz binutils-6aee2cb249daca249353d0dcceb0329a1662623c.tar.bz2 |
opcodes: xtensa: support branch visualization
2021-05-01 Max Filippov <jcmvbkbc@gmail.com>
opcodes/
* xtensa-dis.c (print_insn_xtensa): Fill in info->insn_type and
info->insn_info_valid.
Diffstat (limited to 'opcodes')
-rw-r--r-- | opcodes/ChangeLog | 5 | ||||
-rw-r--r-- | opcodes/xtensa-dis.c | 10 |
2 files changed, 15 insertions, 0 deletions
diff --git a/opcodes/ChangeLog b/opcodes/ChangeLog index f0840e3..979b18c 100644 --- a/opcodes/ChangeLog +++ b/opcodes/ChangeLog @@ -1,3 +1,8 @@ +2021-05-01 Max Filippov <jcmvbkbc@gmail.com> + + * xtensa-dis.c (print_insn_xtensa): Fill in info->insn_type and + info->insn_info_valid. + 2021-04-26 Jan Beulich <jbeulich@suse.com> * i386-opc.tbl (lea): Add Optimize. diff --git a/opcodes/xtensa-dis.c b/opcodes/xtensa-dis.c index cfa058f..c1cf4c8 100644 --- a/opcodes/xtensa-dis.c +++ b/opcodes/xtensa-dis.c @@ -412,6 +412,9 @@ print_insn_xtensa (bfd_vma memaddr, struct disassemble_info *info) if (nslots > 1) (*info->fprintf_func) (info->stream, "{ "); + info->insn_type = dis_nonbranch; + info->insn_info_valid = 1; + first_slot = 1; for (n = 0; n < nslots; n++) { @@ -425,6 +428,13 @@ print_insn_xtensa (bfd_vma memaddr, struct disassemble_info *info) (*info->fprintf_func) (info->stream, "%s", xtensa_opcode_name (isa, opc)); + if (xtensa_opcode_is_branch (isa, opc)) + info->insn_type = dis_condbranch; + else if (xtensa_opcode_is_jump (isa, opc)) + info->insn_type = dis_branch; + else if (xtensa_opcode_is_call (isa, opc)) + info->insn_type = dis_jsr; + /* Print the operands (if any). */ noperands = xtensa_opcode_num_operands (isa, opc); first = 1; |