]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
RISC-V: Avoid parsing arch string repeatedly for dis-assembler
authorNelson Chu <nelson@rivosinc.com>
Thu, 13 Mar 2025 02:31:36 +0000 (10:31 +0800)
committerNelson Chu <nelson@rivosinc.com>
Tue, 18 Mar 2025 04:16:27 +0000 (12:16 +0800)
commite4c9f0e6c3a665c0a711dc6bf74e37dfc370e28c
treed9cbd3444c027067b7439d8e10b5a1453f032791
parent433ccc440b51673ed3fce85a8dedca24f16ccab2
RISC-V: Avoid parsing arch string repeatedly for dis-assembler

Since we now always generate $x+isa for now, these would increase the
dis-assemble time by parsing the same architecture string repeatedly.  We
already have `arch_str' field into `subset_list' to record the current
architecture stirng, but it's only useful for assembler, since dis-assembler
and linker don't need it before.  Now for dis-assembler, we just need to
update the `arch_str' after parsing the architecture stirng, and then avoid
parsing repeatedly if the strings are the same.
bfd/elfnn-riscv.c
bfd/elfxx-riscv.c
bfd/elfxx-riscv.h
gas/config/tc-riscv.c
opcodes/riscv-dis.c