[lld] [llvm] [AArch64][llvm-objdump] Fix arm64_32 symbolization (PR #171164)
David Tellenbach via llvm-commits
llvm-commits at lists.llvm.org
Tue Dec 16 04:21:27 PST 2025
================
@@ -123,8 +129,15 @@ bool AArch64ExternalSymbolizer::tryAddingSymbolicOperand(
const MCRegisterInfo &MCRI = *Ctx.getRegisterInfo();
// otool expects the fully encoded ADD/LDR instruction to be passed in
// as the value here, so reconstruct it:
- unsigned EncodedInst =
- MI.getOpcode() == AArch64::ADDXri ? 0x91000000: 0xF9400000;
+ unsigned EncodedInst;
+ if (MI.getOpcode() == AArch64::ADDXri)
+ EncodedInst = 0x91000000;
+ else if (MI.getOpcode() == AArch64::ADDWri)
+ EncodedInst = 0x11000000;
+ else if (MI.getOpcode() == AArch64::LDRXui)
+ EncodedInst = 0xF9400000;
+ else // LDRWui
+ EncodedInst = 0xB9400000;
EncodedInst |= Value << 10; // imm12 [+ shift:2 for ADD]
----------------
dtellenbach wrote:
Please update the comment, currently it's add specific.
https://github.com/llvm/llvm-project/pull/171164
More information about the llvm-commits
mailing list