diff options
author | Andrew Burgess <aburgess@redhat.com> | 2021-09-28 22:11:42 +0100 |
---|---|---|
committer | Andrew Burgess <aburgess@redhat.com> | 2021-11-26 10:18:35 +0000 |
commit | 3a337a86d9d273b5da57b1cd8ecec4baa7e95e33 (patch) | |
tree | b7b3022634d0a3bc5e1c6b12bbeed1c8ac337555 /gdb/riscv-tdep.c | |
parent | 4780e5e4933a2497a5aecc4ceabbbb8e82aaf822 (diff) | |
download | gdb-3a337a86d9d273b5da57b1cd8ecec4baa7e95e33.zip gdb-3a337a86d9d273b5da57b1cd8ecec4baa7e95e33.tar.gz gdb-3a337a86d9d273b5da57b1cd8ecec4baa7e95e33.tar.bz2 |
opcodes/riscv: add disassembler options support to libopcodes
In preparation for the next commit, which will add GDB support for
RISC-V disassembler options, this commit restructures how the
disassembler options are managed within libopcodes.
The implementation provided here is based on this mailing list patch
which was never committed:
https://sourceware.org/pipermail/binutils/2021-January/114944.html
which in turn took inspiration from the MIPS implementation of the
same feature.
The biggest changes from the original mailing list post are:
1. The GDB changes have been split into a separate patch, and
2. The `riscv_option_args_privspec` variable, which held the valid
priv-spec values is now gone, instead we use the `riscv_priv_specs`
array from bfd/cpu-riscv.c instead.
Co-authored-by: Simon Cook <simon.cook@embecosm.com>
include/ChangeLog:
* dis-asm.h (disassembler_options_riscv): Declare.
opcodes/ChangeLog:
* riscv-dis.c (enum riscv_option_arg_t): New enum typedef.
(riscv_options): New static global.
(disassembler_options_riscv): New function.
(print_riscv_disassembler_options): Rewrite to use
disassembler_options_riscv.
Diffstat (limited to 'gdb/riscv-tdep.c')
0 files changed, 0 insertions, 0 deletions