[PATCH] D143345: [RFC][RISCV] Don't disassemble `addi`s with relocations as `mv`s
Craig Topper via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Wed Feb 15 16:03:48 PST 2023
craig.topper added a comment.
In D143345#4130565 <https://reviews.llvm.org/D143345#4130565>, @luismarques wrote:
> In D143345#4130539 <https://reviews.llvm.org/D143345#4130539>, @luismarques wrote:
>
>> I'm not sure I understand your second question, though (it's late here...). I assume it's more than just a curiosity and it has some relation to this patch but it's not clear to me what the implication is. Yes, without `-r` the disassemblies can be a bit puzzling at times, and you need to anticipate that some 0 immediates are misleading, and they won't actually be zero in the final binary. You have the same problem with `mv`s, just exacerbated because then you have to think that they aren't even true `mv` instructions at all. Is your point that when you do use `-r` it should be clear that the `mv`s aren't actually moves and the `addi`s aren't actually zero? Apologies if I'm being dense.
>
> I assume it's the latter. It's true that with `-r` the spurious `mv`s are less of a problem, though I think it's still something to be avoided if we can.
Yes it was the latter. I was just curious.
It'd be really cool if we could use the relocation to print %pcrel_lo(sym) instead of 0. But I don't know how much work that would be.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D143345/new/
https://reviews.llvm.org/D143345
More information about the llvm-commits
mailing list