Help needed - to add custom instruction to binutils-gdb
Jim Wilson
jimw@sifive.com
Mon Jun 7 18:40:05 GMT 2021
On Sat, Jun 5, 2021 at 6:34 PM Vijay Kumar Salian via Binutils <
binutils@sourceware.org> wrote:
> I tried adding a new instruction to binutils-gdb. I was able to add the
> instruction to assembler and could even assemble the assembly code with new
> instructions. But then I tried to disassemble the ELF file to see the
> instruction, which displayed some other name for the instruction mnemonic.
> Can you please let me know where I can get the details on adding the new
> instructions for risc-v?
>
It would help if you showed your patch, or at least explained what your
patch is doing. Without the patch, all we can do is guess.
Perhaps you accidentally used the same encoding as another instruction?
There is no guide for how to add an instruction, and the exact process
sometimes changes as the binutils sources continue to evolve. The basic
process doesn't change though. An example of a discussion can be found
here https://github.com/riscv/riscv-binutils-gdb/issues/250
Jim
More information about the Binutils
mailing list