summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/AsmParser
Commit message (Collapse)AuthorAgeFilesLines
...
* Propagated the parser-side Lex function's declaration toSean Callanan2010-01-191-13/+13
| | | | | | | MCAsmParser, and changed the target-specific AsmParsers to use it. llvm-svn: 93900
* Generalize mcasmstreamer data emission APIs to take an address spaceChris Lattner2010-01-191-1/+1
| | | | | | identifier. There is no way to work around it. llvm-svn: 93896
* fix a bug in range information for $42, eliminate an Chris Lattner2010-01-151-5/+5
| | | | | | unneeded argument from ParseExpression. llvm-svn: 93536
* add range information for mem X86Operand's, now allChris Lattner2010-01-151-7/+11
| | | | | | X86Operand's have range info. llvm-svn: 93535
* extend MCAsmParser::ParseExpression and ParseParenExpressionChris Lattner2010-01-151-13/+18
| | | | | | | to return range information for subexpressions. Use this to provide range info for several new X86Operands. llvm-svn: 93534
* give X86Operand a ctor and start passing SMLoc's into it.Chris Lattner2010-01-151-11/+13
| | | | llvm-svn: 93532
* add range location info for registers, change Chris Lattner2010-01-151-33/+42
| | | | | | | X86Operand::Create* implementations to avoid copy ctor use. llvm-svn: 93528
* clean up the memory management of the operands.Chris Lattner2010-01-151-53/+52
| | | | llvm-svn: 93526
* refactor ParseRegister to avoid using X86Operand as a temporaryChris Lattner2010-01-151-15/+12
| | | | | | datastructure when parsing a mem operand. llvm-svn: 93521
* Split the TargetAsmParser "ParseInstruction" interface in half:Chris Lattner2010-01-141-18/+15
| | | | | | | | | | | 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-2/+4
| | | | | | | Pass in SMLoc of instr opcode into ParseInstruction. Make AsmToken be a class, not a struct. llvm-svn: 93457
* introduce the MCParsedAsmOperand class.Chris Lattner2010-01-141-1/+2
| | | | llvm-svn: 93454
* Fix incorrect assert that should be a user error for code like 'mov $0, %%eax'.Kevin Enderby2009-09-161-1/+2
| | | | llvm-svn: 82054
* Added the ParseInstruction() hook for target specific assembler directives soKevin Enderby2009-09-101-1/+38
| | | | | | | | 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
* Avoid an unused variable warning when assertions areDuncan Sands2009-09-061-0/+1
| | | | | | disabled. llvm-svn: 81122
* Removed the non-target independent AsmToken::Register enum constantKevin Enderby2009-09-031-8/+11
| | | | | | | | | | from MCAsmLexer.h in preparation of supporting other targets. Changed the X86AsmParser code to reflect this by removing AsmLexer::LexPercent and looking for AsmToken::Percent when parsing in places that used AsmToken::Register. Then changed X86ATTAsmParser::ParseRegister to parse out registers as an AsmToken::Percent followed by an AsmToken::Identifier. llvm-svn: 80929
* llvm-mc: Switch MCInst to storing an MCExpr* instead of an MCValue.Daniel Dunbar2009-08-311-20/+22
| | | | | | Also, use MCInst::print instead of custom code in MCAsmPrinter. llvm-svn: 80575
* Update llvm-mc / MCAsmStreamer to print the instruction using the actual targetDaniel Dunbar2009-08-141-4/+2
| | | | | | | | | | | specific printer (this only works on x86, for now). - This makes it possible to do some correctness checking of the parsing and matching, since we can compare the results of 'as' on the original input, to those of 'as' on the output from llvm-mc. - In theory, we could now have an easy ATT -> Intel syntax converter. :) llvm-svn: 78986
* llvm-mc/X86: Parse '*' correctly (in the way the matcher expects).Daniel Dunbar2009-08-111-11/+7
| | | | llvm-svn: 78642
* llvm-mc/AsmParser: Allow .td users to redefine the names of the methods to callDaniel Dunbar2009-08-101-4/+4
| | | | | | | on target specific operands for testing class membership and converting to MCInst operands. llvm-svn: 78597
* llvm-mc/AsmParser: Implement user defined super classes.Daniel Dunbar2009-08-091-0/+19
| | | | | | - We can now discriminate SUB32ri8 from SUB32ri, for example. llvm-svn: 78530
* llvm-mc/AsmMatcher: Switch token matching to use the new string matcher.Daniel Dunbar2009-08-081-2/+6
| | | | | | | Also, redefined MatchRegisterName to just return the register value or a sentinel, to simplify the generated code. llvm-svn: 78504
* llvm-mc/AsmMatcher: Improve match code.Daniel Dunbar2009-08-081-23/+1
| | | | | | | | | | | | | | - This doesn't actually improve the algorithm (its still linear), but the generated (match) code is now fairly compact and table driven. Still need a generic string matcher. - The table still needs to be compressed, this is quite simple to do and should shrink it to under 16k. - This also simplifies and restructures the code to make the match classes more explicit, in anticipation of resolving ambiguities. llvm-svn: 78461
* llvm-mc/AsmMatcher: Tweaks in response to feedback.Daniel Dunbar2009-08-071-1/+1
| | | | llvm-svn: 78404
* Improve disabling of X86 AsmMatcher.Daniel Dunbar2009-08-071-0/+1
| | | | llvm-svn: 78381
* Disable X86 AsmMatcher for now, it is causing gcc-4.0 to run out of memory onDaniel Dunbar2009-08-071-0/+19
| | | | | | | i386-apple-darwin9. This presumably will get fixed once the generated code improves. llvm-svn: 78379
* llvm-mc/AsmMatcher: Move to a slightly more sane matching design.Daniel Dunbar2009-08-071-139/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | - Still not very sane, but a least its not 60k lines on X86. :) - In terms of correctness, currently some things are hard wired for X86, and we still don't properly resolve ambiguities (this is ignoring the instructions we don't even match due to funny .td stuff or other corner cases). The high level changes: 1. Represent tokens which are significant for matching explicitly as separate operands. This uniformly handles not only the instruction mnemonic, but also 'signficiant' syntax like the '*' in "call * ...". 2. Separate the matching of operands to an instruction from the construction of the MCInst. In theory this can be done during matching, but since the number of variations is small I think it makes sense to decompose the problems. 3. Improved a few of the mechanisms to at least successfully flatten / tokenize the assembly strings for PowerPC and ARM. 4. The comment at the top of AsmMatcherEmitter.cpp explains the approach I'm moving towards for handling ambiguous instructions. The high-bit is to infer a partial ordering of the operand classes (and force the user to specify one if we can't) and use that to resolve ambiguities. llvm-svn: 78378
* Change MCOperand to use Create style instead of Make style for constructingDaniel Dunbar2009-08-021-7/+7
| | | | | | operands. llvm-svn: 77837
* llvm-mc: A few more parsing / match tweaks.Daniel Dunbar2009-07-311-11/+42
| | | | | | | | | | | | | | - Operands which are just a label should be parsed as immediates, not memory operands (from the assembler perspective). - Match a few more flavors of immediates. - Distinguish match functions for memory operands which don't take a segment register. - We match the .s for "hello world" now! llvm-svn: 77745
* llvm-mc/X86: Sketch match functions for immediates and memory operands.Daniel Dunbar2009-07-311-37/+112
| | | | | | | Also, change scale value to always be 1 when unspecified to machine MachineInst encoding. llvm-svn: 77728
* Fix a struct/class mismatch, to silence a MSVC warning.Benjamin Kramer2009-07-311-1/+1
| | | | llvm-svn: 77673
* llvm-mc: Match a few X86 instructions.Daniel Dunbar2009-07-311-8/+71
| | | | | | | | | | | - This is "experimental" code, I am feeling my way around and working out the best way to do things (and learning tblgen in the process). Comments welcome, but keep in mind this stuff will change radically. - This is enough to match "subb" and friends, but not much else. The next step is to automatically generate the matchers for individual operands. llvm-svn: 77657
* more syntactic cleanups.Chris Lattner2009-07-291-5/+8
| | | | llvm-svn: 77442
* minor smallvector cleanupsChris Lattner2009-07-291-3/+3
| | | | llvm-svn: 77441
* Match X86 register names to number.Daniel Dunbar2009-07-291-3/+19
| | | | llvm-svn: 77404
* Move X86 instruction parsing into X86/AsmParser.Daniel Dunbar2009-07-281-23/+268
| | | | llvm-svn: 77384
* Provide generic MCAsmParser when constructing target specific parsers.Daniel Dunbar2009-07-281-6/+8
| | | | llvm-svn: 77362
* llvm-mc: Move AsmLexer::getCurStrVal to StringRef based API.Daniel Dunbar2009-07-271-4/+4
| | | | | | - My DFS traversal of LLVM is, at least for now, nearly complete! :) llvm-svn: 77258
* Add new helpers for registering targets.Daniel Dunbar2009-07-251-8/+2
| | | | | | - Less boilerplate == good. llvm-svn: 77052
* Remove some unused code.Daniel Dunbar2009-07-211-3/+0
| | | | llvm-svn: 76541
* Add MCAsmLexer interface.Daniel Dunbar2009-07-201-8/+32
| | | | | | - This provides the AsmLexer interface to the target specific assembly parsers. llvm-svn: 76460
* Add MCAsmParser interface.Daniel Dunbar2009-07-201-0/+9
| | | | | | | - This provides the AsmParser interface to the target specific assembly parsers. llvm-svn: 76453
* Put Target definitions inside Target specific header, and llvm namespace.Daniel Dunbar2009-07-181-2/+1
| | | | llvm-svn: 76344
* Sketch support for target specific assembly parser.Daniel Dunbar2009-07-173-0/+61
- Not fully enabled yet, need a configure regeneration. llvm-svn: 76230
OpenPOWER on IntegriCloud