Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
RISC-V: Move disassembler private data initialization
The original intent of this commit was to move disassembler's private data initialization. Since Nelson did the same in the commit 26e9197 ("RISC-V: Minor improvements for dis-assembler."), this commit only moves the initialization function (to fit much larger reorganization of the disassembler). Nelson's commit also allows storing mapping symbol and/or section-related information to riscv_private_data. In performance perspective, it also has a penalty. However, it can be easily paid back by other optimizations and it makes implementing some optimizations easier. Also, because xcalloc cannot fail (exit(1) occurs if the memory allocation fails), the author temporarily removed the error handling here. opcodes/ChangeLog: * riscv-dis.c (init_riscv_dis_private_data): Moved from riscv_init_disasm_info. (riscv_disassemble_insn): Move private data initialization to init_riscv_dis_private_data. Remove unnecessary error handling. (riscv_init_disasm_info): Move to init_riscv_dis_private_data. (print_insn_riscv): Call init_riscv_dis_private_data.
- Loading branch information