summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/AsmParser
Commit message (Collapse)AuthorAgeFilesLines
...
* Refactor some duplicated code into helper functions.Craig Topper2013-03-181-229/+55
| | | | llvm-svn: 177242
* Silence anonymous type in anonymous union warnings.Eric Christopher2013-03-151-23/+28
| | | | llvm-svn: 177135
* GCC thinks that this variable might be used uninitialized (it isn't).Duncan Sands2013-03-011-1/+1
| | | | llvm-svn: 176341
* MCParser: Update method names per coding guidelines.Jim Grosbach2013-02-201-15/+15
| | | | | | | | | | | | | | | | | | | s/AddDirectiveHandler/addDirectiveHandler/ s/ParseMSInlineAsm/parseMSInlineAsm/ s/ParseIdentifier/parseIdentifier/ s/ParseStringToEndOfStatement/parseStringToEndOfStatement/ s/ParseEscapedString/parseEscapedString/ s/EatToEndOfStatement/eatToEndOfStatement/ s/ParseExpression/parseExpression/ s/ParseParenExpression/parseParenExpression/ s/ParseAbsoluteExpression/parseAbsoluteExpression/ s/CheckForValidSection/checkForValidSection/ http://llvm.org/docs/CodingStandards.html#name-types-functions-variables-and-enumerators-properly No functional change intended. llvm-svn: 175675
* [ms-inline asm] Adjust the EndLoc to account for the ']'.Chad Rosier2013-02-151-1/+2
| | | | llvm-svn: 175312
* [ms-inline asm] Make the error message more generic now that we support the Chad Rosier2013-01-181-1/+1
| | | | | | 'SIZE' and 'LENGTH' operators. llvm-svn: 172773
* [ms-inline asm] Add support for the 'SIZE' and 'LENGTH' operators.Chad Rosier2013-01-171-36/+46
| | | | | | Part of rdar://12576868 llvm-svn: 172743
* [ms-inline asm] Extend support for parsing Intel bracketed memory operands thatChad Rosier2013-01-141-86/+277
| | | | | | | have an arbitrary ordering of the base register, index register and displacement. rdar://12527141 llvm-svn: 172484
* X86AsmParser.cpp: Fix up r172148, to add initializer in another CreateMem().NAKAMURA Takumi2013-01-111-0/+1
| | | | llvm-svn: 172157
* [ms-inline asm] Make sure we set a default value for AddressOf. Follow on toChad Rosier2013-01-101-1/+2
| | | | | | r172121. llvm-svn: 172148
* [ms-inline asm] Add support for calling functions from inline assembly.Chad Rosier2013-01-101-5/+30
| | | | | | Part of rdar://12991541 llvm-svn: 172121
* Last in the series of removing unnecessary '0' arguments forEric Christopher2013-01-091-1/+1
| | | | | | | address space. Reordered the EmitULEB128IntValue arguments to make this easier. llvm-svn: 171949
* Change SMRange to be half-open (exclusive end) instead of closed (inclusive)Jordan Rose2013-01-071-30/+26
| | | | | | | | | | This is necessary not only for representing empty ranges, but for handling multibyte characters in the input. (If the end pointer in a range refers to a multibyte character, should it point to the beginning or the end of the character in a char array?) Some of the code in the asm parsers was already assuming this anyway. llvm-svn: 171765
* Remove MCTargetAsmLexer and its derived classes now that edis,Roman Divacky2012-12-203-164/+0
| | | | | | its only user, is gone. llvm-svn: 170699
* Use the new script to sort the includes of every file under lib.Chandler Carruth2012-12-032-11/+11
| | | | | | | | | | | | | | | | | Sooooo many of these had incorrect or strange main module includes. I have manually inspected all of these, and fixed the main module include to be the nearest plausible thing I could find. If you own or care about any of these source files, I encourage you to take some time and check that these edits were sensible. I can't have broken anything (I strictly added headers, and reordered them, never removed), but they may not be the headers you'd really like to identify as containing the API being implemented. Many forward declarations and missing includes were added to a header files to allow them to parse cleanly when included first. The main module rule does in fact have its merits. =] llvm-svn: 169131
* X86: Better diagnostics for 32-bit vs. 64-bit mode mismatches.Jim Grosbach2012-11-141-7/+40
| | | | | | | | | | When an instruction as written requires 32-bit mode and we're assembling in 64-bit mode, or vice-versa, issue a more specific diagnostic about what's wrong. rdar://12700702 llvm-svn: 167937
* Add support of RTM from TSX extensionMichael Liao2012-11-081-22/+21
| | | | | | | | - Add RTM code generation support throught 3 X86 intrinsics: xbegin()/xend() to start/end a transaction region, and xabort() to abort a tranaction region llvm-svn: 167573
* [ms-inline asm] Add support for the [] operator. Essentially, [expr1][expr2] isChad Rosier2012-10-291-10/+37
| | | | | | | equivalent to [expr1 + expr2]. See test cases for more examples. rdar://12470392 llvm-svn: 166949
* [ms-inline asm] Add a comment.Chad Rosier2012-10-261-0/+1
| | | | llvm-svn: 166819
* [ms-inline asm] Emit an error for unsupported SIZE and LENGTH directives.Chad Rosier2012-10-261-5/+11
| | | | | | Part of rdar://12576868 llvm-svn: 166792
* [ms-inline asm] Add support for the TYPE operator.Chad Rosier2012-10-261-1/+52
| | | | | | Part of rdar://12576868 llvm-svn: 166790
* [ms-inline asm] Have the target AsmParser create the asmrewrite for the offsetofChad Rosier2012-10-261-1/+4
| | | | | | operator. llvm-svn: 166779
* [ms-inline asm] Perform field lookups with the dot operator.Chad Rosier2012-10-251-4/+19
| | | | llvm-svn: 166724
* [ms-inline asm] Add support for creating AsmRewrites in the target specificChad Rosier2012-10-251-3/+6
| | | | | | AsmParser logic. To be used/tested in a subsequent commit. llvm-svn: 166714
* [ms-inline asm] Add error handling to the ParseIntelDotOperator() function.Chad Rosier2012-10-251-16/+35
| | | | llvm-svn: 166698
* [ms-inline asm] Add support for parsing the '.' operator. Given,Chad Rosier2012-10-241-0/+34
| | | | | | | | | | | | [register].field The operator returns the value at the location pointed to by register plus the offset of field within its structure or union. This patch only handles immediate fields (i.e., [eax].4). The original displacement has to be a MCConstantExpr as well. Part of rdar://12470415 and rdar://12470514 llvm-svn: 166632
* Tidy up. No functional change intended.Chad Rosier2012-10-241-14/+15
| | | | llvm-svn: 166630
* [ms-inline asm] Create a register operand, rather than a memory operand when weChad Rosier2012-10-241-40/+45
| | | | | | | | | | see the offsetof operator. Previously, we were matching something like MOVrm in the front-end and later matching MOVrr in the back-end. This change makes things more consistent. It also fixes cases where we can't match against a memory operand as the source (test cases coming). Part of rdar://12470317 llvm-svn: 166592
* [ms-inline asm] Offset operator - the size should be based on the size of aChad Rosier2012-10-231-0/+4
| | | | | | | pointer, not the size of the variable. Part of rdar://12470317 llvm-svn: 166526
* [ms-inline asm] Clean up comment.Chad Rosier2012-10-231-3/+3
| | | | llvm-svn: 166525
* [ms-inline asm] When parsing inline assembly we set the base register to aChad Rosier2012-10-231-2/+9
| | | | | | | | non-zero value as we don't know the actual value at this point. This is necessary to get the matching correct in some cases. However, the actual value set as the base register doesn't matter, since we're just matching not emitting. llvm-svn: 166523
* [ms-inline asm] Add an implementation of the offset operator. This is a followChad Rosier2012-10-231-12/+20
| | | | | | | on patch to r166433. rdar://12470317 llvm-svn: 166488
* [ms-inline asm] Add the isOffsetOf() function.Chad Rosier2012-10-221-0/+5
| | | | | | Part of rdar://12470317 llvm-svn: 166436
* [ms-inline asm] Add support for parsing the offset operator. Callback for Chad Rosier2012-10-221-5/+21
| | | | | | | CodeGen in the front-end not implemented yet. rdar://12470317 llvm-svn: 166433
* [ms-inline asm] Reset the opcode prior to parsing a statement.Chad Rosier2012-10-191-3/+0
| | | | llvm-svn: 166349
* [ms-inline asm] Have the TargetParser callback to Sema to determine the size ofChad Rosier2012-10-191-3/+30
| | | | | | | a memory operand. Retain this information and then add the sizing directives to the IR. This allows the backend to do proper instruction selection. llvm-svn: 166316
* [ms-inline asm] If we parsed a statement and the opcode is valid, then it's ↵Chad Rosier2012-10-151-0/+3
| | | | | | an instruction. llvm-svn: 165955
* [ms-inline asm] Update the end loc for ParseIntelMemOperand.Chad Rosier2012-10-151-0/+1
| | | | llvm-svn: 165947
* [ms-inline asm] Remove the MatchInstruction() function. Previously, this wasChad Rosier2012-10-131-24/+10
| | | | | | | | | | | the interface between the front-end and the MC layer when parsing inline assembly. Unfortunately, this is too deep into the parsing stack. Specifically, we're unable to handle target-independent assembly (i.e., assembly directives, labels, etc.). Note the MatchAndEmitInstruction() isn't the correct abstraction either. I'll be exposing target-independent hooks shortly, so this is really just a cleanup. llvm-svn: 165858
* [ms-inline asm] Capitalize per coding standard.Chad Rosier2012-10-121-19/+19
| | | | llvm-svn: 165847
* [ms-inline asm] Use the new API introduced in r165830 in lieu of theChad Rosier2012-10-121-25/+14
| | | | | | MapAndConstraints vector. Also remove the unused Kind argument. llvm-svn: 165833
* [ms-inline asm] Add a few typedefs to simplify future changes.Chad Rosier2012-10-051-3/+3
| | | | llvm-svn: 165324
* [ms-inline asm] Add support for parsing [Intel dialect] memory operands that useChad Rosier2012-10-041-7/+11
| | | | | | segmented registers. Test case to come. llvm-svn: 165275
* Revert 165057, per Jim's request. This requires further discussion.Chad Rosier2012-10-021-26/+8
| | | | llvm-svn: 165069
* [ms-inline asm] Add basic support for wildcard MCParsedAsmOperands. This typeChad Rosier2012-10-021-8/+26
| | | | | | | | | | | | | of operand is specific to MS-style inline assembly and should not be generated when parsing normal assembly. The purpose of the wildcard operands are to allow the AsmParser to match multiple instructions (i.e., MCInsts) to a given ms-style asm statement. For the time being the matcher just returns the first match. This patch only implements wildcard matches for memory operands. Support for register wildcards will be added in the near future. llvm-svn: 165057
* [ms-inline asm] Add the convertToMapAndConstraints() function that is used toChad Rosier2012-10-011-29/+35
| | | | | | | | | | | map constraints and MCInst operands to inline asm operands. This replaces the getMCInstOperandNum() function. The logic to determine the constraints are not in place, so we still default to a register constraint (i.e., "r"). Also, we no longer build the MCInst but rather return just the opcode to get the MCInstrDesc. llvm-svn: 164979
* Consistently specify the assembly variant to MatchInstructionImpl.Bob Wilson2012-09-251-4/+8
| | | | llvm-svn: 164611
* Rather then have a wrapper function, have tblgen instantiate the implementation.Chad Rosier2012-09-241-7/+0
| | | | | | Also remove an unused argument. llvm-svn: 164567
* Rather then have a wrapper function, have tblgen instantiate the implementation.Chad Rosier2012-09-241-4/+0
| | | | llvm-svn: 164548
* [ms-inline asm] Expose the mnemonicIsValid() function in the AsmParser.Chad Rosier2012-09-211-0/+4
| | | | llvm-svn: 164420
OpenPOWER on IntegriCloud