summaryrefslogtreecommitdiffstats
path: root/llvm/lib/Target/X86/AsmParser/X86AsmParser.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* [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
* Add comment.Chad Rosier2012-09-211-1/+2
| | | | llvm-svn: 164415
* [ms-inline asm] Make the operand size directives case insensitive.Chad Rosier2012-09-121-8/+9
| | | | llvm-svn: 163729
* StringSwitchify.Chad Rosier2012-09-111-8/+10
| | | | llvm-svn: 163649
* Simplify logic. No functional change intended.Chad Rosier2012-09-111-9/+8
| | | | llvm-svn: 163648
* [ms-inline asm] Add support for .att_syntax directive.Chad Rosier2012-09-101-1/+4
| | | | llvm-svn: 163542
* PR13754: llvm-mc/x86 crashes on .cfi directives without the % prefix for ↵Benjamin Kramer2012-09-071-5/+6
| | | | | | | | | registers. gas accepts this and it seems to be common enough to be worth supporting. This doesn't affect the parsing of reg operands outside of .cfi directives. llvm-svn: 163390
* Fix function name per coding standard.Chad Rosier2012-09-051-2/+2
| | | | llvm-svn: 163187
* [ms-inline asm] Asm operands can map to one or more MCOperands. Therefore, addChad Rosier2012-09-031-2/+3
| | | | | | | the NumMCOperands argument to the GetMCInstOperandNum() function that is set to the number of MCOperands this asm operand mapped to. llvm-svn: 163124
* [ms-inline asm] Add an interface to the GetMCInstOperandNum() function in theChad Rosier2012-09-031-0/+6
| | | | | | MCTargetAsmParser class. llvm-svn: 163122
* Removed unused argument.Chad Rosier2012-09-031-14/+13
| | | | llvm-svn: 163104
* [ms-inline asm] Expose the Kind and Opcode variables from theChad Rosier2012-09-031-9/+18
| | | | | | | | | | MatchInstructionImpl() function. These values are used by the ConvertToMCInst() function to index into the ConversionTable. The values are also needed to call the GetMCInstOperandNum() function. llvm-svn: 163101
* The ConvertToMCInst() function can't fail, so remove the now dead ↵Chad Rosier2012-08-311-3/+0
| | | | | | Match_ConversionFail enum. llvm-svn: 163002
* Typo.Chad Rosier2012-08-281-1/+1
| | | | llvm-svn: 162807
* [ms-inline asm] Avoid a false positive assertionChad Rosier2012-08-221-1/+3
| | | | | | | | | | | Assertion failed: (Start.isValid() == End.isValid() && "Start and end should either both be valid or both be invalid!") when parsing inline asm. SMLoc assumes that the first char * in the source is invalid. However, when parsing an inline asm the mnemonic is at this location. I don't want to change SMLoc, so use a trivial workaround. llvm-svn: 162381
* [ms-inline asm] Do not report a Parser error when matching inline assembly.Chad Rosier2012-08-211-14/+25
| | | | llvm-svn: 162306
* [ms-inline asm] Expose the ErrorInfo from the MatchInstructionImpl. In general,Chad Rosier2012-08-211-4/+6
| | | | | | | | | this is the index of the operand that failed to match. Note: This may cause a buildbot failure due to an API mismatch in clang. Should recover with my next commit to clang. llvm-svn: 162295
* [ms-inline asm] Extend the MC AsmParser API to match MCInsts (but not emit).Chad Rosier2012-08-091-3/+19
| | | | | | | | | | This new API will be used by clang to parse ms-style inline asms. One goal of this project is to use this style of inline asm for targets other then x86. Therefore, this API needs to be implemented for non-x86 targets at some point in the future. llvm-svn: 161624
* Remove tab characters.Craig Topper2012-07-181-13/+13
| | | | llvm-svn: 160425
* Fix typo in error message and remove some tab characters.Craig Topper2012-07-181-5/+5
| | | | llvm-svn: 160423
* Make x86 asm parser to check for xmm vs ymm for index register in gather ↵Craig Topper2012-07-181-0/+29
| | | | | | instructions. Also fix Intel syntax for gather instructions to use 'DWORD PTR' or 'QWORD PTR' to match gas. llvm-svn: 160420
* Whitespace.Chad Rosier2012-06-271-34/+34
| | | | llvm-svn: 159300
OpenPOWER on IntegriCloud