Lines Matching refs:Layout

168 bool MCAssembler::evaluateFixup(const MCAsmLayout &Layout,
177 if (!Expr->evaluateAsRelocatable(Target, &Layout, &Fixup)) {
213 Value += Layout.getSymbolOffset(Sym);
218 Value -= Layout.getSymbolOffset(Sym);
228 uint32_t Offset = Layout.getFragmentOffset(DF) + Fixup.getOffset();
238 Backend.processFixupValue(*this, Layout, Fixup, DF, Target, Value,
244 uint64_t MCAssembler::computeFragmentSize(const MCAsmLayout &Layout,
264 unsigned Offset = Layout.getFragmentOffset(&AF);
280 if (!OF.getOffset().evaluateAsValue(Value, Layout))
284 uint64_t FragmentOffset = Layout.getFragmentOffset(&OF);
288 if (!Layout.getSymbolOffset(A->getSymbol(), Val))
416 static void writeFragment(const MCAssembler &Asm, const MCAsmLayout &Layout,
421 uint64_t FragmentSize = Asm.computeFragmentSize(Layout, F);
547 const MCAsmLayout &Layout) const {
550 assert(Layout.getSectionFileSize(Sec) == 0 && "Invalid size for section!");
595 writeFragment(*this, Layout, F);
598 Layout.getSectionAddressSize(Sec));
601 std::pair<uint64_t, bool> MCAssembler::handleFixup(const MCAsmLayout &Layout,
609 if (!evaluateFixup(Layout, Fixup, &F, Target, FixedValue)) {
613 getWriter().recordRelocation(*this, Layout, &F, Fixup, Target, IsPCRel,
619 void MCAssembler::layout(MCAsmLayout &Layout) {
636 for (unsigned i = 0, e = Layout.getSectionOrder().size(); i != e; ++i) {
637 MCSection *Sec = Layout.getSectionOrder()[i];
645 // Layout until everything fits.
646 while (layoutOnce(Layout))
654 finishLayout(Layout);
662 getWriter().executePostLayoutBinding(*this, Layout);
687 std::tie(FixedValue, IsPCRel) = handleFixup(Layout, *F, Fixup);
697 MCAsmLayout Layout(*this);
698 layout(Layout);
704 getWriter().writeObject(*this, Layout);
711 const MCAsmLayout &Layout) const {
714 bool Resolved = evaluateFixup(Layout, Fixup, DF, Target, Value);
716 Layout);
720 const MCAsmLayout &Layout) const {
728 if (fixupNeedsRelaxation(Fixup, F, Layout))
734 bool MCAssembler::relaxInstruction(MCAsmLayout &Layout,
736 if (!fragmentNeedsRelaxation(&F, Layout))
766 bool MCAssembler::relaxLEB(MCAsmLayout &Layout, MCLEBFragment &LF) {
769 bool Abs = LF.getValue().evaluateKnownAbsolute(Value, Layout);
782 bool MCAssembler::relaxDwarfLineAddr(MCAsmLayout &Layout,
784 MCContext &Context = Layout.getAssembler().getContext();
787 bool Abs = DF.getAddrDelta().evaluateKnownAbsolute(AddrDelta, Layout);
800 bool MCAssembler::relaxDwarfCallFrameFragment(MCAsmLayout &Layout,
802 MCContext &Context = Layout.getAssembler().getContext();
805 bool Abs = DF.getAddrDelta().evaluateKnownAbsolute(AddrDelta, Layout);
815 bool MCAssembler::layoutSectionOnce(MCAsmLayout &Layout, MCSection &Sec) {
832 RelaxedFrag = relaxInstruction(Layout, *cast<MCRelaxableFragment>(I));
835 RelaxedFrag = relaxDwarfLineAddr(Layout,
840 relaxDwarfCallFrameFragment(Layout,
844 RelaxedFrag = relaxLEB(Layout, *cast<MCLEBFragment>(I));
851 Layout.invalidateFragmentsFrom(FirstRelaxedFragment);
857 bool MCAssembler::layoutOnce(MCAsmLayout &Layout) {
863 while (layoutSectionOnce(Layout, Sec))
870 void MCAssembler::finishLayout(MCAsmLayout &Layout) {
872 for (unsigned int i = 0, n = Layout.getSectionOrder().size(); i != n; ++i) {
873 Layout.getFragmentOffset(&*Layout.getSectionOrder()[i]->rbegin());