summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
* Use the generic Lfunc_begin label on ppc.Rafael Espindola2015-03-051-0/+1
| | | | | | This removes yet another custom label to mark the start of a function. llvm-svn: 231390
* Replace llvm.frameallocate with llvm.frameescapeReid Kleckner2015-03-051-3/+4
| | | | | | | | | | Turns out it's pretty straightforward and simplifies the implementation. Reviewers: andrew.w.kaylor Differential Revision: http://reviews.llvm.org/D8051 llvm-svn: 231386
* Expand variables when evaluating absolute expressions.Rafael Espindola2015-03-041-1/+1
| | | | | | | This allows for variables to be used in .size. This matches gnu AS functionality. llvm-svn: 231295
* [MC][Target] Implement support for R_X86_64_SIZE{32,64}.Davide Italiano2015-03-041-0/+2
| | | | | | | Differential Revision: D7990 Reviewed by: rafael, majnemer llvm-svn: 231216
* Remove MCStreamer include which isn't used here. NFCPete Cooper2015-03-041-1/+0
| | | | llvm-svn: 231195
* This file should always have included MCAssembler and not MCStreamer. NFCPete Cooper2015-03-041-1/+1
| | | | llvm-svn: 231194
* Remove MCStreamer.h include from MCContext.h and explictly include it where ↵Pete Cooper2015-03-042-0/+2
| | | | | | necessary. NFC llvm-svn: 231193
* Remove useless .debug_macinfo section setup.Paul Robinson2015-03-021-12/+0
| | | | llvm-svn: 231001
* Make some non-constant static variables non-static or fully const.Benjamin Kramer2015-03-011-1/+1
| | | | | | Otherwise we have to emit thread-safe initialization for them. NFC. llvm-svn: 230894
* Centralize handling of the eh_begin and eh_end labels.Rafael Espindola2015-02-271-0/+6
| | | | | | | | | | This removes a bit of duplicated code and more importantly, remembers the labels so that they don't need to be looked up by name. This in turn allows for any name to be used and avoids a crash if the name we wanted was already taken. llvm-svn: 230772
* [MC] Use the non-EH register mapping in the debug_frame section.Frederic Riss2015-02-261-4/+20
| | | | | | | | | | | | | | | | | | | | On 32bits x86 Darwin, the register mappings for the eh_frane and debug_frame sections are different. Thus the same CFI instructions should result in different registers in the object file. The problem isn't target specific though, but it requires that the mappings for EH register numbers be different from the standard Dwarf one. The patch looks a bit clumsy. LLVM uses the EH mapping as canonical for everything frame related. Thus we need to do a double conversion EH -> LLVM -> Non-EH, when emitting the debug_frame section. Fixes PR22363. Differential Revision: http://reviews.llvm.org/D7593 llvm-svn: 230670
* Fix UTF8 chars to ASCII.NAKAMURA Takumi2015-02-251-1/+1
| | | | llvm-svn: 230479
* COFF: Add 'IMAGE_SCN_CNT_INITIALIZED_DATA' to all DWARF sectionsDavid Majnemer2015-02-221-0/+25
| | | | | | | The CodeView debug info section, .debug$S, also has this set. MinGW sets this bit for their DWARF sections as well. llvm-svn: 230156
* COFF: Consistently format the DWARF sectionsDavid Majnemer2015-02-221-45/+44
| | | | llvm-svn: 230155
* MC: Allow multiple comma-separated expressions on the .uleb128 directive.Benjamin Kramer2015-02-191-9/+15
| | | | | | | For compatiblity with GNU as. Binutils documents this as '.uleb128 expressions'. Subtle, isn't it? llvm-svn: 229911
* Reverting r229831 due to multiple ARM/PPC/MIPS build-bot failures.Michael Kuperstein2015-02-192-19/+13
| | | | llvm-svn: 229841
* Use std::bitset for SubtargetFeaturesMichael Kuperstein2015-02-192-13/+19
| | | | | | | | | | | Previously, subtarget features were a bitfield with the underlying type being uint64_t. Since several targets (X86 and ARM, in particular) have hit or were very close to hitting this bound, switching the features to use a bitset. No functional change. Differential Revision: http://reviews.llvm.org/D7065 llvm-svn: 229831
* Add r228980 back.Rafael Espindola2015-02-174-9/+34
| | | | | | | | | | Add support for having multiple sections with the same name and comdat. Using this in combination with -ffunction-sections allows LLVM to output a .o file with mulitple sections named .text. This saves space by avoiding long unique names of the form .text.<C++ mangled name>. llvm-svn: 229541
* Add r228889 back.Rafael Espindola2015-02-171-31/+26
| | | | | | | | | | Original message: Invert the section relocation map. It now points from rel section to section. Use it to set sh_info, avoiding a brittle name lookup. llvm-svn: 229539
* Add r228888 back.Rafael Espindola2015-02-171-7/+3
| | | | | | | | Original message: Use the existing SymbolTableIndex instead of doing a lookup. NFC. llvm-svn: 229538
* Add r228886 back now that r229530 fixed the issue lldb was hitting.Rafael Espindola2015-02-171-47/+45
| | | | | | | | | | Original message: Create the Seciton -> Rel Section map when it is first needed. NFC. Saves a walk over every section. llvm-svn: 229536
* Removing LLVM_DELETED_FUNCTION, as MSVC 2012 was the last reason for ↵Aaron Ballman2015-02-151-2/+2
| | | | | | requiring the macro. NFC; LLVM edition. llvm-svn: 229340
* Format: Modernize using variadic templates.Benjamin Kramer2015-02-151-3/+3
| | | | | | | | | | | Introduces a subset of C++14 integer sequences in STLExtras. This is just enough to support unpacking a std::tuple into the arguments of snprintf, we can add more of it when it's actually needed. Also removes an ancient macro hack that leaks a macro into the global namespace. Clean up users that made use of the convenient hack. llvm-svn: 229337
* Revert a series of commits starting at r228886 which is triggering someChandler Carruth2015-02-134-104/+90
| | | | | | | | | | | | | | | | regressions for LLDB on Linux. Rafael indicated on lldb-dev that we should just go ahead and revert these but that he wasn't at a computer. The patches backed out are as follows: r228980: Add support for having multiple sections with the name and ... r228889: Invert the section relocation map. r228888: Use the existing SymbolTableIndex intsead of doing a lookup. r228886: Create the Section -> Rel Section map when it is first needed. These patches look pretty nice to me, so hoping its not too hard to get them re-instated. =D llvm-svn: 229080
* Add support for having multiple sections with the same name and comdat.Rafael Espindola2015-02-124-9/+34
| | | | | | | | Using this in combination with -ffunction-sections allows LLVM to output a .o file with mulitple sections named .text. This saves space by avoiding long unique names of the form .text.<C++ mangled name>. llvm-svn: 228980
* Learn that __DATA,__objc_classrefs is not atomized via symbols.Rafael Espindola2015-02-121-0/+4
| | | | | | This should hopefully fix objc on AArch64. llvm-svn: 228976
* Invert the section relocation map.Rafael Espindola2015-02-111-31/+26
| | | | | | | It now points from rel section to section. Use it to set sh_info, avoiding a brittle name lookup. llvm-svn: 228889
* Use the existing SymbolTableIndex instead of doing a lookup. NFC.Rafael Espindola2015-02-111-7/+3
| | | | llvm-svn: 228888
* Create the Seciton -> Rel Section map when it is first needed. NFC.Rafael Espindola2015-02-111-47/+45
| | | | | | Saves a walk over every section. llvm-svn: 228886
* Remove unused argument. NFC.Rafael Espindola2015-02-111-8/+4
| | | | llvm-svn: 228884
* Unbreak buildbotsDavid Majnemer2015-02-111-1/+2
| | | | | | The next offset should be updated as well. llvm-svn: 228883
* Don't recompute the entire section map just to add 3 entries. NFC.Rafael Espindola2015-02-111-6/+6
| | | | llvm-svn: 228881
* MC, COFF: Align section contents to a four byte boundaryDavid Majnemer2015-02-111-2/+9
| | | | llvm-svn: 228879
* Remove unused argument. NFC.Rafael Espindola2015-02-111-4/+2
| | | | llvm-svn: 228873
* Use ADDITIONAL_HEADER_DIRS in all LLVM CMake projects.Zachary Turner2015-02-112-0/+6
| | | | | | | | | | This allows IDEs to recognize the entire set of header files for each of the core LLVM projects. Differential Revision: http://reviews.llvm.org/D7526 Reviewed By: Chris Bieneman llvm-svn: 228798
* MC: Calculate intra-section symbol differences correctly for COFFDavid Majnemer2015-02-091-6/+11
| | | | | | This fixes PR22060. llvm-svn: 228565
* MC: Emit COFF section flags in the "proper" orderDavid Majnemer2015-02-071-4/+4
| | | | | | | | COFF section flags are not idempotent: 'rd' will make a read-write section because 'd' implies write 'dr' will make a read-only section because 'r' disables write llvm-svn: 228490
* Try to fix the build in MCValue.cppReid Kleckner2015-02-051-1/+1
| | | | llvm-svn: 228256
* Fixup.Sean Silva2015-02-051-2/+2
| | | | | | Didn't see these calls in my release build locally when testing. llvm-svn: 228254
* [MC] Remove various unused MCAsmInfo parameters.Sean Silva2015-02-053-9/+8
| | | | llvm-svn: 228244
* Compute the ELF SectionKind from the flags.Rafael Espindola2015-01-297-225/+96
| | | | | | | | | | | | Any code creating an MCSectionELF knows ELF and already provides the flags. SectionKind is an abstraction used by common code that uses a plain MCSection. Use the flags to compute the SectionKind. This removes a lot of guessing and boilerplate from the MCSectionELF construction. llvm-svn: 227476
* Store the passed in CPU name string so that it can be accessed later.Eric Christopher2015-01-261-1/+2
| | | | llvm-svn: 227101
* Add STB_GNU_UNIQUE to the ELF writer.Rafael Espindola2015-01-232-3/+9
| | | | | | This lets llvm-mc assemble files produced by gcc. llvm-svn: 226895
* [pr21886] Change MCJIT/ELF to support MSVC C++ mangled symbol.Rafael Espindola2015-01-221-9/+36
| | | | | | | | | | | | The ELF format is used on Windows by the MCJIT engine. Thus, on Windows, the ELFObjectWriter can encounter symbols mangled using the MS Visual Studio C++ name mangling. Symbols mangled using the MSVC C++ name mangling can legally have "@@@" as a substring. The EFLObjectWriter should not interpret the "@@@" substring as specifying GNU-style symbol versioning. The ELFObjectWriter therefore check for the MSVC C++ name mangling prefix which is either "?", "@?", "imp_?" or "imp_?@". llvm-svn: 226830
* ARM: fail less catastrophically on invalid Windows inputSaleem Abdulrasool2015-01-221-2/+3
| | | | | | | | | | | | Windows supports a restricted set of relocations (compared to ARM ELF). In some cases, we may end up generating an unsupported relocation. This can occur with bad input to the assembler in particular (the frontend should never generate code that cannot be compiled). Generate an error rather than just aborting. The change in the API is driven by the desire to provide a slightly more helpful message for debugging purposes. llvm-svn: 226779
* Add r224985 back with fixes.Rafael Espindola2015-01-195-46/+50
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The fixes are to note that AArch64 has additional restrictions on when local relocations can be used. In particular, ld64 requires that relocations to cstring/cfstrings use linker visible symbols. Original message: In an assembly expression like bar: .long L0 + 1 the intended semantics is that bar will contain a pointer one byte past L0. In sections that are merged by content (strings, 4 byte constants, etc), a single position in the section doesn't give the linker enough information. For example, it would not be able to tell a relocation must point to the end of a string, since that would look just like the start of the next. The solution used in ELF to use relocation with symbols if there is a non-zero addend. In MachO before this patch we would just keep all symbols in some sections. This would miss some cases (only cstrings on x86_64 were implemented) and was inefficient since most relocations have an addend of 0 and can be represented without the symbol. This patch implements the non-zero addend logic for MachO too. llvm-svn: 226503
* Produce errors when an assignment expression would use a common symbol.Rafael Espindola2015-01-191-1/+11
| | | | | | | | | | | An assignment will produce a symbol with a given section and offset. There is no way to represent something like "1 byte after a common symbol". This matches the behavior of GNU as. Part of PR22217. llvm-svn: 226470
* unique_ptrify the RelInfo parameter to TargetRegistry::createMCSymbolizerDavid Blaikie2015-01-182-7/+5
| | | | llvm-svn: 226416
* Replace size method call of containers to empty method where appropriateAlexander Kornienko2015-01-152-2/+2
| | | | | | | | | | | | | | | | This patch was generated by a clang tidy checker that is being open sourced. The documentation of that checker is the following: /// The emptiness of a container should be checked using the empty method /// instead of the size method. It is not guaranteed that size is a /// constant-time function, and it is generally more efficient and also shows /// clearer intent to use empty. Furthermore some containers may implement the /// empty method but not implement the size method. Using empty whenever /// possible makes it easier to switch to another container in the future. Patch by Gábor Horváth! llvm-svn: 226161
* Revert "Add r224985 back with two fixes."Rafael Espindola2015-01-145-50/+46
| | | | | | This reverts commit r225644 while I debug a regression. llvm-svn: 226022
OpenPOWER on IntegriCloud