summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mc
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove the now unused StringRefMemoryObject.h.Rafael Espindola2014-11-121-1/+0
| | | | llvm-svn: 221755
* Pass an ArrayRef to MCDisassembler::getInstruction.Rafael Espindola2014-11-121-3/+2
| | | | | | | | | | | | With this patch MCDisassembler::getInstruction takes an ArrayRef<uint8_t> instead of a MemoryObject. Even on X86 there is a maximum size an instruction can have. Given that, it seems way simpler and more efficient to just pass an ArrayRef to the disassembler instead of a MemoryObject and have it do a virtual call every time it wants some extra bytes. llvm-svn: 221751
* [llvm-mc] Fixing case where if a file ended with non-newline whitespace or a ↵Colin LeMahieu2014-11-111-15/+9
| | | | | | | | comma it would access invalid memory. Cleaned up parse loop. llvm-svn: 221707
* Use StringRefMemoryObject in llvm-mc. NFC.Rafael Espindola2014-11-071-29/+15
| | | | llvm-svn: 221536
* Simplify handling of --noexecstack by using getNonexecutableStackSection.Rafael Espindola2014-10-152-4/+5
| | | | llvm-svn: 219799
* Modernize raw_fd_ostream's constructor a bit.Rafael Espindola2014-08-251-4/+4
| | | | | | | | | | Take a StringRef instead of a "const char *". Take a "std::error_code &" instead of a "std::string &" for error. A create static method would be even better, but this patch is already a bit too big. llvm-svn: 216393
* Explicitly pass ownership of the MemoryBuffer to AddNewSourceBuffer using ↵David Blaikie2014-08-211-2/+2
| | | | | | std::unique_ptr llvm-svn: 216223
* Canonicalize header guards into a common format.Benjamin Kramer2014-08-131-2/+2
| | | | | | | | | | Add header guards to files that were missing guards. Remove #endif comments as they don't seem common in LLVM (we can easily add them back if we decide they're useful) Changes made by clang-tidy with minor tweaks. llvm-svn: 215558
* Update the MemoryBuffer API to use ErrorOr.Rafael Espindola2014-07-061-5/+5
| | | | llvm-svn: 212405
* This only needs a StringRef.Rafael Espindola2014-07-061-1/+1
| | | | llvm-svn: 212401
* SourceMgr: make valid buffer IDs start from oneAlp Toker2014-07-061-1/+1
| | | | | | | | | | Use 0 for the invalid buffer instead of -1/~0 and switch to unsigned representation to enable more idiomatic usage. Also introduce a trivial SourceMgr::getMainFileID() instead of hard-coding 0/1 to identify the main file. llvm-svn: 212398
* Simplify code a bit, no functionality change.Rafael Espindola2014-06-281-3/+3
| | | | llvm-svn: 211985
* Move -dwarf-version to an MC level command line option so it'sEric Christopher2014-06-191-7/+7
| | | | | | | used by all of the MC level tools and codegen. Fix up all uses in the compiler to use this and set it on the context accordingly. llvm-svn: 211257
* 80-column fixups.Eric Christopher2014-06-191-5/+10
| | | | llvm-svn: 211255
* Remove 'using std::error_code' from tools.Rafael Espindola2014-06-131-2/+2
| | | | llvm-svn: 210876
* Don't use 'using std::error_code' in include/llvm.Rafael Espindola2014-06-121-0/+1
| | | | | | This should make sure that most new uses use the std prefix. llvm-svn: 210835
* llvm-mc: Add option for prefering hex format disassembly.Jim Grosbach2014-06-111-9/+9
| | | | | | | | | Previously there was a separate mode entirely (--hdis vs. --disassemble). It makes a bit more sense for the immediate printing style to be a flag for --disassmeble rather than an entirely different thing. llvm-svn: 210700
* Move MCOptions that aren't shared between programs into their specificEric Christopher2014-05-211-0/+3
| | | | | | program and have them initialize the MCOptions struct explicitly. llvm-svn: 209321
* This command line option is only used in one place. Move it there andEric Christopher2014-05-211-0/+3
| | | | | | rename it to something more descriptive. llvm-svn: 209263
* Unify command line handling of MCTargetOptions and remove extraEric Christopher2014-05-151-9/+0
| | | | | | options and code. No functional change. llvm-svn: 208833
* Remove the UseCFI option from createAsmStreamer.Rafael Espindola2014-05-071-3/+2
| | | | | | We were already always passing true, this just removes the option. llvm-svn: 208205
* Record the DWARF version in MCContextOliver Stannard2014-05-011-0/+9
| | | | | | | Record the DWARF version in MCContext, and use it when emitting the dwarf version into the debug info. llvm-svn: 207739
* [C++] Use 'nullptr'. Tools edition.Craig Topper2014-04-252-6/+6
| | | | llvm-svn: 207176
* Create MCTargetOptions.Evgeniy Stepanov2014-04-231-2/+5
| | | | | | | | | For now it contains a single flag, SanitizeAddress, which enables AddressSanitizer instrumentation of inline assembly. Patch by Yuri Gorshenin. llvm-svn: 206971
* [MC] Require an MCContext when constructing an MCDisassembler.Lang Hames2014-04-151-1/+21
| | | | | | | | | | | | | | | | This patch re-introduces the MCContext member that was removed from MCDisassembler in r206063, and requires that an MCContext be passed in at MCDisassembler construction time. (Previously the MCContext member had been initialized in an ad-hoc fashion after construction). The MCCContext member can be used by MCDisassembler sub-classes to construct constant or target-specific MCExprs. This patch updates disassemblers for in-tree targets, and provides the MCRegisterInfo instance that some disassemblers were using through the MCContext (previously those backends were constructing their own MCRegisterInfo instances). llvm-svn: 206241
* Add missing include (for r205050)David Blaikie2014-03-281-0/+1
| | | | llvm-svn: 205053
* llvm-mc: error when -compress-debug-sections is requested and zlib is not linkedDavid Blaikie2014-03-281-1/+6
| | | | | | | | | | This is a bit of a stab in the dark, since I have zlib on my machine. Just going to bounce it off the bots & see if it sticks. Do we have some convention for negative REQUIRES: checks? Or do I just need to add a feature like I've done here? llvm-svn: 205050
* DebugInfo: Support for compressed debug info sectionsDavid Blaikie2014-03-271-0/+6
| | | | | | | | | | | | | | | | | | | 1) When creating a .debug_* section and instead create a .zdebug_ section. 2) When creating a fragment in a .zdebug_* section, make it a compressed fragment. 3) When computing the size of a compressed section, compress the data and use the size of the compressed data. 4) Emit the compressed bytes. Also, check that only if a section has a compressed fragment, then that is the only fragment in the section. Assert-fail if the fragment's data is modified after it is compressed. Initial review on llvm-commits by Eric Christopher and Rafael Espindola. llvm-svn: 204958
* Remove llvm-mc's disable-cfi option.Rafael Espindola2014-03-201-7/+4
| | | | | | It was dead. llvm-svn: 204404
* [C++11] Add 'override' keyword to virtual methods that override their base ↵Craig Topper2014-03-081-3/+3
| | | | | | class. llvm-svn: 203345
* Replace OwningPtr<T> with std::unique_ptr<T>.Ahmed Charles2014-03-062-15/+13
| | | | | | | | | | This compiles with no changes to clang/lld/lldb with MSVC and includes overloads to various functions which are used by those projects and llvm which have OwningPtr's as parameters. This should allow out of tree projects some time to move. There are also no changes to libs/Target, which should help out of tree targets have time to move, if necessary. llvm-svn: 203083
* [C++11] Replace OwningPtr::take() with OwningPtr::release().Ahmed Charles2014-03-051-1/+1
| | | | llvm-svn: 202957
* Replace the F_Binary flag with a F_Text one.Rafael Espindola2014-02-241-1/+1
| | | | | | | | | After this I will set the default back to F_None. The advantage is that before this patch forgetting to set F_Binary would corrupt a file on windows. Forgetting to set F_Text produces one that cannot be read in notepad, which is a better failure mode :-) llvm-svn: 202052
* Remove support for not using .loc directives.Rafael Espindola2014-02-051-5/+3
| | | | | | Clang itself was not using this. The only way to access it was via llc. llvm-svn: 200862
* Change MCStreamer EmitInstruction interface to take subtarget infoDavid Woodhouse2014-01-281-3/+4
| | | | llvm-svn: 200345
* Pass a MCSubtargetInfo down to the TargetStreamer creation.Rafael Espindola2014-01-261-1/+1
| | | | | | | With this the target streamers will be able to know the target features that are in use. llvm-svn: 200135
* Whitespace.NAKAMURA Takumi2014-01-221-1/+1
| | | | llvm-svn: 199785
* [CMake] Update LLVM_LINK_COMPONENTS for each CMakeLists.txt.NAKAMURA Takumi2013-12-101-1/+6
| | | | llvm-svn: 196908
* Add an instruction deprecation feature to TableGen.Joey Gouly2013-09-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | The 'Deprecated' class allows you to specify a SubtargetFeature that the instruction is deprecated on. The 'ComplexDeprecationPredicate' class allows you to define a custom predicate that is called to check for deprecation. For example: ComplexDeprecationPredicate<"MCR"> would mean you would have to define the following function: bool getMCRDeprecationInfo(MCInst &MI, MCSubtargetInfo &STI, std::string &Info) Which returns 'false' for not deprecated, and 'true' for deprecated and store the warning message in 'Info'. The MCTargetAsmParser constructor was chaned to take an extra argument of the MCInstrInfo class, so out-of-tree targets will need to be changed. llvm-svn: 190598
* Generate compact unwind encoding from CFI directives.Bill Wendling2013-09-091-2/+2
| | | | | | | | | | | | | | | We used to generate the compact unwind encoding from the machine instructions. However, this had the problem that if the user used `-save-temps' or compiled their hand-written `.s' file (with CFI directives), we wouldn't generate the compact unwind encoding. Move the algorithm that generates the compact unwind encoding into the MCAsmBackend. This way we can generate the encoding whether the code is from a `.ll' or `.s' file. <rdar://problem/13623355> llvm-svn: 190290
* Improve llvm-mc disassembler mode and refactor ARM tests to use itTim Northover2013-07-191-12/+60
| | | | | | | | | | | | | | | | | | This allows "llvm-mc -disassemble" to accept two new features: + Using comma as a byte separator + Grouping bytes with '[' and ']' pairs. The behaviour outside a [...] group is unchanged. But within the group once llvm-mc encounters a true error, it stops rather than trying to resynchronise the stream at the next byte. This is more useful for disassembly tests, where we have an almost-instruction in mind and don't care what the misaligned interpretation would be. Particularly if it means llvm-mc won't actually see the next intended almost-instruction. As a side effect, this means llvm-mc can disassemble its own -show-encoding output if copy-pasted. llvm-svn: 186661
* Add a wrapper for open.Rafael Espindola2013-07-161-2/+2
| | | | | | | This centralizes the handling of O_BINARY and opens the way for hiding more differences (like how open behaves with directories). llvm-svn: 186447
* Use pointers to the MCAsmInfo and MCRegInfo.Bill Wendling2013-06-181-1/+1
| | | | | | | | | Someone may want to do something crazy, like replace these objects if they change or something. No functionality change intended. llvm-svn: 184175
* Remove the MachineMove class.Rafael Espindola2013-05-131-3/+3
| | | | | | | | | | | | It was just a less powerful and more confusing version of MCCFIInstruction. A side effect is that, since MCCFIInstruction uses dwarf register numbers, calls to getDwarfRegNum are pushed out, which should allow further simplifications. I left the MachineModuleInfo::addFrameMove interface unchanged since this patch was already fairly big. llvm-svn: 181680
* Remove some redundant includes in llvm-mc.cpp.Rafael Espindola2013-05-061-3/+0
| | | | | | Patch by Jun Koi! llvm-svn: 181231
* Try to get rid of a -wunitialized warning: explicitly initialize the pointerEli Bendersky2013-02-261-1/+3
| | | | | | to NULL and use asserts to check in relevant places. llvm-svn: 176134
* Remove unneeded include and empty lineEli Bendersky2013-01-161-2/+0
| | | | llvm-svn: 172642
* We want the dwarf AT_producer for assembly source files to match clang'sKevin Enderby2013-01-161-0/+11
| | | | | | | | | | | | | | | AT_producer. Which includes clang's version information so we can tell which version of the compiler was used. This is the first of two steps to allow us to do that. This is the llvm-mc change to provide a method to set the AT_producer string. The second step, coming soon to a clang near you, will have the clang driver pass the value of getClangFullVersion() via an flag when invoking the integrated assembler on assembly source files. rdar://12955296 llvm-svn: 172630
* Remove MCTargetAsmLexer and its derived classes now that edis,Roman Divacky2012-12-201-3/+0
| | | | | | its only user, is gone. llvm-svn: 170699
* Remove edis - the enhanced disassembler. Fixes PR14654.Roman Divacky2012-12-193-187/+0
| | | | llvm-svn: 170578
OpenPOWER on IntegriCloud