[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
Fri Jul 4 00:00:19 PDT 2025
================
@@ -177,17 +177,12 @@ class LLVM_ABI MCInstrAnalysis {
return false;
}
- /// Given a branch instruction try to get the address the branch
- /// targets. Return true on success, and the address in Target.
- virtual bool evaluateBranch(const MCInst &Inst, uint64_t Addr, uint64_t Size,
- uint64_t &Target,
- const MCSubtargetInfo *STI = nullptr) const;
-
- /// Given an instruction that accesses a memory address, try to compute
- /// the target address. Return true on success, and the address in \p Target.
- virtual bool evaluateInstruction(const MCInst &Inst, uint64_t Addr,
- uint64_t Size, uint64_t &Target,
- const MCSubtargetInfo &STI) const;
+ /// Given an instruction that accesses memory, computes a memory address, or
+ // branches to another address, try to get the address these instructions
+ // target. Return true on success, and the address in \p Target.
----------------
jh7370 wrote:
```suggestion
/// Given an instruction that accesses memory or
/// that branches to another address, try to get the address it targets.
/// Return true on success, and the address in \p Target.
```
And reflow to 80 characters.
https://github.com/llvm/llvm-project/pull/144620
More information about the llvm-commits
mailing list