summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCParser/AsmParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix alignment of .comm and .lcomm on mingw32.Benjamin Kramer2012-09-071-2/+4
| | | | | | | | For some reason .lcomm uses byte alignment and .comm log2 alignment so we can't use the same setting for both. Fix this by reintroducing the LCOMM enum. I verified this against mingw's gcc. llvm-svn: 163420
* MC: Overhaul handling of .lcommBenjamin Kramer2012-09-071-6/+5
| | | | | | | | | | | | | - Darwin lied about not supporting .lcomm and turned it into zerofill in the asm parser. Push the zerofill-conversion down into macho-specific code. - This makes the tri-state LCOMMType enum superfluous, there are no targets without .lcomm. - Do proper error reporting when trying to use .lcomm with alignment on a target that doesn't support it. - .comm and .lcomm alignment was parsed in bytes on COFF, should be power of 2. - Fixes PR13755 (.lcomm crashes on ELF). llvm-svn: 163395
* Add virtual keywords for methods that override the base class.Craig Topper2012-08-291-8/+8
| | | | llvm-svn: 162826
* Fix macros arguments with an underscore, dot or dollar in them. This is basedRafael Espindola2012-08-211-1/+9
| | | | | | on a patch by Andy/PaX. I added the support for dot and dollar. llvm-svn: 162298
* Make the wording in of the "expected identifier" error in the .macro directiveRafael Espindola2012-08-211-2/+2
| | | | | | | consistent with the other "expected identifier" errors. Extracted from the Andy/PaX patch. I added the test. llvm-svn: 162291
* Use typedefs. Fix indentation. Extracted from the Andy/PaX patch.Rafael Espindola2012-08-211-5/+4
| | | | llvm-svn: 162283
* Remove unused variable. Extracted from the Andy/PaX patch.Rafael Espindola2012-08-211-2/+0
| | | | llvm-svn: 162282
* Fix typo. Extracted from the Andy/PaX patch.Rafael Espindola2012-08-211-1/+1
| | | | llvm-svn: 162281
* Typedefs and indentation fixes from the Andy Zhang/PAX macro argument patch.Rafael Espindola2012-08-081-26/+28
| | | | | | Committing it first as it makes the "real" patch a lot easier to read. llvm-svn: 161491
* Keep empty assembly macro argument values in the middle of the list.Jim Grosbach2012-07-301-2/+8
| | | | | | | | | | | | | | | | | | | Empty macro arguments at the end of the list should be as-if not specified at all, but those in the middle of the list need to be kept so as not to screw up the positional numbering. E.g.: .macro foo foo_-bash___: nop .endm foo 1, 2, 3, 4 foo 1, , 3, 4 Should create two labels, "foo_1_2_3_4" and "foo_1__3_4". rdar://11948769 llvm-svn: 161002
* Fix a typo (the the => the)Sylvestre Ledru2012-07-231-1/+1
| | | | llvm-svn: 160621
* Remove tabs.Bill Wendling2012-07-191-2/+2
| | | | llvm-svn: 160475
* Enable target dependent directive parsing to hook before standard parser inAkira Hatanaka2012-07-051-3/+5
| | | | | | | | AsmParser::ParseStatement. Patch by Vladimir Medic. llvm-svn: 159768
* Implement irpc. Extracted from a patch by the PaX team. I just added the test.Rafael Espindola2012-06-161-0/+57
| | | | llvm-svn: 158604
* Factor macro argument parsing into helper methods and add support for .irp.Rafael Espindola2012-06-151-30/+115
| | | | | | | Patch extracted from a larger one by the PaX team. I added the testcases and tightened error handling a bit. llvm-svn: 158523
* Represent .rept as an anonymous macro. This removes the need for the ActiveReptRafael Espindola2012-06-031-55/+88
| | | | | | | vector. No functionality change. Extracted from a patch by the PaX Team. llvm-svn: 157909
* Add a typedef to simplify the code a bit. Not functionality change.Rafael Espindola2012-06-031-7/+9
| | | | | | Part of a patch by the PaX Team. llvm-svn: 157908
* Fix typos found by http://github.com/lyda/misspell-checkBenjamin Kramer2012-06-021-1/+1
| | | | llvm-svn: 157885
* Fix spacing after if.Benjamin Kramer2012-05-121-6/+5
| | | | llvm-svn: 156716
* Add support for the .rept directive. Patch by Vladmir Sorokin. I added supportRafael Espindola2012-05-121-0/+91
| | | | | | for nesting. llvm-svn: 156714
* AsmParser: Add support for the .purgem directive.Benjamin Kramer2012-05-121-0/+23
| | | | | | Based on a patch by Team PaX. llvm-svn: 156709
* AsmParser: Give a nice error message for .code16gcc, which is currently ↵Benjamin Kramer2012-05-121-1/+1
| | | | | | | | unsupported. Patch by Team PaX! llvm-svn: 156708
* AsmParser: ignore the .extern directive.Benjamin Kramer2012-05-121-0/+4
| | | | llvm-svn: 156707
* AsmParser: Add support for .ifc and .ifnc directives.Benjamin Kramer2012-05-121-0/+54
| | | | | | Based on a patch from PaX Team. llvm-svn: 156706
* AsmParser: Add support for .ifb and .ifnb directives.Benjamin Kramer2012-05-121-0/+29
| | | | | | Based on a patch from PaX Team. llvm-svn: 156705
* MC: Unknown assembler directives are now hard errors.Jim Grosbach2012-05-011-1/+1
| | | | | | | | | | | | | | | | Previously, an unsupported/unknown assembler directive issued a warning. That's generally unsafe, and inconsistent with the behaviour of pretty much every system assembler. Now that the MC assemblers are mature enough to be the default on multiple targets, it's reasonable to issue errors for these. For target or platform directives that need to stay warnings, we should add explicit handlers for them in, e.g., ELFAsmParser.cpp, DarwinAsmParser.cpp, et. al., and issue the warning there. rdar://9246275 llvm-svn: 155926
* MC: Remove errant EatToEndOfStatement() in asm parser.Jim Grosbach2012-05-011-3/+1
| | | | | | | | | | | | The caller is already responsible for eating any additional input on the line. Putting an additional EatToEndOfStatement() in ParseStatement() causes an entire extra statement to be consumed when treating warnings as errors. For example, test/MC/macros.s will assert() because the .endmacro directive is missed as a result. rdar://11355843 llvm-svn: 155925
* MC assembly parser handling for trailing comma in macro instantiation.Jim Grosbach2012-04-161-5/+5
| | | | | | | | | A trailing comma means no argument at all (i.e., as if the comma were not present), not an empty argument to the invokee. rdar://11252521 llvm-svn: 154863
* Prune some includesCraig Topper2012-03-271-1/+0
| | | | llvm-svn: 153502
* Assembler should accept redefinitions of unused variable symbols.Jim Grosbach2012-03-201-0/+2
| | | | | | rdar://11027851 llvm-svn: 153137
* MC asm parser macro argument count was wrong when empty.Jim Grosbach2012-03-171-0/+5
| | | | | | | | evaluated to '1' when the argument list was empty (should be '0'). rdar://11057257 llvm-svn: 152967
* Convert assert(0) to llvm_unreachableCraig Topper2012-02-071-2/+1
| | | | llvm-svn: 149967
* Add assembler dialect attribute in asm parser which lets target specific asm ↵Devang Patel2012-01-311-2/+14
| | | | | | parser change dialect on the fly. llvm-svn: 149396
* 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
* 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
OpenPOWER on IntegriCloud