summaryrefslogtreecommitdiffstats
path: root/llvm/utils/TableGen/AsmMatcherEmitter.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* llvm-mc/AsmMatcher: Tweaks in response to feedback.Daniel Dunbar2009-08-071-14/+2
| | | | llvm-svn: 78404
* llvm-mc/AsmMatcher: Move to a slightly more sane matching design.Daniel Dunbar2009-08-071-196/+491
| | | | | | | | | | | | | | | | | | | | | | | | | | | - 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
* TableGen / AsmMatcher: Tweaks to avoid generating completely bogus matchDaniel Dunbar2009-08-041-17/+75
| | | | | | | | | | functions. - Fix variant flattening when the variant embeds an operand reference. - Ignore instructions which reference an operand multiple times (e.g., "xorb $dst, $dst"), and operands which have extra flags (e.g., "$dst:subreg32"). llvm-svn: 78099
* Change MCOperand to use Create style instead of Make style for constructingDaniel Dunbar2009-08-021-1/+1
| | | | | | operands. llvm-svn: 77837
* llvm-mc: Match a few X86 instructions.Daniel Dunbar2009-07-311-0/+239
| | | | | | | | | | | - 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
* Remove unintended changes.Daniel Dunbar2009-07-301-51/+0
| | | | llvm-svn: 77616
* Twines: Don't allow implicit conversion from integers, this is too tricky.Daniel Dunbar2009-07-301-0/+51
| | | | llvm-svn: 77605
* Match X86 register names to number.Daniel Dunbar2009-07-291-8/+4
| | | | llvm-svn: 77404
* tblgen/AsmMatcher: Emit simple matcher for register names.Daniel Dunbar2009-07-171-3/+30
| | | | llvm-svn: 76212
* Stub out assembly matcher (.s -> MCInst) tblgen backend.Daniel Dunbar2009-07-111-0/+24
llvm-svn: 75378
OpenPOWER on IntegriCloud