summaryrefslogtreecommitdiffstats
path: root/llvm/tools/llvm-mc/AsmParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
* move some files out of the llvm-mc tool into the MCParser library soChris Lattner2010-01-221-1782/+0
| | | | | | other tools can link it. llvm-svn: 94131
* create a new MCParser library and move some stuff into it.Chris Lattner2010-01-221-1/+1
| | | | llvm-svn: 94129
* Moved handling of inclusion from the AsmLexer toSean Callanan2010-01-211-7/+33
| | | | | | | the AsmParser, breaking AsmLexer's dependence on SourceMgr. llvm-svn: 94054
* Changed the AsmParser to handle error messages itselfSean Callanan2010-01-201-7/+12
| | | | | | | | rather than passing them off to the AsmLexer to handle. This means the AsmLexer no longer requires a SourceMgr to do error handling. llvm-svn: 94047
* Promoted the reference to the SourceMgr from AsmLexerSean Callanan2010-01-201-1/+1
| | | | | | | into AsmParser, in preparation for making AsmLexer independent of the SourceMgr llvm-svn: 94043
* Modified MCAsmLexer to return error information upwardSean Callanan2010-01-201-1/+6
| | | | | | | rather than printing it locally, reducing its dependence on SourceMgr. llvm-svn: 94041
* Promoted the getTok() method to MCAsmParser so thatSean Callanan2010-01-191-17/+17
| | | | | | | the two token accessor functions are declared consistently. Modified the clients of MCAsmParser to reflect this change. llvm-svn: 93916
* Added a Lex function to the AsmParser, to allow handlingSean Callanan2010-01-191-74/+78
| | | | | | | | of include directives to occur within the parser itself. This will break the lexer's dependency on a SourceMgr as input. llvm-svn: 93899
* Generalize mcasmstreamer data emission APIs to take an address spaceChris Lattner2010-01-191-5/+9
| | | | | | identifier. There is no way to work around it. llvm-svn: 93896
* add a "MCStreamer::EmitFill" method, and move the default implementationChris Lattner2010-01-191-2/+1
| | | | | | (which just iteratively emits bytes) to MCStreamer. llvm-svn: 93888
* fix parsing .comm directives on systems which do not represent alignmentsChris Lattner2010-01-191-0/+7
| | | | | | as a power of 2. This fixes MC/AsmParser/directive_comm.s llvm-svn: 93867
* fix a bug in range information for $42, eliminate an Chris Lattner2010-01-151-5/+3
| | | | | | unneeded argument from ParseExpression. llvm-svn: 93536
* extend MCAsmParser::ParseExpression and ParseParenExpressionChris Lattner2010-01-151-20/+26
| | | | | | | to return range information for subexpressions. Use this to provide range info for several new X86Operands. llvm-svn: 93534
* add virtual methods to get the start/end of a MCParsedAsmOperand,Chris Lattner2010-01-141-0/+5
| | | | | | the default implementation returns "unknown". llvm-svn: 93470
* Split the TargetAsmParser "ParseInstruction" interface in half:Chris Lattner2010-01-141-2/+21
| | | | | | | | | | | the new ParseInstruction method just parses and returns a list of target operands. A new MatchInstruction interface is used to turn the operand list into an MCInst. This requires new/deleting all the operands, but it also gives targets the ability to use polymorphic operands if they want to. llvm-svn: 93469
* prune #includes in TargetAsmParser.hChris Lattner2010-01-141-1/+1
| | | | | | | Pass in SMLoc of instr opcode into ParseInstruction. Make AsmToken be a class, not a struct. llvm-svn: 93457
* Mark some debug variables as 'unused' to quiet compiler and analyzer.Bill Wendling2009-12-281-2/+3
| | | | llvm-svn: 92183
* MC: Remove unneeded context argument to MCExpr::Evaluate*.Daniel Dunbar2009-10-161-1/+1
| | | | llvm-svn: 84233
* MC: Tweak variable assignment diagnostics, and make reassignment of non-absoluteDaniel Dunbar2009-10-161-7/+18
| | | | | | variables and symbols invalid. llvm-svn: 84232
* MC: When parsing a variable reference, substitute absolute variables immediatelyDaniel Dunbar2009-10-161-4/+15
| | | | | | since they are allowed to be redefined. llvm-svn: 84230
* add a new DirectiveMap stringmap, which allows more efficient dispatchingChris Lattner2009-09-271-12/+20
| | | | | | | | to directive handlers and allows for easier extensibility. I only switched a few over for now. llvm-svn: 82926
* use an accessor to simplify code.Chris Lattner2009-09-161-5/+2
| | | | llvm-svn: 81997
* Added the ParseInstruction() hook for target specific assembler directives soKevin Enderby2009-09-101-2/+5
| | | | | | | | that things like .word can be parsed as target specific. Moved parsing .word out of AsmParser.cpp into X86AsmParser.cpp as it is 2 bytes on X86 and 4 bytes for other targets that support the .word directive. llvm-svn: 81461
* Fix an integer truncation noticed by MSVC.Benjamin Kramer2009-09-061-1/+1
| | | | llvm-svn: 81109
* llvm-mc: Pass values to MCStreamer as MCExprs, not MCValues.Daniel Dunbar2009-08-311-27/+10
| | | | llvm-svn: 80578
* llvm-mc: Simplify EmitAssignment ('.set' is identical to '=').Daniel Dunbar2009-08-311-4/+4
| | | | llvm-svn: 80577
* llvm-mc: Remove MCAsmParser::Parse[Paren]RelocatableExpression.Daniel Dunbar2009-08-311-33/+27
| | | | llvm-svn: 80576
* llvm-mc: Add MCAsmParser::Parse[Paren]Expression forms which return an MCExpr.Daniel Dunbar2009-08-311-0/+8
| | | | llvm-svn: 80574
* llvm-mc: Add MCAsmParser::getContext.Daniel Dunbar2009-08-311-8/+9
| | | | llvm-svn: 80571
* llvm-mc: Switch MCExpr construction to using static member functions, and ↵Daniel Dunbar2009-08-311-15/+15
| | | | | | taking the MCContext (which now owns all MCExprs). llvm-svn: 80569
* llvm-mc: Move AsmExpr into MC lib (as MCExpr).Daniel Dunbar2009-08-311-37/+37
| | | | llvm-svn: 80567
* llvm-mc: MCStreamer cleanups. - Remove EmitLocalSymbol, this is unsupported ↵Daniel Dunbar2009-08-301-9/+12
| | | | | | | | for now. - Switch Emit{CommonSymbol,Zerofill} to take alignment in bytes (for consistency). llvm-svn: 80484
* llvm-mc: Emit .lcomm as .zerofill.Daniel Dunbar2009-08-281-1/+7
| | | | llvm-svn: 80343
* llvm-mc: Unique zero fill sections.Daniel Dunbar2009-08-281-17/+9
| | | | llvm-svn: 80342
* Revert r80305, I forgot a dependent change.Daniel Dunbar2009-08-271-9/+17
| | | | | | | --- Reverse-merging r80305 into '.': U tools/llvm-mc/AsmParser.cpp llvm-svn: 80309
* llvm-mc: Unique sections in .zerofill.Daniel Dunbar2009-08-271-17/+9
| | | | llvm-svn: 80305
* llvm-mc/Mach-O: Unique sections properly, so we don't get duplicate textDaniel Dunbar2009-08-261-15/+56
| | | | | | | | sections, etc. - The quick and dirty way, just clone the TargetLoweringObjectFile code. Eventually this should be shared... somehow. llvm-svn: 80168
* llvm-mc/Mach-O: Don't put assembler temporary labels in the symbol table.Daniel Dunbar2009-08-261-11/+20
| | | | | | | | - I moved section creation back into AsmParser. I think policy decisions like this should be pushed higher, not lower, when possible (in addition the assembler has flags which change this behavior, for example). llvm-svn: 80162
* llvm-mc: Make non-sensical max bytes to .align an error.Daniel Dunbar2009-08-261-5/+10
| | | | | | Also, warn about overflow in alignment values. llvm-svn: 80077
* llvm-mc: Clean up some handling of symbol/section association to be more correctDaniel Dunbar2009-08-221-21/+5
| | | | | | | | | (external was really undefined and there wasn't an explicit representation for absolute symbols). - This still needs some cleanup to how the absolute "pseudo" section is dealt with, but I haven't figured out the nicest approach yet. llvm-svn: 79733
* llvm-mc: Improve handling of implicit alignment for magic section directivesDaniel Dunbar2009-08-211-1/+12
| | | | | | | | (e.g., .objc_message_refs). - Just emit a .align when we see the directive; this isn't exactly what 'as' does but in practice it should be ok, at least for now. See FIXME. llvm-svn: 79697
* llvm-mc: In a .fill directive, still honor .align even if invalid maximum bytesDaniel Dunbar2009-08-211-3/+4
| | | | | | count is given (this matches 'as'). llvm-svn: 79683
* llvm-mc: Accept .fill size of 8.Daniel Dunbar2009-08-211-2/+2
| | | | llvm-svn: 79635
* llvm-mc: Various section parsing fixes.Daniel Dunbar2009-08-211-43/+82
| | | | | | | | | | | | | | | - Add missing flags for various Objective-C sections. - Fix names for [non_]lazy_symbol_pointer (these are misspelled in the manual). - .symbol_stub does not have the self modifying code flag set (this appears to be wrong in the manual?). - Add implicit alignment values; not yet used. Also, call MCStreamer::Finish at the end of a successful parse. llvm-svn: 79611
* llvm-mc: Support escaped characters in string literals (for .ascii and .asciz)Daniel Dunbar2009-08-141-5/+63
| | | | llvm-svn: 79010
* llvm-mc: Accept .word as a synonym for .shortDaniel Dunbar2009-08-111-1/+1
| | | | llvm-svn: 78641
* llvm-mc: Sketch parsing for .file, .line, and .loc. No streamer hooks for theseDaniel Dunbar2009-08-111-0/+97
| | | | | | yet (I'm not even sure what they do). llvm-svn: 78639
* llvm-mc: Fix darwin .section parsing. It was skipping the section name and a ','Daniel Dunbar2009-08-111-4/+14
| | | | | | | (and outputting a diagnostic pointing at the wrong place), all of which lead to much confusion. llvm-svn: 78637
* split MachO section handling stuff out to its out .h/.cpp file.Chris Lattner2009-08-101-1/+1
| | | | llvm-svn: 78576
* add a fixmeChris Lattner2009-08-101-0/+4
| | | | llvm-svn: 78575
OpenPOWER on IntegriCloud