[lld] [llvm] [feature][riscv] handle target address calculation in llvm-objdump disassembly for riscv (PR #109914)
Arjun Patel via llvm-commits
llvm-commits at lists.llvm.org
Mon Jun 9 13:14:44 PDT 2025
================
@@ -1520,9 +1520,9 @@ collectLocalBranchTargets(ArrayRef<uint8_t> Bytes, MCInstrAnalysis *MIA,
if (MIA) {
if (Disassembled) {
uint64_t Target;
- bool TargetKnown = MIA->evaluateBranch(Inst, Index, Size, Target);
- if (TargetKnown && (Target >= Start && Target < End) &&
- !Targets.count(Target)) {
+ bool BranchTargetKnown = MIA->evaluateBranch(Inst, Index, Size, Target);
+ if (BranchTargetKnown && (Target >= Start && Target < End) &&
+ !Labels.count(Target)) {
----------------
arjunUpatel wrote:
You are right, the code should reflect `!Targets.count` instead of `!Labels.count`. It seems like in the period of my inactivity with this PR, someone else happened to converge upon the same change (making sure the container of the obtained Target is empty before adding stuff). They just hapened to implement it in a different way.
https://github.com/llvm/llvm-project/pull/109914
More information about the llvm-commits
mailing list