summaryrefslogtreecommitdiff
path: root/include/llvm/MC/MCObjectWriter.h
Commit message (Collapse)AuthorAge
* Fix unnecessary removal of const through cast machineryDavid Blaikie2013-02-11
| | | | | | | | I have some uncommitted changes to the cast code that catch this sort of thing at compile-time but I still need to do some other cleanup before I can enable it. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174853 91177308-0d34-0410-b5e6-96231b3b80d8
* Format comments & clean whitespaceEli Bendersky2013-02-05
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174396 91177308-0d34-0410-b5e6-96231b3b80d8
* Add AArch64 as an experimental target.Tim Northover2013-01-31
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds support for AArch64 (ARM's 64-bit architecture) to LLVM in the "experimental" category. Currently, it won't be built unless requested explicitly. This initial commit should have support for: + Assembly of all scalar (i.e. non-NEON, non-Crypto) instructions (except the late addition CRC instructions). + CodeGen features required for C++03 and C99. + Compilation for the "small" memory model: code+static data < 4GB. + Absolute and position-independent code. + GNU-style (i.e. "__thread") TLS. + Debugging information. The principal omission, currently, is performance tuning. This patch excludes the NEON support also reviewed due to an outbreak of batshit insanity in our legal department. That will be committed soon bringing the changes to precisely what has been approved. Further reviews would be gratefully received. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@174054 91177308-0d34-0410-b5e6-96231b3b80d8
* Add more reset methods to make all objects that the backend may use for ↵Pedro Artigas2012-12-14
| | | | | | outputting code have a reset, some are not used but were declared for completeness git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@170227 91177308-0d34-0410-b5e6-96231b3b80d8
* Make the contents of encoded sections SmallVector<char, N> instead ofEli Bendersky2012-12-07
| | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169644 91177308-0d34-0410-b5e6-96231b3b80d8
* Sort the #include lines for the include/... tree with the script.Chandler Carruth2012-12-03
| | | | | | | | | | AKA: Recompile *ALL* the source code! This one went much better. No manual edits here. I spot-checked for silliness and grep-checked for really broken edits and everything seemed good. It all still compiles. Yell if you see something that looks goofy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@169133 91177308-0d34-0410-b5e6-96231b3b80d8
* Make use of the LLVM_DELETED_FUNCTION macro.Craig Topper2012-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@162828 91177308-0d34-0410-b5e6-96231b3b80d8
* Move [SU]LEB128 encoding to a utility header.Jim Grosbach2012-08-08
| | | | | | | These functions are very generic. There's no reason for them to be tied to MCObjectWriter. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@161545 91177308-0d34-0410-b5e6-96231b3b80d8
* Prune some includes and forward declarations.Craig Topper2012-03-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@153429 91177308-0d34-0410-b5e6-96231b3b80d8
* Move x86 specific bits of the COFF writer to lib/Target/X86.Rafael Espindola2011-12-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@147231 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an option to pad an uleb128 to MCObjectWriter and remove the uleb128 ↵Benjamin Kramer2011-11-05
| | | | | | | | encoding from the DWARF asm printer. As a side effect we now print dwarf ulebs with .ascii directives. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@143809 91177308-0d34-0410-b5e6-96231b3b80d8
* Gas is very inconsistent about when a relaxation/relocation is needed. DoRafael Espindola2011-02-16
| | | | | | the right thing and stop trying to copy it. Fixes PR8944. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@125648 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge IsFixupFullyResolved and IsSymbolRefDifferenceFullyResolved. We nowRafael Espindola2010-12-24
| | | | | | have a single point where targets test if a relocation is needed. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122549 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge isAbsolute into IsSymbolRefDifferenceFullyResolved.Rafael Espindola2010-12-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122148 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove the MCObjectFormat class.Rafael Espindola2010-12-18
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122147 91177308-0d34-0410-b5e6-96231b3b80d8
* Move createELFObjectWriter to its own header.Rafael Espindola2010-12-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122064 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/ObjectWriter: Add a new IsSymbolRefDifferenceFullyResolved target format ↵Daniel Dunbar2010-12-17
| | | | | | | | specific hook. - Currently just has stub implementations for Mach-O, ELF, and COFF. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@122037 91177308-0d34-0410-b5e6-96231b3b80d8
* MC/Mach-O: Move createMachObjectWriter into MCMachObjectWriter.h.Daniel Dunbar2010-12-16
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121971 91177308-0d34-0410-b5e6-96231b3b80d8
* Sorry for such a large commit. The summary is that only MachO cares about theRafael Espindola2010-12-07
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | actuall addresses in a .o file, so it is better to let the MachO writer compute it. This is good for two reasons. First, areas that shouldn't care about addresses now don't have access to it. Second, the layout of each section is independent. I should use this in a subsequent commit to speed it up. Most of the patch is just removing the section address computation. The two interesting parts are the change on how we handle padding in the end of sections and how MachO can get the address of a-b when a and b are in different sections. Since now the expression evaluation normally doesn't know the section address, it will think that a-b needs relocation and let the MachO writer know. Once it has computed the section addresses, it calls back the expression evaluation with the section addresses to resolve these expressions. The remaining problem is the handling of padding. Currently it will create a special alignment fragment at the end. Since that fragment doesn't update the alignment of the section, it needs the real address to be computed. Since now the layout will not compute a-b with a and b in different sections, the only effect that the special alignment fragment has is update the address size of the section. This can also be done by the MachO writer. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@121076 91177308-0d34-0410-b5e6-96231b3b80d8
* Merge System into Support.Michael J. Spencer2010-11-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@120298 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Simplify Mach-O and ELF object writer implementations.Daniel Dunbar2010-11-13
| | | | | | - What was I thinking????? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@118992 91177308-0d34-0410-b5e6-96231b3b80d8
* On ELF we need to know which symbols are used in relocations to decide ifRafael Espindola2010-10-05
| | | | | | | they should be in the symbol table or not. Instead of "guessing", just compute the symbol table after the relocations are known. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115619 91177308-0d34-0410-b5e6-96231b3b80d8
* Did my commit for the last patch for the .loc directory from the wrong place andKevin Enderby2010-09-30
| | | | | | | missed a bunch of files. Here the rest. Sorry about that. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115173 91177308-0d34-0410-b5e6-96231b3b80d8
* Make it possible for the MCObjectWriter to decide if a given fixup is fullyRafael Espindola2010-09-30
| | | | | | | | | | | resolved or not. Different object files have different restrictions and different native assemblers have different idiosyncrasies we want to emulate for now. Move the existing MachO logic to the new place and implement an ELF one that gets fixups to globals right. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@115131 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Add partial x86-64 support to COFF.Michael J. Spencer2010-08-21
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111728 91177308-0d34-0410-b5e6-96231b3b80d8
* Revert r111230, we have to find a better place for the host-specific code.Benjamin Kramer2010-08-17
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111232 91177308-0d34-0410-b5e6-96231b3b80d8
* Micro-optimize MCObjectWriter to do a byteswap if necessary and then write theBenjamin Kramer2010-08-17
| | | | | | | whole integer to the stream instead of doing byte-sized writes. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@111230 91177308-0d34-0410-b5e6-96231b3b80d8
* introduce WinCOFFObjectWriter, patch by Michael Spencer!Chris Lattner2010-07-11
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@108103 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Eliminate MCAsmFixup, replace with MCFixup.Daniel Dunbar2010-05-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104699 91177308-0d34-0410-b5e6-96231b3b80d8
* added an assertion to MCObjectWriter::WriteBytes to catch misuse of the ↵Nathan Jeffords2010-05-21
| | | | | | | | ZeroFillSize parameter If the size of the string is greater than the zero fill size, the function will attempt to write a very large string of zeros to the object file (~4GB on 32 bit platforms). This assertion will catch the scenario and crash the program before the write occurs. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@104334 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix typo.Nick Lewycky2010-05-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@103755 91177308-0d34-0410-b5e6-96231b3b80d8
* Add a const.Dan Gohman2010-04-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@101777 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Direct all {fragment,section,symbol} address access through the ↵Daniel Dunbar2010-03-24
| | | | | | MCAsmLayout object. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99380 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Change MCObjectWriter::RecordRelocation to take an MCFragment (instead ↵Daniel Dunbar2010-03-22
| | | | | | of a MCDataFragment). Object files should only need the generic MCFragment features. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@99205 91177308-0d34-0410-b5e6-96231b3b80d8
* MC: Split MCObjectWriter out of MCAssembler.cpp.Daniel Dunbar2010-03-19
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@98949 91177308-0d34-0410-b5e6-96231b3b80d8