summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCAssembler.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove the RelaxAll overrule in MCAssembler::fixupNeedsRelaxation,Eli Bendersky2012-12-111-3/+2
| | | | | | | | | | | | because that method is only getting called for MCInstFragment. These fragments aren't even generated when RelaxAll is set, which is why the flag reference here is superfluous. Removing it simplifies the code with no harmful effects. An assertion is added higher up to make sure this path is never reached. llvm-svn: 169886
* Cleanup formatting, comments and naming.Eli Bendersky2012-12-101-21/+21
| | | | llvm-svn: 169762
* This patch adds statistics for other non-DWARF fragments emitted byEli Bendersky2012-12-101-2/+13
| | | | | | | | | the assembler. This is useful in order to know how the numbers add up, since in particular the Align fragments account for a non-trivial portion of the emitted fragments (especially on -O0 which sets relax-all). llvm-svn: 169747
* Make the contents of encoded sections SmallVector<char, N> instead ofEli Bendersky2012-12-071-1/+1
| | | | | | | | | | | SmallString. This makes it possible to use the length-erased SmallVectorImpl in the interface without imposing buffer size. Thus, the size of MCInstFragment is back down since a preallocated 8-byte contents buffer is enough. It would be generally a good idea to rid all the fragments of SmallString as contents, because a vector just makes more sense. llvm-svn: 169644
* Refactor MCInstFragment and MCDataFragment to adhere to a common interface,Eli Bendersky2012-12-071-40/+35
| | | | | | | | | which removes code duplication and prepares the ground for future additions. Full discussion: http://lists.cs.uiuc.edu/pipermail/llvm-commits/Week-of-Mon-20121203/158233.html llvm-svn: 169626
* Add separate statistics for Data and Inst fragments emitted during relaxation.Eli Bendersky2012-12-071-1/+5
| | | | | | | Also fixes a test that was overly-sensitive to the exact order of statistics emitted. llvm-svn: 169619
* Change std::vector to SmallVector<4> and remove some unused methods.Eli Bendersky2012-12-051-1/+1
| | | | | | | | This is more consistent with other vectors in this code. In addition, I ran some tests compiling a large program and >96% of fragments have 4 or less fixups, so SmallVector<4> is a good optimization. llvm-svn: 169433
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-031-7/+7
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* Tidy up. Minor formatting.Jim Grosbach2012-09-181-3/+2
| | | | llvm-svn: 164182
* Fix Doxygen issues:Dmitri Gribenko2012-09-141-1/+1
| | | | | | | | | | * wrap code blocks in \code ... \endcode; * refer to parameter names in paragraphs correctly (\arg is not what most people want -- it starts a new paragraph); * use \param instead of \arg to document parameters in order to be consistent with the rest of the codebase. llvm-svn: 163902
* Release build: guard dump functions withManman Ren2012-09-121-1/+1
| | | | | | | | "#if !defined(NDEBUG) || defined(LLVM_ENABLE_DUMP)" No functional change. Update r163344. llvm-svn: 163679
* Release build: guard dump functions with "ifndef NDEBUG"Manman Ren2012-09-061-0/+2
| | | | | | No functional change. llvm-svn: 163344
* Allow targets to specify a minimum supported NOP size when performing NOP ↵Owen Anderson2012-08-291-0/+6
| | | | | | | | padding. If the desired padding is smaller than the supported NOP size, we will enlarge the padding to make it work. llvm-svn: 162870
* Move [SU]LEB128 encoding to a utility header.Jim Grosbach2012-08-081-2/+3
| | | | | | | These functions are very generic. There's no reason for them to be tied to MCObjectWriter. llvm-svn: 161545
* Fix a typo (the the => the)Sylvestre Ledru2012-07-231-1/+1
| | | | llvm-svn: 160621
* Prune some includes and forward declarations.Craig Topper2012-03-261-1/+1
| | | | llvm-svn: 153429
* ARM BL/BLX instruction fixups should use relocations.Jim Grosbach2012-02-271-2/+4
| | | | | | | | | | | | | We on the linker to resolve calls to the appropriate BL/BLX instruction to make interworking function correctly. It uses the symbol in the relocation to do that, so we need to be careful about being too clever. To enable this for ARM mode, split the BL/BLX fixup kind off from the unconditional-branch fixups. rdar://10927209 llvm-svn: 151571
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-071-8/+4
| | | | llvm-svn: 149967
* Source information in 'expected relocatable expression' diagnostic.Jim Grosbach2012-01-271-1/+1
| | | | llvm-svn: 149105
* Tidy up. MCAsmBackend naming conventions.Jim Grosbach2012-01-181-5/+5
| | | | llvm-svn: 148400
* Move some ARM specific MCAssmebler bits into the ARMAsmBackend.Jim Grosbach2012-01-181-9/+2
| | | | llvm-svn: 148364
* Unweaken vtables as per ↵David Blaikie2011-12-201-0/+10
| | | | | | http://llvm.org/docs/CodingStandards.html#ll_virtual_anch llvm-svn: 146960
* Move target-specific logic out of generic MCAssembler.Jim Grosbach2011-12-061-5/+2
| | | | | | | | Whether a fixup needs relaxation for the associated instruction is a target-specific function, as the FIXME indicated. Create a hook for that and use it. llvm-svn: 145881
* Tidy up. Hard tabs.Jim Grosbach2011-12-061-1/+1
| | | | llvm-svn: 145878
* Switch MCAssembler to method names starting w/ lower-case.Jim Grosbach2011-12-061-31/+31
| | | | | | per http://llvm.org/docs/CodingStandards.html#ll_naming llvm-svn: 145873
* Better fix for ARM MOVT relocation encoding of thumb bit.Jim Grosbach2011-11-291-8/+8
| | | | | | Replaces r145318 with a more targetted fix for the relocation handling. llvm-svn: 145346
* Thumb2 only force the fixup thumb bit for data relocations.Jim Grosbach2011-11-281-8/+8
| | | | | | rdar://10493453 llvm-svn: 145318
* Trailing whitespace.Jim Grosbach2011-10-261-2/+2
| | | | llvm-svn: 143071
* Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng2011-08-241-1/+1
| | | | | | These are strictly utilities for registering targets and components. llvm-svn: 138450
* Rename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to ↵Evan Cheng2011-07-251-2/+2
| | | | | | createMCAsmBackend. llvm-svn: 136010
* Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where ↵Evan Cheng2011-07-231-1/+1
| | | | | | they belong. llvm-svn: 135833
* Don't force relaxation of AdvanceLoc instructions on OS X. gdb is happy withRafael Espindola2011-05-081-2/+1
| | | | | | | the smaller encoding and this cuts 270336 bytes from a release version of clang and 1246272 bytes from a debug build. llvm-svn: 131067
* MCAsmLayout: Add support for computing the symbol offset of variables. NotDaniel Dunbar2011-04-291-0/+27
| | | | | | currently used, because variables don't get reported as being "defined". llvm-svn: 130524
* Add a small temporary hack for producing identical eh_frame sections on OS X.Rafael Espindola2011-04-281-1/+2
| | | | | | | This removes one of the main advantages of moving eh_frame to MC, but makes the transition a lot easier to debug (run md5). llvm-svn: 130379
* No relocation produces a SLEB or ULEB, make sure they are handled in MC.Rafael Espindola2011-04-261-1/+3
| | | | llvm-svn: 130181
* Remove unused STL header includes.Jay Foad2011-04-231-1/+0
| | | | llvm-svn: 130068
* Gas is very inconsistent about when a relaxation/relocation is needed. DoRafael Espindola2011-02-161-2/+4
| | | | | | the right thing and stop trying to copy it. Fixes PR8944. llvm-svn: 125648
* Add support for the --noexecstack option.Rafael Espindola2011-01-231-1/+1
| | | | llvm-svn: 124077
* Relax address updates in the eh_frame section.Rafael Espindola2010-12-281-3/+37
| | | | llvm-svn: 122591
* Merge IsFixupFullyResolved and IsSymbolRefDifferenceFullyResolved. We nowRafael Espindola2010-12-241-12/+24
| | | | | | have a single point where targets test if a relocation is needed. llvm-svn: 122549
* Assert that the AddrDelta expression is really constant and wrap it in a setRafael Espindola2010-12-221-1/+3
| | | | | | if we have a lame assembler. llvm-svn: 122446
* Use references and simplify.Rafael Espindola2010-12-221-1/+1
| | | | llvm-svn: 122405
* Don't relax org or align. They change size as the relaxation happens, but theyRafael Espindola2010-12-211-42/+27
| | | | | | | are not actually relaxed. For example, a section with only alignments will never needs relaxation. llvm-svn: 122356
* Layout one section until no relaxations are done and then move to the nextRafael Espindola2010-12-211-34/+41
| | | | | | | | | | section. This helps because in practice sections form a dag with debug sections pointing to text sections. Finishing up the text sections first makes the debug section relaxation trivial. llvm-svn: 122314
* Thumb's forced-PC-alignment requirement applies to the _total_ displacement, ↵Owen Anderson2010-12-171-2/+2
| | | | | | | | | not just to the fragment relative portion. While the fragment boundary is usually already aligned, it is possible for it not to be, which would lead to a non-aligned final displacement. llvm-svn: 122091
* MC/Assembler: Strip out object writer arguments, now that it is always availableDaniel Dunbar2010-12-171-49/+36
| | | | | | -- and remove FIXME asking for the same! llvm-svn: 122032
* MC/Assembler: Make the MCObjectWriter available through the lifetime of theDaniel Dunbar2010-12-171-21/+11
| | | | | | assembler. llvm-svn: 122031
* MC: Move target specific fixup info descriptors to TargetAsmBackend instead ofDaniel Dunbar2010-12-161-2/+2
| | | | | | | the MCCodeEmitter, which seems like a better organization. - Also, cleaned up some magic constants while in the area. llvm-svn: 121953
* Fix typo in r121875.Owen Anderson2010-12-151-1/+1
| | | | llvm-svn: 121880
* Implement cleanups suggested by Daniel.Owen Anderson2010-12-151-7/+11
| | | | llvm-svn: 121875
OpenPOWER on IntegriCloud