Lines Matching refs:Layout
240 bool MCAssembler::EvaluateFixup(const MCAsmLayout &Layout, in EvaluateFixup() argument
245 if (!Fixup.getValue()->EvaluateAsRelocatable(Target, Layout)) in EvaluateFixup()
280 Value += Layout.getSymbolOffset(&getSymbolData(Sym)); in EvaluateFixup()
287 Value -= Layout.getSymbolOffset(&getSymbolData(Sym)); in EvaluateFixup()
297 uint32_t Offset = Layout.getFragmentOffset(DF) + Fixup.getOffset(); in EvaluateFixup()
315 uint64_t MCAssembler::ComputeFragmentSize(const MCAsmLayout &Layout, in ComputeFragmentSize() argument
330 unsigned Offset = Layout.getFragmentOffset(&AF); in ComputeFragmentSize()
340 if (!OF.getOffset().EvaluateAsAbsolute(TargetLocation, Layout)) in ComputeFragmentSize()
344 uint64_t FragmentOffset = Layout.getFragmentOffset(&OF); in ComputeFragmentSize()
384 static void WriteFragmentData(const MCAssembler &Asm, const MCAsmLayout &Layout, in WriteFragmentData() argument
393 uint64_t FragmentSize = Asm.ComputeFragmentSize(Layout, F); in WriteFragmentData()
497 const MCAsmLayout &Layout) const { in WriteSectionData()
500 assert(Layout.getSectionFileSize(SD) == 0 && "Invalid size for section!"); in WriteSectionData()
542 WriteFragmentData(*this, Layout, *it); in WriteSectionData()
545 Layout.getSectionAddressSize(SD)); in WriteSectionData()
549 uint64_t MCAssembler::HandleFixup(const MCAsmLayout &Layout, in HandleFixup() argument
555 if (!EvaluateFixup(Layout, Fixup, &F, Target, FixedValue)) { in HandleFixup()
559 getWriter().RecordRelocation(*this, Layout, &F, Fixup, Target, FixedValue); in HandleFixup()
570 MCAsmLayout Layout(*this); in Finish() local
584 for (unsigned i = 0, e = Layout.getSectionOrder().size(); i != e; ++i) { in Finish()
585 MCSectionData *SD = Layout.getSectionOrder()[i]; in Finish()
595 while (LayoutOnce(Layout)) in Finish()
603 FinishLayout(Layout); in Finish()
613 getWriter().ExecutePostLayoutBinding(*this, Layout); in Finish()
624 uint64_t FixedValue = HandleFixup(Layout, *DF, Fixup); in Finish()
634 uint64_t FixedValue = HandleFixup(Layout, *IF, Fixup); in Finish()
643 getWriter().WriteObject(*this, Layout); in Finish()
650 const MCAsmLayout &Layout) const { in FixupNeedsRelaxation()
657 if (!EvaluateFixup(Layout, Fixup, DF, Target, Value)) in FixupNeedsRelaxation()
667 const MCAsmLayout &Layout) const { in FragmentNeedsRelaxation()
676 if (FixupNeedsRelaxation(*it, IF, Layout)) in FragmentNeedsRelaxation()
682 bool MCAssembler::RelaxInstruction(MCAsmLayout &Layout, in RelaxInstruction() argument
684 if (!FragmentNeedsRelaxation(&IF, Layout)) in RelaxInstruction()
718 bool MCAssembler::RelaxLEB(MCAsmLayout &Layout, MCLEBFragment &LF) { in RelaxLEB() argument
721 bool IsAbs = LF.getValue().EvaluateAsAbsolute(Value, Layout); in RelaxLEB()
735 bool MCAssembler::RelaxDwarfLineAddr(MCAsmLayout &Layout, in RelaxDwarfLineAddr() argument
739 bool IsAbs = DF.getAddrDelta().EvaluateAsAbsolute(AddrDelta, Layout); in RelaxDwarfLineAddr()
752 bool MCAssembler::RelaxDwarfCallFrameFragment(MCAsmLayout &Layout, in RelaxDwarfCallFrameFragment() argument
756 bool IsAbs = DF.getAddrDelta().EvaluateAsAbsolute(AddrDelta, Layout); in RelaxDwarfCallFrameFragment()
767 bool MCAssembler::LayoutSectionOnce(MCAsmLayout &Layout, in LayoutSectionOnce() argument
779 relaxedFrag = RelaxInstruction(Layout, *cast<MCInstFragment>(it2)); in LayoutSectionOnce()
782 relaxedFrag = RelaxDwarfLineAddr(Layout, in LayoutSectionOnce()
787 RelaxDwarfCallFrameFragment(Layout, in LayoutSectionOnce()
791 relaxedFrag = RelaxLEB(Layout, *cast<MCLEBFragment>(it2)); in LayoutSectionOnce()
799 Layout.Invalidate(FirstInvalidFragment); in LayoutSectionOnce()
805 bool MCAssembler::LayoutOnce(MCAsmLayout &Layout) { in LayoutOnce() argument
811 while(LayoutSectionOnce(Layout, SD)) in LayoutOnce()
818 void MCAssembler::FinishLayout(MCAsmLayout &Layout) { in FinishLayout() argument
820 for (unsigned int i = 0, n = Layout.getSectionOrder().size(); i != n; ++i) { in FinishLayout()
821 Layout.getFragmentOffset(&*Layout.getSectionOrder()[i]->rbegin()); in FinishLayout()