]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commit
RISC-V: avoid use of match_opcode() in riscv_insn_types[]
authorJan Beulich <jbeulich@suse.com>
Fri, 5 Jul 2024 06:39:28 +0000 (08:39 +0200)
committerJan Beulich <jbeulich@suse.com>
Fri, 5 Jul 2024 06:39:28 +0000 (08:39 +0200)
commit8c1d0aea1df1ad659d1c46a816ee2e41cbcdce77
tree6f82c98c5892f43be6687b227cd44e16c61b44c3
parente6292a4b2c7ff58f40f7717eb3659996fe5deae3
RISC-V: avoid use of match_opcode() in riscv_insn_types[]

As of 27b33966b18e ("RISC-V: disallow x0 with certain macro-insns") the
.match_func field may be NULL for entries used for assembly only, which
is the case for the entire table. With .match and .mask both zero the
function would only ever succeed anyway. Save almost a hundred base
relocations in the final executable by using NULL instead.
opcodes/riscv-opc.c