[llvm] [feature][riscv] handle target address calculation in llvm-objdump disassembly for riscv (PR #144620)
Arjun Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 23 15:52:56 PDT 2025
arjunUpatel wrote:
> Regarding the testing, is it really necessary to use a cross-project-test for these, rather than an llvm-mc or similar directly?
The object file generated by `llvm-mc` does not seem to be able to encode instructions in the floating point and zcb extensions properly. When the output is disassembled with `llvm-objdump`, we get `<unknown>` for these instructions instead of address resolution as seen here:
```
2e: 00102427 <unknown>
32: 00110097 auipc ra, 0x110
36: fda080e7 jalr -0x26(ra) <func>
3a: 640d lui s0, 0x3
3c: 8800 <unknown>
```
Assembled with `llvm-mc -triple=riscv64 -mattr=+f,+c,+zcb riscv64-ar-coverage.s -o riscv64-ar-coverage.s`. Could I be missing some options that might be causing this?
> Does the testing work if you instead rely on relocations to evaluate branch etc targets?
I'm not sure I understand what you mean by this. Can you please elaborate?
https://github.com/llvm/llvm-project/pull/144620
More information about the llvm-commits
mailing list