• Home
  • Raw
  • Download

Lines Matching refs:Layout

121 static bool getLabelOffset(const MCAsmLayout &Layout, const MCSymbol &S,  in getLabelOffset()  argument
129 Val = Layout.getFragmentOffset(S.getFragment()) + S.getOffset(); in getLabelOffset()
133 static bool getSymbolOffsetImpl(const MCAsmLayout &Layout, const MCSymbol &S, in getSymbolOffsetImpl() argument
136 return getLabelOffset(Layout, S, ReportError, Val); in getSymbolOffsetImpl()
140 if (!S.getVariableValue()->evaluateAsValue(Target, Layout)) in getSymbolOffsetImpl()
149 if (!getLabelOffset(Layout, A->getSymbol(), ReportError, ValA)) in getSymbolOffsetImpl()
157 if (!getLabelOffset(Layout, B->getSymbol(), ReportError, ValB)) in getSymbolOffsetImpl()
437 bool MCAssembler::evaluateFixup(const MCAsmLayout &Layout, in evaluateFixup() argument
446 if (!Expr->evaluateAsRelocatable(Target, &Layout, &Fixup)) { in evaluateFixup()
482 Value += Layout.getSymbolOffset(Sym); in evaluateFixup()
487 Value -= Layout.getSymbolOffset(Sym); in evaluateFixup()
497 uint32_t Offset = Layout.getFragmentOffset(DF) + Fixup.getOffset(); in evaluateFixup()
507 Backend.processFixupValue(*this, Layout, Fixup, DF, Target, Value, in evaluateFixup()
513 uint64_t MCAssembler::computeFragmentSize(const MCAsmLayout &Layout, in computeFragmentSize() argument
533 unsigned Offset = Layout.getFragmentOffset(&AF); in computeFragmentSize()
549 if (!OF.getOffset().evaluateAsValue(Value, Layout)) in computeFragmentSize()
553 uint64_t FragmentOffset = Layout.getFragmentOffset(&OF); in computeFragmentSize()
557 if (!Layout.getSymbolOffset(A->getSymbol(), Val)) in computeFragmentSize()
685 static void writeFragment(const MCAssembler &Asm, const MCAsmLayout &Layout, in writeFragment() argument
690 uint64_t FragmentSize = Asm.computeFragmentSize(Layout, F); in writeFragment()
816 const MCAsmLayout &Layout) const { in writeSectionData()
819 assert(Layout.getSectionFileSize(Sec) == 0 && "Invalid size for section!"); in writeSectionData()
864 writeFragment(*this, Layout, F); in writeSectionData()
867 Layout.getSectionAddressSize(Sec)); in writeSectionData()
870 std::pair<uint64_t, bool> MCAssembler::handleFixup(const MCAsmLayout &Layout, in handleFixup() argument
878 if (!evaluateFixup(Layout, Fixup, &F, Target, FixedValue)) { in handleFixup()
882 getWriter().recordRelocation(*this, Layout, &F, Fixup, Target, IsPCRel, in handleFixup()
888 void MCAssembler::layout(MCAsmLayout &Layout) { in layout() argument
905 for (unsigned i = 0, e = Layout.getSectionOrder().size(); i != e; ++i) { in layout()
906 MCSection *Sec = Layout.getSectionOrder()[i]; in layout()
915 while (layoutOnce(Layout)) in layout()
923 finishLayout(Layout); in layout()
931 getWriter().executePostLayoutBinding(*this, Layout); in layout()
956 std::tie(FixedValue, IsPCRel) = handleFixup(Layout, *F, Fixup); in layout()
966 MCAsmLayout Layout(*this); in Finish() local
967 layout(Layout); in Finish()
973 getWriter().writeObject(*this, Layout); in Finish()
980 const MCAsmLayout &Layout) const { in fixupNeedsRelaxation()
983 bool Resolved = evaluateFixup(Layout, Fixup, DF, Target, Value); in fixupNeedsRelaxation()
985 Layout); in fixupNeedsRelaxation()
989 const MCAsmLayout &Layout) const { in fragmentNeedsRelaxation()
997 if (fixupNeedsRelaxation(Fixup, F, Layout)) in fragmentNeedsRelaxation()
1003 bool MCAssembler::relaxInstruction(MCAsmLayout &Layout, in relaxInstruction() argument
1005 if (!fragmentNeedsRelaxation(&F, Layout)) in relaxInstruction()
1035 bool MCAssembler::relaxLEB(MCAsmLayout &Layout, MCLEBFragment &LF) { in relaxLEB() argument
1038 bool Abs = LF.getValue().evaluateKnownAbsolute(Value, Layout); in relaxLEB()
1051 bool MCAssembler::relaxDwarfLineAddr(MCAsmLayout &Layout, in relaxDwarfLineAddr() argument
1053 MCContext &Context = Layout.getAssembler().getContext(); in relaxDwarfLineAddr()
1056 bool Abs = DF.getAddrDelta().evaluateKnownAbsolute(AddrDelta, Layout); in relaxDwarfLineAddr()
1069 bool MCAssembler::relaxDwarfCallFrameFragment(MCAsmLayout &Layout, in relaxDwarfCallFrameFragment() argument
1071 MCContext &Context = Layout.getAssembler().getContext(); in relaxDwarfCallFrameFragment()
1074 bool Abs = DF.getAddrDelta().evaluateKnownAbsolute(AddrDelta, Layout); in relaxDwarfCallFrameFragment()
1084 bool MCAssembler::layoutSectionOnce(MCAsmLayout &Layout, MCSection &Sec) { in layoutSectionOnce() argument
1101 RelaxedFrag = relaxInstruction(Layout, *cast<MCRelaxableFragment>(I)); in layoutSectionOnce()
1104 RelaxedFrag = relaxDwarfLineAddr(Layout, in layoutSectionOnce()
1109 relaxDwarfCallFrameFragment(Layout, in layoutSectionOnce()
1113 RelaxedFrag = relaxLEB(Layout, *cast<MCLEBFragment>(I)); in layoutSectionOnce()
1120 Layout.invalidateFragmentsFrom(FirstRelaxedFragment); in layoutSectionOnce()
1126 bool MCAssembler::layoutOnce(MCAsmLayout &Layout) { in layoutOnce() argument
1132 while (layoutSectionOnce(Layout, Sec)) in layoutOnce()
1139 void MCAssembler::finishLayout(MCAsmLayout &Layout) { in finishLayout() argument
1141 for (unsigned int i = 0, n = Layout.getSectionOrder().size(); i != n; ++i) { in finishLayout()
1142 Layout.getFragmentOffset(&*Layout.getSectionOrder()[i]->rbegin()); in finishLayout()