Borrow from the logic for 'jal' in MipsAsmParser::processInstruction
and add the extra condition of bypassing CALL16 if the destination symbol
is an ELF symbol with STB_LOCAL binding.
Details
Details
Diff Detail
Diff Detail
- Repository
- rL LLVM
Event Timeline
Comment Actions
Splitting this out from D33948. However, I'm also interested in the patch you mentioned in the other review for fixing forward-declared local symbols. It may be that fixing that resolves the use case that prompted this patch, so I'm not sure if checking STB_LOCAL will still be required.
Comment Actions
LGTM apart from formatting. Do you need me to commit this for you?
lib/Target/Mips/AsmParser/MipsAsmParser.cpp | ||
---|---|---|
2868–2872 ↗ | (On Diff #101761) | This hunk is not clang-formatted. It should be: if ((DstReg == Mips::T9 || DstReg == Mips::T9_64) && !UseSrcReg && Res.getConstant() == 0 && !(Res.getSymA()->getSymbol().isInSection() || Res.getSymA()->getSymbol().isTemporary() || (Res.getSymA()->getSymbol().isELF() && cast<MCSymbolELF>(Res.getSymA()->getSymbol()).getBinding() == ELF::STB_LOCAL))) { |
Comment Actions
Please commit for me as I don't have that ability currently. I'll be sure to run clang-format over my other mips64 dla PIC change and update it as well.