You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
0 commit comments