-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RISC-V: Use faster hash table on disassembling
This commit replaces riscv_hash with sorted and partitioned hash table to make the disassembler faster (general idea is based on SPARC architecture implementation). It expects around 14-20% performance improvement on linked RISC-V programs and about 50% or more on entire area of large binary files (including but not limited to RISC-V code). opcodes/ChangeLog: * riscv-dis.c (OP_HASH_IDX): Optimize a bit and mask only real 16-bit insn with OP_MASK_OP2. Make it global. (compare_opcodes, OP_HASH_LEN): New helpers. (riscv_hash, riscv_opcodes_sorted): New. (build_riscv_opcodes_hash_table): Hash table building function. (riscv_disassemble_insn): Use faster hash table. Split match and print steps.
- Loading branch information
Showing
1 changed file
with
138 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters