summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCParser/AsmParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* 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
* 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
* 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
* 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-161-19/+19
| | | | | | | | | | | | | | | 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
* First step in supporting #line directives in assembler. This step parses theKevin Enderby2011-09-131-4/+47
| | | | | | | | | #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
* 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-261-2/+2
| | | | | | MCTargetAsmLexer; rename createAsmLexer to createMCAsmLexer and createAsmParser to createMCAsmParser. llvm-svn: 136027
* Move some ELF directives into ELF asm parser.Jim Grosbach2011-07-251-11/+0
| | | | | | | | | | | | | | 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
* Move TargetAsmParser.h TargetAsmBackend.h and TargetAsmLexer.h to MC where ↵Evan Cheng2011-07-231-1/+1
| | | | | | 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-181-1/+1
| | | | | | | | | 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
* Update MCParsedAsmOperand debug methods.Jim Grosbach2011-07-131-1/+1
| | | | | | | | | | | 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
* 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
* MC: Allow .common as alias for .comm assembler directive. PR10116.Hans Wennborg2011-06-181-1/+1
| | | | llvm-svn: 133349
* Diagnostic for undefined assembler local symbols.Jim Grosbach2011-06-151-4/+29
| | | | | | | | | | | | | | | Re-apply 133010, with fixes for inline assembler. Original commit message: "When an assembler local symbol is used but not defined in a module, a Darwin assembler wants to issue a diagnostic to that effect." Added fix to only perform the check when finalizing, as otherwise we're not done and undefined symbols may simply not have been encountered yet. Passes "make check" and a self-host check on Darwin. llvm-svn: 133071
* Revert 133010. Self-hosted buildbot unhappy.Jim Grosbach2011-06-141-25/+4
| | | | | | | Apparently llvm itself generates undefined assembler local labels, causing self-hosting problems with this patch. Reverting until that's sorted out. llvm-svn: 133013
* Diagnostic for undefined assembler local symbols.Jim Grosbach2011-06-141-4/+25
| | | | | | | | | When an assembler local symbol is used but not defined in a module, a Darwin assembler wants to issue a diagnostic to that effect. rdar://9559714 llvm-svn: 133010
* Basic support for macros with explicit arguments.Rafael Espindola2011-06-051-39/+104
| | | | | | | | | | | We still don't handle * default values * :req * :vararg * \() llvm-svn: 132656
* .cfi directive register parsing flexibility.Jim Grosbach2011-06-021-1/+1
| | | | | | | | | | Parsing a register name/number for .cfi directives can't assume that a register name starts with a '%' token. Be more flexible and check for a register number instead. Still unlikely to be perfect, but it allows us to parse both plain identifiers as register names and integers as register numbers, which is what we're wanting to support at this point. llvm-svn: 132466
* Add new -d option to tblgen. It writes a make(1)-style dependency file.Joerg Sonnenberger2011-06-011-1/+2
| | | | llvm-svn: 132395
* Propagate error correctly in the MC Asm parser for leading '$' expressions.Jim Grosbach2011-05-231-1/+1
| | | | llvm-svn: 131918
* Reapply 131644 including the missing header changes:Joerg Sonnenberger2011-05-191-4/+12
| | | | | | Introduce -fatal-assembler-warnings for the obvious purpose llvm-svn: 131655
* Revert r131644; it's breaking the build.Eli Friedman2011-05-191-12/+4
| | | | llvm-svn: 131653
* Introduce -fatal-assembler-warnings for the obvious purposeJoerg Sonnenberger2011-05-191-4/+12
| | | | llvm-svn: 131644
* Parsing and plumbing for .cfi_sections.Rafael Espindola2011-05-101-0/+36
| | | | llvm-svn: 131117
* MC/AsmParser: Generalize a check.Daniel Dunbar2011-04-291-1/+1
| | | | llvm-svn: 130515
* Reduce clutter in asm output. Do not emit source location as comment for ↵Devang Patel2011-04-181-1/+1
| | | | | | each instruction. llvm-svn: 129715
* Be consistent about being virtual and returning void in the cfi methods.Rafael Espindola2011-04-121-10/+19
| | | | | | Implement the ones that were missing in the asm streamer. llvm-svn: 129413
* Remove LastOffset from the asm parser.Rafael Espindola2011-04-121-19/+3
| | | | llvm-svn: 129378
* Fix the case of a .cfi_rel_offset before any .cfi_def_cfa_offset.Rafael Espindola2011-04-121-6/+2
| | | | llvm-svn: 129362
* Implement .cfi_same_value.Rafael Espindola2011-04-121-0/+17
| | | | llvm-svn: 129361
* To avoid printing out multiple error messages for cases like:Eric Christopher2011-04-121-0/+3
| | | | | | | | | | .long 80+08 go ahead and assume that if we've got an Error token that we handled it already. Otherwise if it's a token we can't handle then go ahead and return the default error. llvm-svn: 129322
* Implement cfi_rel_offsetRafael Espindola2011-04-111-1/+33
| | | | llvm-svn: 129306
* implement .cfi_adjust_cfa_offset.Rafael Espindola2011-04-111-1/+28
| | | | llvm-svn: 129296
* Add support for .skip.Rafael Espindola2011-04-071-1/+1
| | | | | | | Patch by Roman Divacky. Fixes PR9361. llvm-svn: 129106
* Added support symbolic floating point constants in the MC assembler for InfinityKevin Enderby2011-03-291-3/+11
| | | | | | and Nans with the same strings as GAS supports. rdar://8673024 llvm-svn: 128488
* MC: Improve some diagnostics on uses of '.' pseudo-symbol.Daniel Dunbar2011-03-251-1/+18
| | | | llvm-svn: 128289
OpenPOWER on IntegriCloud