summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCParser
Commit message (Collapse)AuthorAgeFilesLines
...
* Silence GCC's -Wreturn-type warning.Benjamin Kramer2012-01-281-0/+3
| | | | llvm-svn: 149179
* Small improvement to the recursion detection logic from the previous commit.Rafael Espindola2012-01-281-1/+3
| | | | llvm-svn: 149175
* Handle recursive variable definitions directly. This gives us better errorRafael Espindola2012-01-281-11/+15
| | | | | | messages and allows us to fix PR11865. llvm-svn: 149174
* Better diagnostic for malformed .org assembly directive.Jim Grosbach2012-01-271-3/+6
| | | | | | Provide source line number information. llvm-svn: 149101
* Add support for .cfi_signal_frame. Fixes pr11762.Rafael Espindola2012-01-231-0/+16
| | | | llvm-svn: 148733
* More dead code removal (using -Wunreachable-code)David Blaikie2012-01-201-1/+0
| | | | llvm-svn: 148578
* The error check for using -g with a .s file already containing dwarf .fileKevin Enderby2012-01-111-4/+4
| | | | | | | directives was in the wrong place and getting triggered incorectly with a cpp .file directive. This change fixes that and adds a test case. llvm-svn: 147951
* Let asm parser query asm syntax dialect.Devang Patel2012-01-101-0/+1
| | | | llvm-svn: 147880
* This is the matching change for the data structure name changes for theKevin Enderby2012-01-101-3/+3
| | | | | | | functional change in r147860 to use DW_TAG_label's instead TAG_subprogram's. This only changes names and updates comments. No functional change. llvm-svn: 147877
* Implement cfi_restore. Patch by Brian Anderson!Rafael Espindola2011-12-291-0/+16
| | | | llvm-svn: 147356
* Implement .cfi_escape. Patch by Brian Anderson!Rafael Espindola2011-12-291-0/+27
| | | | llvm-svn: 147352
* Add back the MC bits of 126425. Original patch by Nathan Jeffords. I added theRafael Espindola2011-12-171-0/+17
| | | | | | asm parsing and testcase. llvm-svn: 146801
* Another improvement to the implementation of .incbin directive by avoiding aKevin Enderby2011-12-151-5/+2
| | | | | | buffer copy. Suggestion by Chris Lattner! llvm-svn: 146614
* Improve the implementation of .incbin directive by replacing a loop by usingKevin Enderby2011-12-141-4/+4
| | | | | | getStreamer().EmitBytes. Suggestion by Benjamin Kramer! llvm-svn: 146599
* Add the .incbin directive which takes the binary data from a file and emitsKevin Enderby2011-12-141-0/+49
| | | | | | it to the streamer. rdar://10383898 llvm-svn: 146592
* LLVMBuild: Remove trailing newline, which irked me.Daniel Dunbar2011-12-121-1/+0
| | | | llvm-svn: 146409
* Add support for gnu_indirect_function.Roman Divacky2011-12-121-0/+1
| | | | llvm-svn: 146377
* The second part of support for generating dwarf for assembly source files. ThisKevin Enderby2011-12-091-0/+9
| | | | | | | | | | generates the dwarf Compile Unit DIE and a dwarf subprogram DIE for each non-temporary label. The next part will be to get the clang driver to enable this when assembling a .s file. rdar://9275556 llvm-svn: 146262
* build/CMake: Finish removal of add_llvm_library_dependencies.Daniel Dunbar2011-11-291-5/+0
| | | | llvm-svn: 145420
* build: Add initial cut at LLVMBuild.txt files.Daniel Dunbar2011-11-031-0/+23
| | | | llvm-svn: 143634
* Replace tabs I added in this new line of code with spaces.Kevin Enderby2011-11-021-1/+1
| | | | | | Thanks to Nick for spotting this! llvm-svn: 143556
* First part of support for generating dwarf for assembly source files with theKevin Enderby2011-11-011-0/+24
| | | | | | | | | | | | -g flag. In this part we generate the .file for the source being assembled and the .loc's for the assembled instructions. The next part will be to generate the dwarf Compile Unit DIE and a dwarf subprogram DIE for each non-temporary label. Once the next part is done test cases will be added. rdar://9275556 llvm-svn: 143509
* Fix parsing of a line with only a # in it.Rafael Espindola2011-10-191-1/+2
| | | | llvm-svn: 142537
* Add support for a new extension to the .file directive:Nick Lewycky2011-10-171-4/+19
| | | | | | | | | | .file filenumber "directory" "filename" This removes one join+split of the directory+filename in MC internals. Because bitcode files have independent fields for directory and filenames in debug info, this patch may change the .o files written by existing .bc files. llvm-svn: 142300
* Add AsmToken::getEndLoc and use it to add ranges to x86 asm register parsing.Benjamin Kramer2011-10-161-0/+4
| | | | | | | | <stdin>:1:12: error: register %rax is only available in 64-bit mode incl %rax ^~~~ llvm-svn: 142137
* PR11143: Save the old diagnostic handler and call it when munging ↵Benjamin Kramer2011-10-161-3/+15
| | | | | | | | diagnostics for #line directives. This reenables proper inline asm diagnostics in clang llvm-svn: 142132
* remove the dead 'ShowLine' argument from SMDiagnostic.Chris Lattner2011-10-161-5/+3
| | | | llvm-svn: 142108
* Make SMDiagnostic a little more sane. Instead of passing around ↵Chris Lattner2011-10-161-11/+12
| | | | | | | | note/warning/error as a string, pass it around as an enum. llvm-svn: 142107
* Enhance llvm::SourceMgr to support diagnostic ranges, the same way clang ↵Chris Lattner2011-10-162-21/+21
| | | | | | | | | | | | | | | does. Enhance the X86 asmparser to produce ranges in the one case that was annoying me, for example: test.s:10:15: error: invalid operand for instruction movl 0(%rax), 0(%edx) ^~~~~~~ It should be straight-forward to enhance filecheck, tblgen, and/or the .ll parser to use ranges where appropriate if someone is interested. llvm-svn: 142106
* 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
* 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
* Fix AsmParser binary precedence for shift operators.Jim Grosbach2011-08-201-16/+21
| | | | | | rdar://9976729 llvm-svn: 138208
* Remove unused Target argument from AsmParser construction methods.Jim Grosbach2011-08-161-4/+4
| | | | | | The argument is unused, and is a layering violation in any case. llvm-svn: 137735
* allow \r's in .s files.Chris Lattner2011-08-041-1/+1
| | | | llvm-svn: 136908
* Rewrite the CMake build to use explicit dependencies between libraries,Chandler Carruth2011-07-291-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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-271-1/+1
| | | | llvm-svn: 136197
* Rename TargetAsmParser to MCTargetAsmParser and TargetAsmLexer to ↵Evan Cheng2011-07-265-10/+10
| | | | | | MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser. llvm-svn: 136027
* Move some ELF directives into ELF asm parser.Jim Grosbach2011-07-253-11/+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-234-5/+5
| | | | | | they belong. llvm-svn: 135833
* Goodbye TargetAsmInfo. This eliminate last bit of CodeGen and Target in llvm-mc.Evan Cheng2011-07-201-1/+0
| | | | | | | 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
* Add MCObjectFileInfo and sink the MCSections initialization code fromEvan Cheng2011-07-201-0/+1
| | | | | | | | TargetLoweringObjectFileImpl down to MCObjectFileInfo. TargetAsmInfo is done to one last method. It's *almost* gone! llvm-svn: 135569
* Sink getDwarfRegNum, getLLVMRegNum, getSEHRegNum from TargetRegisterInfo downEvan Cheng2011-07-182-4/+9
| | | | | | | | | to MCRegisterInfo. Also initialize the mapping at construction time. This patch eliminate TargetRegisterInfo from TargetAsmInfo. It's another step towards fixing the layering violation. llvm-svn: 135424
* Move some parts of TargetAsmInfo down to MCAsmInfo. This is not the greatestEvan Cheng2011-07-151-3/+3
| | | | | | | solution but it is a small step towards removing the horror that is TargetAsmInfo. llvm-svn: 135237
* Update MCParsedAsmOperand debug methods.Jim Grosbach2011-07-132-2/+6
| | | | | | | | | | | Update the debug output interface for MCParsedAsmOperand to have a print() method which takes an output stream argument, an << operator which invokes the print method using the given stream, and a dump() method which prints the operand to the dbgs() stream. This makes the interface more consistent with the rest of LLVM, and more convenient to use at the debugger command line. llvm-svn: 135043
* TargetAsmParser doesn't need reference to Target.Evan Cheng2011-07-081-2/+2
| | | | llvm-svn: 134721
* Asm parser range checking on .<size> <value> directives.Jim Grosbach2011-06-291-3/+9
| | | | | | | | | For example, ".byte 256" would previously assert() when emitting an object file. Now it generates a diagnostic that the literal value is out of range. rdar://9686950 llvm-svn: 134069
OpenPOWER on IntegriCloud