summaryrefslogtreecommitdiffstats
path: root/llvm/lib/MC/MCParser/AsmParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* Add basic CFI methods to the streamer interface.Rafael Espindola2010-11-221-7/+19
| | | | llvm-svn: 119972
* Added support for the Mach-O .symbol_resolver directive. rdar://8673046Kevin Enderby2010-11-191-0/+2
| | | | llvm-svn: 119816
* Add support for .int.Rafael Espindola2010-11-171-0/+2
| | | | llvm-svn: 119512
* Add support for .2byte, .4byte and .8byte.Rafael Espindola2010-11-171-0/+6
| | | | | | Fixes PR8631. llvm-svn: 119511
* Add .loc methods to the streamer.Rafael Espindola2010-11-161-4/+3
| | | | | | | Next: Add support for the !HasDotLocAndDotFile case to the MCAsmStreamer and then switch codegen to use it. llvm-svn: 119384
* Parse and ignore some .cfi_* directives.Rafael Espindola2010-11-161-0/+95
| | | | llvm-svn: 119362
* Fix PR8565.Rafael Espindola2010-11-151-6/+25
| | | | | | | | | | | This moves most of the isUsed logic to the MCSymbol itself. With this we get a bit more relaxed about allowing definitions after uses: uses that don't evaluate their argument immediately (jmp foo) are accepted. ddunbar, this was the smallest compromise I could think of that lets us accept gcc (and clang!) assembly. llvm-svn: 119144
* Parse and remember discriminators in .loc line. I try to output them withRafael Espindola2010-11-131-1/+7
| | | | | | | another patch. This lets us parse a bit more of the gcc 4.5 output. llvm-svn: 118975
* Mark labels declared in tls sections as STT_TLS. This matches the behavior ofRafael Espindola2010-11-111-1/+0
| | | | | | gas. llvm-svn: 118818
* Fix typo.Daniel Dunbar2010-11-081-1/+1
| | | | llvm-svn: 118421
* Add support for expressions in .sleb/.uleb directives.Rafael Espindola2010-11-021-31/+7
| | | | llvm-svn: 118023
* Add support for .value.Rafael Espindola2010-11-011-0/+2
| | | | llvm-svn: 117922
* Add support for the .string directive.Rafael Espindola2010-10-281-8/+10
| | | | llvm-svn: 117592
* Use the IDVal directly as there's no need to convert to std::string.Roman Divacky2010-10-281-2/+2
| | | | | | Pointed out by Chris! llvm-svn: 117557
* Implement .equ directive as a synonym to .set.Roman Divacky2010-10-281-6/+6
| | | | llvm-svn: 117553
* MC/AsmParser: Fix relative precedence of {+,-} and comparison ops.Daniel Dunbar2010-10-251-12/+14
| | | | llvm-svn: 117299
* Remove remaining uses of ATTRIBUTE_UNUSED on variables, and delete threeChandler Carruth2010-10-201-2/+0
| | | | | | #includes in the process. llvm-svn: 116919
* MC/AsmParser: Report .stabs directive as unsupported.Daniel Dunbar2010-10-161-0/+9
| | | | llvm-svn: 116659
* MC-COFF: Add COFFAsmParser. Completes PR8343.Michael J. Spencer2010-10-091-1/+5
| | | | llvm-svn: 116150
* Fix Whitespace.Michael J. Spencer2010-10-091-58/+58
| | | | llvm-svn: 116149
* MC: Move ParseDirectiveELFType into ELFAsmParser. COFF uses .type for ↵Michael J. Spencer2010-10-091-48/+0
| | | | | | something else. llvm-svn: 116142
* Add support for a fill value in the .zero directive.Rafael Espindola2010-10-051-1/+8
| | | | llvm-svn: 115655
* Incorporate suggestions by Daniel Dunbar after his review. Thanks Daniel!Kevin Enderby2010-10-041-1/+1
| | | | | | | | | | | | | | | | 1) Changed ValidateDwarfFileNumber() to isValidDwarfFileNumber() to be better named. Since it is just a predicate and isn't actually changing any state. 2) Added a missing return in the comments for setCurrentDwarfLoc() in include/llvm/MC/MCContext.h for fix formatting. 3) Changed clearDwarfLocSeen() to ClearDwarfLocSeen() since it does change state. 4) Simplified the last test in isValidDwarfFileNumber() to just a one line boolean test of MCDwarfFiles[FileNumber] != 0 for the final return statement. llvm-svn: 115551
* Add hook in MCSection to decide when to use "optimized nops", for eachJan Wen Voung2010-10-041-6/+1
| | | | | | | section kind. Previously, optimized nops were only used for MachO. Also added tests for ELF and COFF. llvm-svn: 115523
* This is the last major patch to implement support for the .loc directiveKevin Enderby2010-09-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | and output the dwarf line number tables. This contains the code to emit and encode the dwarf line tables from the previously gathered information in the MCLineSection objects. This contains all the details to encode the line and address deltas into the dwarf line table. To do this an MCDwarfLineAddrFragment has been added. Also this moves the interface code out of Mach-O streamer into MCDwarf so it should be useable by other object file formats. There is now one call to be made from an MCObjectStreamer EmitInstruction() method: MCLineEntry::Make(this, getCurrentSection()); to create a line entry after each instruction is assembled. And one call call to be made from an MCObjectStreamer Finish() method: MCDwarfFileTable::Emit(this, DwarfLineSection); when getContext().hasDwarfFiles() is true and is passed a object file specific MCSection where to emit the dwarf file and the line tables. This appears to now be correct for 32-bit targets, at least x86. But the relocation entries for 64-bit Darwin needs some further work which is next up to work on. So for now the 64-bit Mach-O target does not output the dwarf file and line tables. llvm-svn: 115157
* Test commit - Deleted some whitespace at the end of a line.Jan Wen Voung2010-09-301-1/+1
| | | | llvm-svn: 115122
* change the protocol TargetAsmPArser::MatchInstruction method to take anChris Lattner2010-09-291-9/+3
| | | | | | | MCStreamer to emit into instead of an MCInst to fill in. This allows the matcher extra flexibility and is more convenient. llvm-svn: 115014
* Push twines deeper into SourceMgr's error handling methods.Benjamin Kramer2010-09-271-9/+6
| | | | llvm-svn: 114847
* MC/AsmParser: Support .single and .double for embedding floating point literals.Daniel Dunbar2010-09-241-0/+56
| | | | | | | - I believe more modern 'gas' supports a more enhanced set of arithmetic on them, but for now the only thing we can do is emit them as data. llvm-svn: 114719
* fix rdar://8456417 - llvm-mc can't do basic mathChris Lattner2010-09-221-21/+22
| | | | llvm-svn: 114532
* Implement support for .local and its "interesting" interactions with .comm.Rafael Espindola2010-09-211-0/+3
| | | | llvm-svn: 114382
* Fix an MSVC warning.Daniel Dunbar2010-09-171-0/+3
| | | | llvm-svn: 114184
* MC/AsmParser: Add support for 'a + 4@GOTPCREL' and friends, by reconsing theDaniel Dunbar2010-09-171-2/+81
| | | | | | | | | expression to include the modifier. - Gross, but this a corner case we don't expect to see often in practice, but it is worth accepting. - Also improves diagnostics on invalid modifiers. llvm-svn: 114154
* Add support for the .zero directive.Rafael Espindola2010-09-161-0/+22
| | | | llvm-svn: 114077
* Add a InitSections method to the streamer interface.Rafael Espindola2010-09-151-5/+1
| | | | | | | | | | | | | | The ELF implementation now creates text, data and bss to match the gnu as behavior. The text streamer still has the old MachO specific behavior since the testsuite checks that it will error when a directive is given before a setting the current section for example. A nice benefit is that -n is not required anymore when producing ELF files. llvm-svn: 114027
* Add support for leb128 of absolute expressions.Rafael Espindola2010-09-111-0/+49
| | | | llvm-svn: 113691
* fix the asmparser so that the target is responsible for skipping toChris Lattner2010-09-111-1/+3
| | | | | | | | | | | | | | the end of the line on a parser error, allowing skipping to happen for syntactic errors but not for semantic errors. Before we would miss emitting a diagnostic about the second line, because we skipped it due to the semantic error on the first line: foo %eax bar %al This fixes rdar://8414033 - llvm-mc ignores lines after an invalid instruction mnemonic errors llvm-svn: 113688
* llvm-mc: Don't crash when using -n and we see a directive before the initial ↵Daniel Dunbar2010-09-091-0/+30
| | | | | | | | section. - This is annoying, because we have to scatter this check everywhere that could emit real data, but I see no better solution. llvm-svn: 113552
* llvm-mc: Make sure we exit != 0 if any errors are encountered.Daniel Dunbar2010-09-091-8/+10
| | | | llvm-svn: 113551
* change the MC "ParseInstruction" interface to make it the Chris Lattner2010-09-081-7/+0
| | | | | | | implementation's job to check for and lex the EndOfStatement marker. llvm-svn: 113347
* Change the parsing of .loc back to allow the LineNumber field to be optional asKevin Enderby2010-08-241-7/+8
| | | | | | it is with other assemblers. llvm-svn: 111967
* First bit of support for the dwarf .loc directive. This patch updates theKevin Enderby2010-08-241-18/+80
| | | | | | | | | | needed parsing for the .loc directive and saves the current info from that into the context. The next patch will take the current loc info after an instruction is assembled and save that info into a vector for each section for use to build the line number tables. The patch after that will encode the info from those vectors into the output file as the dwarf line tables. llvm-svn: 111956
* MC/AsmParser: Change ParseExpression to use ParseIdentifier(), to supportDaniel Dunbar2010-08-241-5/+9
| | | | | | dollars in identifiers. llvm-svn: 111946
* MC/Parser: Accept leading dollar signs in identifiers.Daniel Dunbar2010-08-241-0/+24
| | | | | | | | - Implemented by manually splicing the tokens. If this turns out to be problematically platform specific, a more elegant solution would be to implement some context dependent lexing support. llvm-svn: 111934
* MC/AsmParser: Push the burdon of emitting diagnostics about unmatchedDaniel Dunbar2010-08-121-8/+2
| | | | | | instructions onto the target specific parser, which can do a better job. llvm-svn: 110889
* llvm-mc: Add -show-inst-operands, for dumping the parsed instruction ↵Daniel Dunbar2010-08-111-0/+15
| | | | | | representation before matching. llvm-svn: 110791
* MC/AsmParser: Fix a bug in macro argument parsing, which was droppingDaniel Dunbar2010-08-101-5/+7
| | | | | | parentheses from argument lists. llvm-svn: 110692
* MC: Destroy Macro instances.Daniel Dunbar2010-07-291-0/+7
| | | | llvm-svn: 109720
* Added first bit of support for the dwarf .file directive. This patch collectsKevin Enderby2010-07-281-1/+16
| | | | | | | the info from the .file directive and makes file and directory tables that will eventually be put out as part of the dwarf info in the output file. llvm-svn: 109651
* Make .align parse correctly on platforms where .align is measured in bytes.Eli Friedman2010-07-191-5/+8
| | | | llvm-svn: 108674
OpenPOWER on IntegriCloud