[lld] [llvm] [Hexagon] Add support for decoding PLT symbols (PR #123425)
Fangrui Song via llvm-commits
llvm-commits at lists.llvm.org
Sun Jan 26 09:32:32 PST 2025
================
@@ -734,8 +734,44 @@ class HexagonMCInstrAnalysis : public MCInstrAnalysis {
Target = Value;
return true;
}
+
+ uint32_t getValueFromMask(uint32_t Instruction, uint32_t Mask) const {
+ uint32_t Result = 0;
+ size_t Off = 0;
+ for (uint32_t Bit = 0; Bit != sizeof(uint32_t) * CHAR_BIT; ++Bit) {
----------------
MaskRay wrote:
Is the value `(1u << llvm::popcount(Instruction & Mask)) - 1` ?
If (Instruction & Mask) could be UINT32_MAX, 1u<<32 would trigger UB, but I suspect it would not happen here.
https://github.com/llvm/llvm-project/pull/123425
More information about the llvm-commits
mailing list