RISC-V: Dump CSR according to the elf privileged spec attributes.
authorNelson Chu <nelson.chu@sifive.com>
Tue, 8 Dec 2020 06:39:01 +0000 (14:39 +0800)
committerNelson Chu <nelson.chu@sifive.com>
Thu, 10 Dec 2020 02:43:18 +0000 (10:43 +0800)
commit8152e0407c25612c6a8079cc8e1a5c1fe14afdbf
treedaa8aa52a6cb7ed7f284c8ea31019af9d502badf
parent729a53530e86972d1143553a415db34e6e01d5d2
RISC-V: Dump CSR according to the elf privileged spec attributes.

opcodes/
    * disassemble.h (riscv_get_disassembler): Declare.
    * disassemble.c (disassembler): Changed to riscv_get_disassembler.
    * riscv-dis.c (riscv_get_disassembler): Check the elf privileged spec
    attributes before calling print_insn_riscv.
    (parse_riscv_dis_option): Same as the assembler, the priority of elf
    attributes are higher than the options.  If we find the privileged
    attributes, but the -Mpriv-spec= is different, then output error/warning
    and still use the elf attributes set.
opcodes/ChangeLog
opcodes/disassemble.c
opcodes/disassemble.h
opcodes/riscv-dis.c