Lines Matching defs:BF

187     BinaryFunction &BF;     // Function containing the instruction.
206 BinaryFunction *BF; /// Binary function corresponding to the entry.
486 BinaryFunction *BF = BC.getBinaryFunctionAtAddress(RefAddress);
487 if (!BF)
490 BC.addRelocation(EntryAddress, BF->getSymbol(), Relocation::getPC32(), 0,
526 BinaryFunction *BF = BC.getBinaryFunctionContainingAddress(IP);
527 if (!BF || !BC.shouldEmit(*BF))
530 MCInst *Inst = BF->getInstructionAtOffset(IP - BF->getAddress());
544 Fixups.push_back({*SMPLocksSection, Offset, *BF, *Label,
556 if (!BC.shouldEmit(Fixup.BF))
617 Entry.BF = nullptr;
628 BinaryFunction *&BF = Entry.BF;
629 BF = BC.getBinaryFunctionContainingAddress(IP, /*CheckPastEnd*/ true);
633 if (BF && BF->getAddress() + BF->getSize() == IP)
634 BF = 0;
636 if (!BF) {
643 BF->setHasORC(true);
645 if (!BF->hasInstructions())
648 const uint64_t Offset = IP - BF->getAddress();
649 MCInst *Inst = BF->getInstructionAtOffset(Offset);
662 Inst = BF->getInstructionContainingOffset(Offset);
688 if (E.BF)
689 BC.outs() << ": " << *E.BF;
698 for (BinaryFunction &BF : llvm::make_second_range(BC.getBinaryFunctions())) {
700 return E.IP <= BF.getAddress();
705 if (It->BF == &BF)
708 if (It->ORC == NullORC && It->IP == BF.getAddress()) {
709 assert(!It->BF);
710 It->BF = &BF;
714 NewEntries.push_back({BF.getAddress(), &BF, It->ORC});
716 BF.setHasORC(true);
726 if (E.BF)
727 BC.outs() << ": " << *E.BF;
745 for (BinaryFunction &BF : llvm::make_second_range(BC.getBinaryFunctions())) {
748 for (BinaryBasicBlock &BB : BF) {
766 return E.IP <= BF.getAddress();
771 assert(It->IP == BF.getAddress() && (!It->BF || It->BF == &BF) &&
774 if (It->ORC == NullORC && BF.hasORC()) {
776 << BF << '\n';
779 It->BF = &BF;
783 BF.setHasORC(true);
877 for (BinaryFunction &BF :
879 if (!BC.shouldEmit(BF))
881 for (FunctionFragment &FF : BF.getLayout().getSplitFragments())
903 if (!Entry.BF || !BC.shouldEmit(*Entry.BF)) {
905 if (Entry.ORC == NullORC && !Entry.BF)
914 if (Entry.BF->hasORC()) {
915 if (Error E = emitORC(Entry.BF->getLayout().getMainFragment()))
917 Entry.BF->setHasORC(false);
1021 BinaryFunction *BF = BC.getBinaryFunctionContainingAddress(CallAddress);
1022 if (!BF)
1025 if (!BC.shouldEmit(*BF))
1028 if (!BF->hasInstructions())
1031 MCInst *Inst = BF->getInstructionAtOffset(CallAddress - BF->getAddress());
1048 StaticCallEntries.push_back({EntryID, BF, Label});
1068 BinaryFunction &BF = *Entry.Function;
1069 if (!BC.shouldEmit(BF))
1189 for (BinaryFunction *BF : FunctionsWithExceptions)
1190 BF->setSimple(false);
1241 BinaryFunction *BF = BC.getBinaryFunctionContainingAddress(InstrLocation);
1242 if (!BF && opts::Verbosity) {
1248 if (BF && BC.shouldEmit(*BF)) {
1250 BF->getInstructionAtOffset(InstrLocation - BF->getAddress());
1267 for (BinaryFunction &BF : llvm::make_second_range(BC.getBinaryFunctions())) {
1268 if (!BC.shouldEmit(BF))
1270 for (const BinaryBasicBlock &BB : BF) {
1275 BF.setSimple(false);
1328 BinaryFunction *BF = BC.getBinaryFunctionContainingAddress(InstAddress);
1329 if (!BF && opts::Verbosity) {
1335 if (BF && BC.shouldEmit(*BF)) {
1336 MCInst *Inst = BF->getInstructionAtOffset(InstAddress - BF->getAddress());
1344 FunctionBugList[BF].push_back(EntryID);
1360 for (BinaryFunction &BF : llvm::make_second_range(BC.getBinaryFunctions())) {
1361 if (!BC.shouldEmit(BF))
1364 if (!FunctionBugList.count(&BF))
1369 for (BinaryBasicBlock &BB : BF) {
1387 for (const uint32_t ID : FunctionBugList[&BF]) {
1515 BinaryFunction *BF = BC.getBinaryFunctionContainingAddress(OrgInstAddress);
1516 if (!BF && opts::Verbosity) {
1531 if (!BF || !BF->hasInstructions())
1534 if (OrgInstAddress + OrgSize > BF->getAddress() + BF->getSize())
1539 BF->getInstructionAtOffset(OrgInstAddress - BF->getAddress());
1562 Inst = BF->getInstructionAtOffset(OrgInstAddress + Offset -
1563 BF->getAddress());
1637 BinaryFunction *BF = BC.getBinaryFunctionContainingAddress(HookAddress);
1638 if (!BF && opts::Verbosity) {
1644 if (!BF || !BC.shouldEmit(*BF))
1647 if (const uint64_t Offset = HookAddress - BF->getAddress()) {
1649 << *BF << " at offset 0x" << Twine::utohexstr(Offset) << '\n';
1650 BF->setSimple(false);
1755 BinaryFunction *BF = BC.getBinaryFunctionContainingAddress(JumpAddress);
1756 if (!BF && opts::Verbosity) {
1763 if (!BF || !BC.shouldEmit(*BF))
1766 MCInst *Inst = BF->getInstructionAtOffset(JumpAddress - BF->getAddress());
1773 if (!BF->containsAddress(TargetAddress))
1793 MCSymbol *Target = BF->registerBranch(JumpAddress, TargetAddress);
1833 BC.MIB->setOffset(*Inst, JumpAddress - BF->getAddress());
1854 for (BinaryFunction &BF : llvm::make_second_range(BC.getBinaryFunctions())) {
1855 if (!BC.shouldEmit(BF))
1858 for (BinaryBasicBlock &BB : BF) {
1955 BinaryFunction *BF =
1959 assert(BF && "Cannot get function for modified static key.");
1961 if (!BF->isEmitted())
1967 reinterpret_cast<uint8_t *>(BF->getImageAddress()), BF->getImageSize());
1972 const uint64_t JumpOffset = JumpAddress - BF->getAddress();