[llvm] [feature][riscv] handle target address calculation in llvm-objdump disassembly for riscv (PR #144620)

James Henderson via llvm-commits llvm-commits at lists.llvm.org
Mon Jun 23 00:26:33 PDT 2025


https://github.com/jh7370 commented:

I'm not sure there's a huge amount I can comment on here. From an llvm-objdump perspective, the approach is quite simple, but I do think there is room for improvement around the details. I can't really provide much better feedback than that, because the disassembler is more the MC layer, which my knowledge doesn't cover especially well.

Regarding the testing, is it really necessary to use a cross-project-test for these, rather than an llvm-mc or similar directly? I'm guessing the key thing is that you want the target addresses evaluated, while llvm-mc simply creates addresses? Does the testing work if you instead rely on relocations to evaluate branch etc targets? Because if so, putting the test under llvm/test/tools/llvm-objdump and using llvm-mc to assemble the instructions would make more sense, since that wouldn't require multiple projects to be enabled to work.

https://github.com/llvm/llvm-project/pull/144620


More information about the llvm-commits mailing list