[llvm] [Hexagon][llvm-objdump] Start a fresh packet at symbol boundaries. (PR #163466)
Brian Cain via llvm-commits
llvm-commits at lists.llvm.org
Tue Oct 14 17:35:44 PDT 2025
================
@@ -567,6 +571,18 @@ DecodeStatus HexagonDisassembler::getSingleInstruction(MCInst &MI, MCInst &MCB,
return Result;
}
+Expected<bool> HexagonDisassembler::onSymbolStart(SymbolInfoTy &Symbol,
+ uint64_t &Size,
+ ArrayRef<uint8_t> Bytes,
+ uint64_t Address) const {
+ // At the start of a symbol, force a fresh packet by resetting any
+ // in-progress bundle state. This prevents packets from straddling label
+ // boundaries when data (e.g. jump tables) appears in between.
+ Size = 0;
+ resetBundle();
+ return true;
+}
----------------
androm3da wrote:
Is this method really `const`?
Whatever effect `resetBundle()` has, it seems like it has mutated this instance.
https://github.com/llvm/llvm-project/pull/163466
More information about the llvm-commits
mailing list