Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
As the author mentioned in a previous commit ("RISC-V: Minimize disassembler state initialization"), calling `riscv_subset_supports' repeatedly harms the performance in a measurable way (about 3-13% in total). As a simple solution, this commit now caches instruction class support as a signed char array. It is expected to have 5-7% performance improvements when disassembling linked RISC-V ELF programs using `objdump'. include/ChangeLog: * opcode/riscv.h (enum riscv_insn_class): Add `NUM_INSN_CLASSES'. opcodes/ChangeLog: * riscv-dis.c (riscv_insn_support_cache) New. (init_riscv_dis_state_for_arch): Clear the instruction support cache. (riscv_disassemble_insn): Cache the instruction support.
- Loading branch information