Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(169)

Side by Side Diff: lib/MC/MCAssembler.cpp

Issue 939073008: Rebased PNaCl localmods in LLVM to 223109 (Closed)
Patch Set: undo localmod Created 5 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « lib/MC/MCAsmStreamer.cpp ('k') | lib/MC/MCNaCl.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 //===- lib/MC/MCAssembler.cpp - Assembler Backend Implementation ----------===// 1 //===- lib/MC/MCAssembler.cpp - Assembler Backend Implementation ----------===//
2 // 2 //
3 // The LLVM Compiler Infrastructure 3 // The LLVM Compiler Infrastructure
4 // 4 //
5 // This file is distributed under the University of Illinois Open Source 5 // This file is distributed under the University of Illinois Open Source
6 // License. See LICENSE.TXT for details. 6 // License. See LICENSE.TXT for details.
7 // 7 //
8 //===----------------------------------------------------------------------===// 8 //===----------------------------------------------------------------------===//
9 9
10 #include "llvm/MC/MCAssembler.h" 10 #include "llvm/MC/MCAssembler.h"
11 #include "llvm/ADT/Statistic.h" 11 #include "llvm/ADT/Statistic.h"
12 #include "llvm/ADT/StringExtras.h" 12 #include "llvm/ADT/StringExtras.h"
13 #include "llvm/ADT/Twine.h" 13 #include "llvm/ADT/Twine.h"
14 #include "llvm/MC/MCAsmBackend.h" 14 #include "llvm/MC/MCAsmBackend.h"
15 #include "llvm/MC/MCAsmLayout.h" 15 #include "llvm/MC/MCAsmLayout.h"
16 #include "llvm/MC/MCCodeEmitter.h" 16 #include "llvm/MC/MCCodeEmitter.h"
17 #include "llvm/MC/MCContext.h" 17 #include "llvm/MC/MCContext.h"
18 #include "llvm/MC/MCDwarf.h" 18 #include "llvm/MC/MCDwarf.h"
19 #include "llvm/MC/MCExpr.h" 19 #include "llvm/MC/MCExpr.h"
20 #include "llvm/MC/MCSectionELF.h"
20 #include "llvm/MC/MCFixupKindInfo.h" 21 #include "llvm/MC/MCFixupKindInfo.h"
21 #include "llvm/MC/MCObjectWriter.h" 22 #include "llvm/MC/MCObjectWriter.h"
22 #include "llvm/MC/MCSection.h" 23 #include "llvm/MC/MCSection.h"
23 #include "llvm/MC/MCSymbol.h" 24 #include "llvm/MC/MCSymbol.h"
24 #include "llvm/MC/MCValue.h" 25 #include "llvm/MC/MCValue.h"
25 #include "llvm/Support/Debug.h" 26 #include "llvm/Support/Debug.h"
26 #include "llvm/Support/ErrorHandling.h" 27 #include "llvm/Support/ErrorHandling.h"
27 #include "llvm/Support/LEB128.h" 28 #include "llvm/Support/LEB128.h"
28 #include "llvm/Support/TargetRegistry.h" 29 #include "llvm/Support/TargetRegistry.h"
29 #include "llvm/Support/raw_ostream.h" 30 #include "llvm/Support/raw_ostream.h"
(...skipping 259 matching lines...) Expand 10 before | Expand all | Expand 10 after
289 290
290 MCSectionData::MCSectionData(const MCSection &_Section, MCAssembler *A) 291 MCSectionData::MCSectionData(const MCSection &_Section, MCAssembler *A)
291 : Section(&_Section), 292 : Section(&_Section),
292 Ordinal(~UINT32_C(0)), 293 Ordinal(~UINT32_C(0)),
293 Alignment(1), 294 Alignment(1),
294 BundleLockState(NotBundleLocked), 295 BundleLockState(NotBundleLocked),
295 BundleLockNestingDepth(0), 296 BundleLockNestingDepth(0),
296 BundleGroupBeforeFirstInst(false), 297 BundleGroupBeforeFirstInst(false),
297 HasInstructions(false) 298 HasInstructions(false)
298 { 299 {
299 if (A) 300 // @LOCALMOD-BEGIN
301 if (A) {
302 // Necessary for IRT building because the IRT loader expects the end of
303 // the section to be bundle-aligned. Padding happens with 0's though,
304 // so it's not really ideal. TODO(dschuff) figure out how to do it right.
300 A->getSectionList().push_back(this); 305 A->getSectionList().push_back(this);
306 if (A->isBundlingEnabled() && _Section.UseCodeAlign())
307 setAlignment(A->getBundleAlignSize());
308 }
309 // @LOCALMOD-END
301 } 310 }
302 311
303 MCSectionData::iterator 312 MCSectionData::iterator
304 MCSectionData::getSubsectionInsertionPoint(unsigned Subsection) { 313 MCSectionData::getSubsectionInsertionPoint(unsigned Subsection) {
305 if (Subsection == 0 && SubsectionFragmentMap.empty()) 314 if (Subsection == 0 && SubsectionFragmentMap.empty())
306 return end(); 315 return end();
307 316
308 SmallVectorImpl<std::pair<unsigned, MCFragment *> >::iterator MI = 317 SmallVectorImpl<std::pair<unsigned, MCFragment *> >::iterator MI =
309 std::lower_bound(SubsectionFragmentMap.begin(), SubsectionFragmentMap.end(), 318 std::lower_bound(SubsectionFragmentMap.begin(), SubsectionFragmentMap.end(),
310 std::make_pair(Subsection, (MCFragment *)nullptr)); 319 std::make_pair(Subsection, (MCFragment *)nullptr));
(...skipping 989 matching lines...) Expand 10 before | Expand all | Expand 10 after
1300 void MCEncodedFragmentWithFixups::anchor() { } 1309 void MCEncodedFragmentWithFixups::anchor() { }
1301 void MCDataFragment::anchor() { } 1310 void MCDataFragment::anchor() { }
1302 void MCCompactEncodedInstFragment::anchor() { } 1311 void MCCompactEncodedInstFragment::anchor() { }
1303 void MCRelaxableFragment::anchor() { } 1312 void MCRelaxableFragment::anchor() { }
1304 void MCAlignFragment::anchor() { } 1313 void MCAlignFragment::anchor() { }
1305 void MCFillFragment::anchor() { } 1314 void MCFillFragment::anchor() { }
1306 void MCOrgFragment::anchor() { } 1315 void MCOrgFragment::anchor() { }
1307 void MCLEBFragment::anchor() { } 1316 void MCLEBFragment::anchor() { }
1308 void MCDwarfLineAddrFragment::anchor() { } 1317 void MCDwarfLineAddrFragment::anchor() { }
1309 void MCDwarfCallFrameFragment::anchor() { } 1318 void MCDwarfCallFrameFragment::anchor() { }
OLDNEW
« no previous file with comments | « lib/MC/MCAsmStreamer.cpp ('k') | lib/MC/MCNaCl.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698