summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* Fix last bits of MC layer issues. llvm-mc doesn't need to initialize ↵Evan Cheng2011-07-252-26/+8
| | | | | | TargetMachine's anymore. llvm-svn: 135963
* Refactor X86 target to separate MC code from Target code.Evan Cheng2011-07-252-2/+2
| | | | llvm-svn: 135930
* Move some ELF directives into ELF asm parser.Jim Grosbach2011-07-254-12/+78
| | | | | | | | | | | | | | The .local, .hidden, .internal, and .protected are not legal for all supported file formats (in particular, they're invalid for MachO). Move the parsing for them into the ELF assembly parser since that's the format they're for. Similarly, .weak is used by COFF and ELF, but not MachO, so move the parsing to the COFF and ELF asm parsers. Previously, using any of these directives on Darwin would result in an assertion failure in the parser; now we get a diagnostic as we should. rdar://9827089 llvm-svn: 135921
* Tidy up. 80 columns.Jim Grosbach2011-07-251-5/+10
| | | | llvm-svn: 135917
* Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where ↵Evan Cheng2011-07-2318-19/+34
| | | | | | they belong. llvm-svn: 135833
* Sink ARM mc routines into MCTargetDesc.Evan Cheng2011-07-231-1/+1
| | | | llvm-svn: 135825
* Combine all MC initialization routines into one. e.g. InitializeX86MCAsmInfo,Evan Cheng2011-07-222-7/+3
| | | | | | InitializeX86MCInstrInfo, etc. are combined into InitializeX86TargetMC. llvm-svn: 135812
* Emit the __compact_unwind section first. If there are any frames which weren'tBill Wendling2011-07-221-14/+27
| | | | | | emitted, emit them next as CIE/FDEs. llvm-svn: 135807
* X86 is the only target that uses coff format. This should fixes test ↵Evan Cheng2011-07-201-2/+3
| | | | | | failures running on Windows, Cygwin, or MingW hosts. llvm-svn: 135639
* Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.Evan Cheng2011-07-208-44/+61
| | | | | | | There is still a bit more refactoring left to do in Targets. But we are now very close to fixing all the layering issues in MC. llvm-svn: 135611
* Initialize the EHFrameSection pointer to zero.Benjamin Kramer2011-07-201-0/+1
| | | | | | This should fix the spurious buildbot errors. llvm-svn: 135594
* - Move CodeModel from a TargetMachine global option to MCCodeGenInfo.Evan Cheng2011-07-201-1/+2
| | | | | | | | - Introduce JITDefault code model. This tells targets to set different default code model for JIT. This eliminates the ugly hack in TargetMachine where code model is changed after construction. llvm-svn: 135580
* Include MCRegisterInfo to eliminate a compilation warning.Evan Cheng2011-07-201-1/+2
| | | | llvm-svn: 135575
* Fix the CMake build.Francois Pichet2011-07-201-0/+1
| | | | llvm-svn: 135573
OpenPOWER on IntegriCloud