Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | [ms-inline asm] Lookup the IdentifierInfo using the Idents table and remove the | Chad Rosier | 2012-10-11 | 1 | -17/+1 | |
| | | | | | | | | | now unused static helper function. The test case needs to be remove temporarily until I can better filter memory operands that aren't actual variable reference. llvm-svn: 165751 | |||||
* | Revert 165058, per Jim request. This requires further discussion. | Chad Rosier | 2012-10-02 | 1 | -38/+2 | |
| | | | | llvm-svn: 165070 | |||||
* | [ms-inline asm] Rewrite the symbol references as wildcard MCParsedAsmOperands. | Chad Rosier | 2012-10-02 | 1 | -2/+38 | |
| | | | | | | | A Sema lookup is used to determine the size of the variable, which is in turn used during wildcard matching. llvm-svn: 165058 | |||||
* | [ms-inline asm] Enhance the isSimpleMSAsm() function to handle operands with ↵ | Chad Rosier | 2012-10-02 | 1 | -24/+26 | |
| | | | | | | | | pointer size directives (e.g., dword ptr [eax]). llvm-svn: 165031 | |||||
* | No need to call the InitializeAll* functions. | Chad Rosier | 2012-10-02 | 1 | -5/+0 | |
| | | | | llvm-svn: 165025 | |||||
* | [ms-inline asm] Use the convertToMapAndConstraints() function in the front-end. | Chad Rosier | 2012-10-01 | 1 | -62/+72 | |
| | | | | | | Rework the logic to account for the fact that we no longer create a MCInst. llvm-svn: 164980 | |||||
* | Examine the last, not the first, instruction from the MC matcher. | Bob Wilson | 2012-09-25 | 1 | -1/+1 | |
| | | | | | | | | If an MS-style inline asm is matched to multiple instructions, e.g., with a a WAIT-prefix, then we need to examine the operands of the last instruction instruction, not the prefix instruction. llvm-svn: 164608 | |||||
* | Update for r164567. | Chad Rosier | 2012-09-24 | 1 | -2/+2 | |
| | | | | llvm-svn: 164568 | |||||
* | Replace an assertion with an error for empty __asm statements. | Bob Wilson | 2012-09-24 | 1 | -4/+12 | |
| | | | | llvm-svn: 164551 | |||||
* | Fix a comment typo and clean up formatting. | Bob Wilson | 2012-09-24 | 1 | -4/+5 | |
| | | | | llvm-svn: 164550 | |||||
* | [ms-inline asm] Use mnemonicIsValid() in a helpful assert. | Chad Rosier | 2012-09-21 | 1 | -0/+2 | |
| | | | | llvm-svn: 164421 | |||||
* | Add a few FIXMEs. | Chad Rosier | 2012-09-13 | 1 | -0/+3 | |
| | | | | llvm-svn: 163758 | |||||
* | [ms-inline asm] Handle the enumeration of input and output expressions in a | Chad Rosier | 2012-09-13 | 1 | -35/+105 | |
| | | | | | | | | | | | | more robust way to address a few FIXMEs. The initial implementation, r163342, built the IR asm string and then tried to patch things on the fly without enough context. Specifically, it didn't skip mnemonics nor did it track with assembly instruction an expression was related to. The new implementation patches the operands and then builds the final IR string. llvm-svn: 163756 | |||||
* | [ms-inline asm] If we have a single asm operand that maps to multiple | Chad Rosier | 2012-09-12 | 1 | -55/+53 | |
| | | | | | | | | | | | MCOperands then iterate over all of then when computing clobbers, inputs and outputs. On x86 the 1-to-many mapping is a memory operand that includes a BaseReg(reg), MemScale(imm), MemIndexReg(reg), an Expr(MCExpr or imm) and a MemSegReg(reg). Invalid register (Op.getReg() == 0) are not considered when computing clobber. llvm-svn: 163728 | |||||
* | [ms-inline asm] isDef/NumDefs in this context only refer to register ↵ | Chad Rosier | 2012-09-11 | 1 | -3/+2 | |
| | | | | | | definitions, not memory definitions. llvm-svn: 163666 | |||||
* | [ms-inline asm] As of r163657 this check is unnecessary. | Chad Rosier | 2012-09-11 | 1 | -5/+0 | |
| | | | | llvm-svn: 163665 | |||||
* | [ms-inline asm] Don't consider tokens or immediates when computing clobbers, ↵ | Chad Rosier | 2012-09-11 | 1 | -0/+4 | |
| | | | | | | inputs and outputs. llvm-svn: 163657 | |||||
* | [ms-inline asm] Add $$ before numeric constants in the IR. | Chad Rosier | 2012-09-11 | 1 | -8/+13 | |
| | | | | llvm-svn: 163581 | |||||
* | [ms-inline asm] Output empty asm statements for the directives we don't | Chad Rosier | 2012-09-06 | 1 | -10/+7 | |
| | | | | | | | handle. Otherwise, the AsmParser will explode if we try to generate an object files. llvm-svn: 163345 | |||||
* | [ms-inline asm] The IR representation of inline assembly enumerates the input | Chad Rosier | 2012-09-06 | 1 | -0/+25 | |
| | | | | | | | and output expressions much like that in GNU-style inline assembly. Output expressions are first. Do this for MS-style inline asms. llvm-svn: 163342 | |||||
* | Update for r163187. | Chad Rosier | 2012-09-05 | 1 | -1/+1 | |
| | | | | llvm-svn: 163188 | |||||
* | [ms-inline asm] The MCInstrDesc only tracks register definitions. For now, | Chad Rosier | 2012-09-04 | 1 | -1/+2 | |
| | | | | | | | assume that if the 1st operands is an expression and the instruction mayStore, then it is a memory definition. llvm-svn: 163144 | |||||
* | Fix 80-column violation. | Chad Rosier | 2012-09-04 | 1 | -2/+2 | |
| | | | | llvm-svn: 163142 | |||||
* | [ms-inline asm] Use the new GetMCInstOperandNum() interface in the front-end. | Chad Rosier | 2012-09-03 | 1 | -3/+20 | |
| | | | | llvm-svn: 163126 | |||||
* | Removed unused argument. | Chad Rosier | 2012-09-03 | 1 | -3/+2 | |
| | | | | llvm-svn: 163105 | |||||
* | [ms-inline asm] Update for the MatchInstruction API change in r163101. | Chad Rosier | 2012-09-03 | 1 | -5/+7 | |
| | | | | llvm-svn: 163102 | |||||
* | Revert r162424 now that the scoping issue has been fixed in r162444. | Chad Rosier | 2012-08-28 | 1 | -2/+2 | |
| | | | | llvm-svn: 162797 | |||||
* | Tidy up. | Chad Rosier | 2012-08-28 | 1 | -1/+1 | |
| | | | | llvm-svn: 162786 | |||||
* | [ms-inline asm] Add constraints to MSAsmStmt. We don't currently compute | Chad Rosier | 2012-08-28 | 1 | -8/+23 | |
| | | | | | | | the constraints, so in the interim we speculatively assume a 'r' constraint. This is expected to work for most cases on x86. llvm-svn: 162784 | |||||
* | [ms-inline asm] As part of a larger refactoring, rename AsmStmt to GCCAsmStmt. | Chad Rosier | 2012-08-25 | 1 | -13/+13 | |
| | | | | | | No functional change intended. llvm-svn: 162632 | |||||
* | [ms-inline asm] Change the -fenable-experimental-ms-inline-asm option from a | Chad Rosier | 2012-08-24 | 1 | -2/+0 | |
| | | | | | | | | | CodeGen option to a LangOpt option. In turn, hoist the guard into the parser so that we avoid the new (and fairly unstable) Sema/AST/CodeGen logic. This should restore the behavior of clang to that prior to r158325. <rdar://problem/12163681> llvm-svn: 162602 | |||||
* | Remove unnecessary calls to c_str. | Benjamin Kramer | 2012-08-24 | 1 | -3/+3 | |
| | | | | llvm-svn: 162590 | |||||
* | [ms-inline asm] Generate the Input/Output expressions using | Chad Rosier | 2012-08-24 | 1 | -7/+14 | |
| | | | | | | Sema::ActOnIdExpression(). llvm-svn: 162564 | |||||
* | Fix 80-column violation. | Chad Rosier | 2012-08-24 | 1 | -1/+2 | |
| | | | | llvm-svn: 162560 | |||||
* | [ms-inline asm] Add the basic APIs for Exprs to the MSAsmStmt AST. Next we need | Chad Rosier | 2012-08-24 | 1 | -4/+16 | |
| | | | | | | generate the Input/Output expressions using Sema::ActOnIdExpression(). llvm-svn: 162509 | |||||
* | Now that ASTMultiPtr is nothing more than a array reference, make it a ↵ | Benjamin Kramer | 2012-08-23 | 1 | -3/+3 | |
| | | | | | | | | MutableArrayRef. This required changing all get() calls to data() and using the simpler constructors. llvm-svn: 162501 | |||||
* | [ms-inline asm] Rename a few induction variables to avoid confusion and silence | Chad Rosier | 2012-08-23 | 1 | -7/+7 | |
| | | | | | | a gcc warning. llvm-svn: 162444 | |||||
* | Don't recycle loop variables (to keep GCC happy). | Matt Beaumont-Gay | 2012-08-23 | 1 | -2/+2 | |
| | | | | llvm-svn: 162424 | |||||
* | Fix 80-column violation. | Chad Rosier | 2012-08-23 | 1 | -1/+3 | |
| | | | | llvm-svn: 162416 | |||||
* | [ms-inline asm] Compute the inputs and outputs. No test case (yet) as this | Chad Rosier | 2012-08-22 | 1 | -1/+28 | |
| | | | | | | requires codegen support. llvm-svn: 162410 | |||||
* | [ms-inline asm] Refactor code so that we can begin computing the Inputs/Outputs. | Chad Rosier | 2012-08-22 | 1 | -11/+19 | |
| | | | | | | No functional change intended. llvm-svn: 162403 | |||||
* | [ms-inline asm] Add comments. | Chad Rosier | 2012-08-22 | 1 | -1/+3 | |
| | | | | llvm-svn: 162396 | |||||
* | [ms-inline asm] Add comments. | Chad Rosier | 2012-08-22 | 1 | -1/+6 | |
| | | | | llvm-svn: 162394 | |||||
* | [ms-inline asm] Add helper function. No functional change intended. | Chad Rosier | 2012-08-22 | 1 | -2/+7 | |
| | | | | llvm-svn: 162393 | |||||
* | [ms-inline asm] Simplify logic. No functional change intended. | Chad Rosier | 2012-08-22 | 1 | -7/+2 | |
| | | | | llvm-svn: 162392 | |||||
* | [ms-inline asm] Compute the token range for each instruction within the asm. | Chad Rosier | 2012-08-22 | 1 | -4/+9 | |
| | | | | | | | Eventually, we'll need a way of mapping tokens (and their IdentifierInfo*) to the operands computed by buildMSAsmPieces(). llvm-svn: 162388 | |||||
* | [ms-inline asm] Simplify logic. No functional change intended. | Chad Rosier | 2012-08-22 | 1 | -5/+11 | |
| | | | | llvm-svn: 162385 | |||||
* | [ms-inline asm] Start sending non-simple inline asms to the AsmParser. | Chad Rosier | 2012-08-22 | 1 | -15/+27 | |
| | | | | | | | The parser still can't handle all cases, so fall back to emitting a simple MSAsmStmt if we get into trouble. llvm-svn: 162382 | |||||
* | [ms-inline asm] Remove the patchMSAsmStrings function. After some discussion | Chad Rosier | 2012-08-21 | 1 | -134/+17 | |
| | | | | | | | between Bob, Jim, Eric and I, we've decided to take a slightly different approach. llvm-svn: 162327 | |||||
* | [ms-inline asm] Have buildMSAsmString build a vector of unmodified AsmStrings. | Chad Rosier | 2012-08-21 | 1 | -7/+35 | |
| | | | | | | | | | | Add a new static function, buildMSAsmPieces, that will break these strings down into mnemonic and operands. Upon a match failure, the idea is to use the ErrorInfo from MatchInstructionImpl to inspect the mnemonic/operand and decide a course of action. Unfortunately, there's no easy way to test this at the moment. llvm-svn: 162321 |