summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
...
* Start stubbing out MCModule and MCAtom, which provide an API for accessing ↵Owen Anderson2011-09-222-0/+124
| | | | | | | | the rich disassembly of a complete object or executable. These are very much a work in progress, and not really useful yet. llvm-svn: 140345
* In the disassembler C API, be careful not to confuse the comment streamer ↵Owen Anderson2011-09-212-3/+7
| | | | | | that the disassembler outputs annotations on with the streamer that the InstPrinter will print them on. llvm-svn: 140217
* MCInstrAnalysis: Don't crash on instructions with no operands.Benjamin Kramer2011-09-191-1/+2
| | | | llvm-svn: 140027
* Don't attach annotations to MCInst's. Instead, have the disassembler ↵Owen Anderson2011-09-155-48/+11
| | | | | | return, and the printer accept, an annotation string which can be passed through if the client cares about annotations. llvm-svn: 139876
* The the MC disassembler C API to print in verbose mode. Perhaps there ↵Owen Anderson2011-09-152-1/+31
| | | | | | should be a parameter to request verbose mode? llvm-svn: 139821
* Add support for stored annotations to MCInst, and provide facilities for ↵Owen Anderson2011-09-152-0/+30
| | | | | | MC-based InstPrinters to print them out. Enhance the ARM and X86 InstPrinter's to do so in verbose mode. llvm-svn: 139820
* Assmebler symbol attribute directives don't work on temporary symbols.Jim Grosbach2011-09-151-1/+6
| | | | | | | | | Assembler private local symbols aren't legal targets of symbol attributes, so issue a diagnostic for them. Based on patch by Stepan Dyatkovskiy. llvm-svn: 139807
* Handle missing newline at EOF more gracefully in MC AsmLexer.Jim Grosbach2011-09-151-1/+8
| | | | | | | | | If we see an EOF w/o a preceding end-of-line, return an EndOfStatement token before returning the Eof token. Based on patch by Stepan Dyatkovskiy. llvm-svn: 139798
* Move state var to private class member.Jim Grosbach2011-09-141-1/+1
| | | | llvm-svn: 139697
* First step in supporting #line directives in assembler. This step parses theKevin Enderby2011-09-132-5/+69
| | | | | | | | | #line directives with the needed support in the lexer. Next will be to build a simple file/line# table mapping source SMLoc's for later use by diagnostics. And the last step will be to get the diagnostics to use the mapping for file and line numbers. llvm-svn: 139669
* Formatting and typo.Eric Christopher2011-09-081-2/+3
| | | | llvm-svn: 139325
* Fix a Darwin x86_64 special case of a jmp to a temporary symbol from an atomKevin Enderby2011-09-081-0/+10
| | | | | | without a base symbol that must not have a relocation entry. llvm-svn: 139316
* Refactor instprinter and mcdisassembler to take a SubtargetInfo. Add -mattr= ↵James Molloy2011-09-073-4/+15
| | | | | | handling to llvm-mc. Reviewed by Owen Anderson. llvm-svn: 139237
* As a first step, emit both the compact unwind and CIE/FDEs for a function.Bill Wendling2011-09-061-13/+7
| | | | llvm-svn: 139152
* Darwin wants ctors/dtors to be ordered the other way round to linux.Duncan Sands2011-09-022-0/+2
| | | | llvm-svn: 139015
* Don't drop alignment info on local common symbols.Benjamin Kramer2011-09-0110-18/+33
| | | | | | | | | | | - On COFF the .lcomm directive has an alignment argument. - On ELF we fall back to .local + .comm Based on a patch by NAKAMURA Takumi. Fixes PR9337, PR9483 and PR10128. llvm-svn: 138976
* Fix apparent build error caused by r138948 on certain versions of GCC with ↵James Molloy2011-09-012-21/+36
| | | | | | -Werror. Sorry for the inconvenience. llvm-svn: 138973
* Fix the build for us -Werror users.Nick Lewycky2011-09-012-37/+24
| | | | | | | Remove broken emacs mode major notation marking a C++ file as C. No functionality change. llvm-svn: 138963
* Fix up r137380 based on post-commit review by Jim Grosbach.James Molloy2011-09-012-19/+32
| | | | llvm-svn: 138948
* Fix C++0x narrowing errors when char is unsigned.Jeffrey Yasskin2011-08-303-3/+3
| | | | | | | In the case of EDInstInfo, this would actually cause a bug when -1 became 255 and was then compared >=0 in llvm-mc/Disassembler.cpp. llvm-svn: 138825
* Fix grammar, noticed by Duncan.Bill Wendling2011-08-291-1/+1
| | | | llvm-svn: 138764
* Initialize CompactUnwindSection so that other targets won't use an ↵Bill Wendling2011-08-291-1/+2
| | | | | | uninitialized value. llvm-svn: 138752
* Initialize member variable.Benjamin Kramer2011-08-251-1/+2
| | | | llvm-svn: 138548
* Some autoconf tests use module level inline asm to test compiler's handling ofEvan Cheng2011-08-242-3/+3
| | | | | | | | | | | | | | | | .cfi_startproc. e.g. libffi: $ cat confopt.c asm (".cfi_startproc\n\t.cfi_endproc"); int main () { return 0; } Teach MC / dwarf emission to handle these cfi directives which essentially create an empty frame. rdar://10017184 llvm-svn: 138504
* Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng2011-08-244-6/+6
| | | | | | These are strictly utilities for registering targets and components. llvm-svn: 138450
* Fix AsmParser binary precedence for shift operators.Jim Grosbach2011-08-201-16/+21
| | | | | | rdar://9976729 llvm-svn: 138208
* Fixed a memory bug in the MCDisassembler whereSean Callanan2011-08-191-1/+5
| | | | | | MCParsedAsmOperand objects were being leaked. llvm-svn: 138053
* Remove unused Target argument from AsmParser construction methods.Jim Grosbach2011-08-162-5/+5
| | | | | | The argument is unused, and is a layering violation in any case. llvm-svn: 137735
* MachOWriter: Don't crash on fixups with arithmetic, emit a relocation ↵Benjamin Kramer2011-08-121-2/+6
| | | | | | instead. This matches what as does. llvm-svn: 137414
* Don't truncate MachO addresses.Jim Grosbach2011-08-091-1/+1
| | | | | | | | | | | | | | Assigned symbol addresses get truncated to 32-bits, even on 64-bit platforms. That's obviously bogus. For example, .globl _foo .equ _foo, 0x987654321ULL rdar://9922863 llvm-svn: 137158
* Pacify virtual dtor warnings and cmake buildbots.Benjamin Kramer2011-08-081-0/+1
| | | | llvm-svn: 137060
* Add MCInstrAnalysis class. This allows the targets to specify own versions ↵Benjamin Kramer2011-08-081-0/+20
| | | | | | | | | of MCInstrDescs functions. - Add overrides for ARM. - Teach llvm-objdump to use this instead of plain MCInstrDesc. llvm-svn: 137059
* allow \r's in .s files.Chris Lattner2011-08-041-1/+1
| | | | llvm-svn: 136908
* Introduce adjustFixupOffset that adjusts the fixup offset of a relocation.Roman Divacky2011-08-042-12/+16
| | | | | | | | This is meant to be overriden by backends. Implement an override on PowerPC which adjusts the offset by 2 for ha16/lo16 relocation kinds. This removes a commented out hack and enables hello world to be compiled on PowerPC. llvm-svn: 136905
* Add an assert to check that the Addend fits the file format.Rafael Espindola2011-08-041-0/+6
| | | | llvm-svn: 136868
* Fix http://llvm.org/bugs/show_bug.cgi?id=10568Jason W Kim2011-08-041-1/+0
| | | | | | Move the reloc size assert into AsmBackend - where it is more apropos. llvm-svn: 136855
* Assume .cfi_startproc is the first thing in a function. If the function isRafael Espindola2011-08-021-7/+14
| | | | | | | | | externally visable, create a local symbol to use in the CFE. If not, use the function label itself. Fixes PR10420. llvm-svn: 136716
* Comment out the PPC relocation offset adjustment. It must be done differently.Roman Divacky2011-08-021-0/+4
| | | | | | This unbreaks some tests. llvm-svn: 136692
* Sketch out PowerPC ELF writer. This is enough to get clang -integrated-asRoman Divacky2011-08-022-0/+85
| | | | | | to compile a working hello world on FreeBSD/PPC32. llvm-svn: 136689
* I mis-interpreted the MCDisassembler's intended dependencies. Now to fixChandler Carruth2011-07-311-2/+9
| | | | | | | | | | | | | them properly. Specifically, the disassembler clearly attempts to initialiaze all TargetInfo, MCTargeDesc, AsmParser, and Disassembler sublibraries of registered targets. This makes the CMakeLists accurately reflect this intent in the code. This should fix the last of the link errors that I have gotten reports of on OS X, but if anyone continues to see link errors, continue to pester me and I'll look into it. llvm-svn: 136603
* On mac, it seems the MC disassembler is actually using the targetinfoChandler Carruth2011-07-291-0/+2
| | | | | | | | for targets that don't have an MC-ized disassembler. I'm suspicious that this shouldn't actually be happening, but hoping to fix the CMake build on macs first, and investigate why second. llvm-svn: 136508
* Fix the MCDisassembler dependencies. These were just absurdly wrong.Chandler Carruth2011-07-291-34/+7
| | | | | | | | | | | | First off, only depend on the actual MC-ized disassemblers in the targets, not all of the libraries those in turn depend on. Second off, only depend on those MC-ized disassemblers for targets we're building. This should fix builds of fewer than all targets. llvm-svn: 136455
* Rewrite the CMake build to use explicit dependencies between libraries,Chandler Carruth2011-07-293-1/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | specified in the same file that the library itself is created. This is more idiomatic for CMake builds, and also allows us to correctly specify dependencies that are missed due to bugs in the GenLibDeps perl script, or change from compiler to compiler. On Linux, this returns CMake to a place where it can relably rebuild several targets of LLVM. I have tried not to change the dependencies from the ones in the current auto-generated file. The only places I've really diverged are in places where I was seeing link failures, and added a dependency. The goal of this patch is not to start changing the dependencies, merely to move them into the correct location, and an explicit form that we can control and change when necessary. This also removes a serialization point in the build because we don't have to scan all the libraries before we begin building various tools. We no longer have a step of the build that regenerates a file inside the source tree. A few other associated cleanups fall out of this. This isn't really finished yet though. After talking to dgregor he urged switching to a single CMake macro to construct libraries with both sources and dependencies in the arguments. Migrating from the two macros to that style will be a follow-up patch. Also, llvm-config is still generated with GenLibDeps.pl, which means it still has slightly buggy dependencies. The internal CMake 'llvm-config-like' macro uses the correct explicitly specified dependencies however. A future patch will switch llvm-config generation (when using CMake) to be based on these deps as well. This may well break Windows. I'm getting a machine set up now to dig into any failures there. If anyone can chime in with problems they see or ideas of how to solve them for Windows, much appreciated. llvm-svn: 136433
* Support .code32 and .code64 in X86 assembler.Evan Cheng2011-07-275-7/+13
| | | | llvm-svn: 136197
* Remove one last reference to Target in MC library.Evan Cheng2011-07-261-1/+1
| | | | llvm-svn: 136145
* Rename TargetAsmParser to MCTargetAsmParser and TargetAsmLexer to ↵Evan Cheng2011-07-269-23/+25
| | | | | | MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser. llvm-svn: 136027
* TargetAsmBackend has been renamed to MCAsmBackend.Evan Cheng2011-07-251-1/+1
| | | | llvm-svn: 136012
* Rename TargetAsmBackend to MCAsmBackend; rename createAsmBackend to ↵Evan Cheng2011-07-2513-38/+36
| | | | | | createMCAsmBackend. llvm-svn: 136010
* Add a missing enumerator to this switch. Currently its in theChandler Carruth2011-07-251-0/+1
| | | | | | | | | | | | | | assert-path code, as previously we would have fallen off the end of the function, but please review and let me know if this should go somewhere else. This fixes a Clang warning: lib/MC/MCMachOStreamer.cpp:201:11: error: enumeration value 'MCSA_IndirectSymbol' not handled in switch [-Werror,-Wswitch-enum] switch (Attribute) { ^ 1 error generated. llvm-svn: 135976
* Separate MCInstPrinter registration from AsmPrinter registration.Evan Cheng2011-07-252-2/+0
| | | | llvm-svn: 135974
OpenPOWER on IntegriCloud