summaryrefslogtreecommitdiff
path: root/lib/MC
Commit message (Collapse)AuthorAge
* Sort CMakeLists.txt.Benjamin Kramer2011-09-24
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140465 91177308-0d34-0410-b5e6-96231b3b80d8
* PR10989: Don't print .hidden on Windows.Eli Friedman2011-09-23
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140356 91177308-0d34-0410-b5e6-96231b3b80d8
* Add new files to CMake.Owen Anderson2011-09-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140352 91177308-0d34-0410-b5e6-96231b3b80d8
* Update CMake build.Benjamin Kramer2011-09-22
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140347 91177308-0d34-0410-b5e6-96231b3b80d8
* Start stubbing out MCModule and MCAtom, which provide an API for accessing ↵Owen Anderson2011-09-22
| | | | | | | | | the rich disassembly of a complete object or executable. These are very much a work in progress, and not really useful yet. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140345 91177308-0d34-0410-b5e6-96231b3b80d8
* In the disassembler C API, be careful not to confuse the comment streamer ↵Owen Anderson2011-09-21
| | | | | | that the disassembler outputs annotations on with the streamer that the InstPrinter will print them on. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140217 91177308-0d34-0410-b5e6-96231b3b80d8
* MCInstrAnalysis: Don't crash on instructions with no operands.Benjamin Kramer2011-09-19
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@140027 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't attach annotations to MCInst's. Instead, have the disassembler ↵Owen Anderson2011-09-15
| | | | | | return, and the printer accept, an annotation string which can be passed through if the client cares about annotations. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139876 91177308-0d34-0410-b5e6-96231b3b80d8
* The the MC disassembler C API to print in verbose mode. Perhaps there ↵Owen Anderson2011-09-15
| | | | | | should be a parameter to request verbose mode? git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139821 91177308-0d34-0410-b5e6-96231b3b80d8
* Add support for stored annotations to MCInst, and provide facilities for ↵Owen Anderson2011-09-15
| | | | | | MC-based InstPrinters to print them out. Enhance the ARM and X86 InstPrinter's to do so in verbose mode. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139820 91177308-0d34-0410-b5e6-96231b3b80d8
* Assmebler symbol attribute directives don't work on temporary symbols.Jim Grosbach2011-09-15
| | | | | | | | | | Assembler private local symbols aren't legal targets of symbol attributes, so issue a diagnostic for them. Based on patch by Stepan Dyatkovskiy. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139807 91177308-0d34-0410-b5e6-96231b3b80d8
* Handle missing newline at EOF more gracefully in MC AsmLexer.Jim Grosbach2011-09-15
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139798 91177308-0d34-0410-b5e6-96231b3b80d8
* Move state var to private class member.Jim Grosbach2011-09-14
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139697 91177308-0d34-0410-b5e6-96231b3b80d8
* First step in supporting #line directives in assembler. This step parses theKevin Enderby2011-09-13
| | | | | | | | | | #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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139669 91177308-0d34-0410-b5e6-96231b3b80d8
* Formatting and typo.Eric Christopher2011-09-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139325 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix a Darwin x86_64 special case of a jmp to a temporary symbol from an atomKevin Enderby2011-09-08
| | | | | | | without a base symbol that must not have a relocation entry. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139316 91177308-0d34-0410-b5e6-96231b3b80d8
* Refactor instprinter and mcdisassembler to take a SubtargetInfo. Add -mattr= ↵James Molloy2011-09-07
| | | | | | handling to llvm-mc. Reviewed by Owen Anderson. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139237 91177308-0d34-0410-b5e6-96231b3b80d8
* As a first step, emit both the compact unwind and CIE/FDEs for a function.Bill Wendling2011-09-06
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139152 91177308-0d34-0410-b5e6-96231b3b80d8
* Darwin wants ctors/dtors to be ordered the other way round to linux.Duncan Sands2011-09-02
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@139015 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't drop alignment info on local common symbols.Benjamin Kramer2011-09-01
| | | | | | | | | | | - 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138976 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix apparent build error caused by r138948 on certain versions of GCC with ↵James Molloy2011-09-01
| | | | | | -Werror. Sorry for the inconvenience. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138973 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the build for us -Werror users.Nick Lewycky2011-09-01
| | | | | | | | Remove broken emacs mode major notation marking a C++ file as C. No functionality change. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138963 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix up r137380 based on post-commit review by Jim Grosbach.James Molloy2011-09-01
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138948 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix C++0x narrowing errors when char is unsigned.Jeffrey Yasskin2011-08-30
| | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138825 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix grammar, noticed by Duncan.Bill Wendling2011-08-29
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138764 91177308-0d34-0410-b5e6-96231b3b80d8
* Initialize CompactUnwindSection so that other targets won't use an ↵Bill Wendling2011-08-29
| | | | | | uninitialized value. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138752 91177308-0d34-0410-b5e6-96231b3b80d8
* Initialize member variable.Benjamin Kramer2011-08-25
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138548 91177308-0d34-0410-b5e6-96231b3b80d8
* Some autoconf tests use module level inline asm to test compiler's handling ofEvan Cheng2011-08-24
| | | | | | | | | | | | | | | | | .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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138504 91177308-0d34-0410-b5e6-96231b3b80d8
* Move TargetRegistry and TargetSelect from Target to Support where they belong.Evan Cheng2011-08-24
| | | | | | | These are strictly utilities for registering targets and components. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138450 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix AsmParser binary precedence for shift operators.Jim Grosbach2011-08-20
| | | | | | | | rdar://9976729 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138208 91177308-0d34-0410-b5e6-96231b3b80d8
* Fixed a memory bug in the MCDisassembler whereSean Callanan2011-08-19
| | | | | | | MCParsedAsmOperand objects were being leaked. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@138053 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove unused Target argument from AsmParser construction methods.Jim Grosbach2011-08-16
| | | | | | | The argument is unused, and is a layering violation in any case. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137735 91177308-0d34-0410-b5e6-96231b3b80d8
* MachOWriter: Don't crash on fixups with arithmetic, emit a relocation ↵Benjamin Kramer2011-08-12
| | | | | | instead. This matches what as does. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137414 91177308-0d34-0410-b5e6-96231b3b80d8
* Don't truncate MachO addresses.Jim Grosbach2011-08-09
| | | | | | | | | | | | | | | | 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 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137158 91177308-0d34-0410-b5e6-96231b3b80d8
* Pacify virtual dtor warnings and cmake buildbots.Benjamin Kramer2011-08-08
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137060 91177308-0d34-0410-b5e6-96231b3b80d8
* Add MCInstrAnalysis class. This allows the targets to specify own versions ↵Benjamin Kramer2011-08-08
| | | | | | | | | of MCInstrDescs functions. - Add overrides for ARM. - Teach llvm-objdump to use this instead of plain MCInstrDesc. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@137059 91177308-0d34-0410-b5e6-96231b3b80d8
* allow \r's in .s files.Chris Lattner2011-08-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136908 91177308-0d34-0410-b5e6-96231b3b80d8
* Introduce adjustFixupOffset that adjusts the fixup offset of a relocation.Roman Divacky2011-08-04
| | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136905 91177308-0d34-0410-b5e6-96231b3b80d8
* Add an assert to check that the Addend fits the file format.Rafael Espindola2011-08-04
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136868 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix http://llvm.org/bugs/show_bug.cgi?id=10568Jason W Kim2011-08-04
| | | | | | Move the reloc size assert into AsmBackend - where it is more apropos. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136855 91177308-0d34-0410-b5e6-96231b3b80d8
* Assume .cfi_startproc is the first thing in a function. If the function isRafael Espindola2011-08-02
| | | | | | | | | externally visable, create a local symbol to use in the CFE. If not, use the function label itself. Fixes PR10420. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136716 91177308-0d34-0410-b5e6-96231b3b80d8
* Comment out the PPC relocation offset adjustment. It must be done differently.Roman Divacky2011-08-02
| | | | | | | This unbreaks some tests. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136692 91177308-0d34-0410-b5e6-96231b3b80d8
* Sketch out PowerPC ELF writer. This is enough to get clang -integrated-asRoman Divacky2011-08-02
| | | | | | | | to compile a working hello world on FreeBSD/PPC32. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136689 91177308-0d34-0410-b5e6-96231b3b80d8
* I mis-interpreted the MCDisassembler's intended dependencies. Now to fixChandler Carruth2011-07-31
| | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136603 91177308-0d34-0410-b5e6-96231b3b80d8
* On mac, it seems the MC disassembler is actually using the targetinfoChandler Carruth2011-07-29
| | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136508 91177308-0d34-0410-b5e6-96231b3b80d8
* Fix the MCDisassembler dependencies. These were just absurdly wrong.Chandler Carruth2011-07-29
| | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136455 91177308-0d34-0410-b5e6-96231b3b80d8
* Rewrite the CMake build to use explicit dependencies between libraries,Chandler Carruth2011-07-29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136433 91177308-0d34-0410-b5e6-96231b3b80d8
* Support .code32 and .code64 in X86 assembler.Evan Cheng2011-07-27
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136197 91177308-0d34-0410-b5e6-96231b3b80d8
* Remove one last reference to Target in MC library.Evan Cheng2011-07-26
| | | | git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136145 91177308-0d34-0410-b5e6-96231b3b80d8
* Rename TargetAsmParser to MCTargetAsmParser and TargetAsmLexer to ↵Evan Cheng2011-07-26
| | | | | | MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@136027 91177308-0d34-0410-b5e6-96231b3b80d8