summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC
Commit message (Collapse)AuthorAgeFilesLines
...
* Finish supporting cpp #file/line comments in assembler for error messages. SoKevin Enderby2011-10-121-5/+64
| | | | | | | | for cpp pre-processed assembly we give correct filename and line numbers when reporting errors in assembly files when using clang and -integrated-as on .s files. rdar://8998895 llvm-svn: 141814
* Hoist vector.size() computation out of the loop. No functionality change.Nick Lewycky2011-10-121-1/+2
| | | | llvm-svn: 141807
* Also create a shndx even if there are no symbols. This lets us testNick Lewycky2011-10-111-0/+3
| | | | | | | .symtab_shndx reading and writing together, and finally we have a testcase for r141440. llvm-svn: 141641
* MCAtom extending methods need to extend the range of the atom as well.Owen Anderson2011-10-101-0/+18
| | | | llvm-svn: 141557
* Don't emit the symbol table entry for the .symtab_shndx section either.Nick Lewycky2011-10-071-1/+2
| | | | llvm-svn: 141440
* Remove extraneous curlies. No functionality change.Nick Lewycky2011-10-071-2/+1
| | | | llvm-svn: 141439
* Don't emit a shstrtabindex in the reserved range. Spotted by inspection andNick Lewycky2011-10-071-1/+1
| | | | | | patch by Cary Coutant! llvm-svn: 141413
* Clarify/fix typo. No functionality change.Nick Lewycky2011-10-071-2/+2
| | | | llvm-svn: 141412
* Teach the MC to output code/data region marker labels in MachO and ELF ↵Owen Anderson2011-10-044-1/+101
| | | | | | modes. These are used by disassemblers to provide better disassembly, particularly on targets like ARM Thumb that like to intermingle data in the TEXT segment. llvm-svn: 141135
* Adding back support for printing operands symbolically to ARM's new disassemblerKevin Enderby2011-10-042-3/+3
| | | | | | | | | | | | | | | | | | | using llvm's public 'C' disassembler API now including annotations. Hooked this up to Darwin's otool(1) so it can again print things like branch targets for example this: blx _puts instead of this: blx #-36 and includes support for annotations for branches to symbol stubs like: bl 0x40 @ symbol stub for: _puts and annotations for pc relative loads like this: ldr r3, #8 @ literal pool for: Hello, world! Also again can print the expression encoded in the Mach-O relocation entries for things like this: movt r0, :upper16:((_foo-_bar)+1234) llvm-svn: 141129
* Add definition of MipsELFObjectWriter.Akira Hatanaka2011-09-302-0/+33
| | | | | | Patch by Reed Kotler at Mips Technologies. llvm-svn: 140891
* Sort CMakeLists.txt.Benjamin Kramer2011-09-241-7/+5
| | | | llvm-svn: 140465
* PR10989: Don't print .hidden on Windows.Eli Friedman2011-09-231-1/+2
| | | | llvm-svn: 140356
* Add new files to CMake.Owen Anderson2011-09-221-0/+2
| | | | llvm-svn: 140352
* Update CMake build.Benjamin Kramer2011-09-221-0/+2
| | | | llvm-svn: 140347
* 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
OpenPOWER on IntegriCloud