summaryrefslogtreecommitdiffstats
path: root/clang/lib/Sema/SemaStmtAsm.cpp
Commit message (Collapse)AuthorAgeFilesLines
...
* Remove useless 'llvm::' qualifier from names like StringRef and others that areDmitri Gribenko2013-01-121-2/+2
| | | | | | brought into 'clang' namespace by clang/Basic/LLVM.h llvm-svn: 172323
* [ms-inline asm] Extend the inline asm Sema lookup interface to determine if theChad Rosier2013-01-101-6/+10
| | | | | | | Decl is a VarDecl. Part of rdar://12991541 llvm-svn: 172120
* Sort all of Clang's files under 'lib', and fix up the broken headersChandler Carruth2012-12-041-6/+6
| | | | | | | | | | | | | uncovered. This required manually correcting all of the incorrect main-module headers I could find, and running the new llvm/utils/sort_includes.py script over the files. I also manually added quite a few missing headers that were uncovered by shuffling the order or moving headers up to be main-module-headers. llvm-svn: 169237
* Finish reverting r167761, it's causing test failures.Eric Christopher2012-11-121-0/+3
| | | | llvm-svn: 167777
* Don't test for incomplete types.Bill Wendling2012-11-121-3/+0
| | | | llvm-svn: 167761
* Check that the input size is correct for the given constraint.Bill Wendling2012-11-121-0/+11
| | | | | | | | | The 'a', 'c', and 'd' constraints on i386 mean a 32-bit register. We cannot place a 64-bit value into the 32-bit register. Error out instead of causing the compiler to spew general badness. <rdar://problem/12415959> llvm-svn: 167717
* Recommit Eric's code to validate ASM string's constraints and modifiers.Bill Wendling2012-10-251-0/+48
| | | | | | | | | | | | | This code checks the ASM string to see if the output size is able to fit within the variable specified as the output. For instance, scalar-to-vector conversions may not really work. It's on by default, but can be turned off with a flag if you think you know what you're doing. This is placed under a flag ('-Wasm-operand-widths') and flag group ('-Wasm'). <rdar://problem/12284092> llvm-svn: 166737
* [ms-inline asm] Add support for field lookup in the SemaCallback. Patch by Eli.Chad Rosier2012-10-251-0/+50
| | | | llvm-svn: 166723
* Revert r166647 to rethink the patch...Bill Wendling2012-10-251-48/+0
| | | | llvm-svn: 166655
* Add some support for diagnosing possibly mismatched constraint, type size andBill Wendling2012-10-251-0/+48
| | | | | | | modifiers. (From an idea by Eric...) <rdar://problem/12284092> llvm-svn: 166647
* [ms-inline asm] Update for r166433.Chad Rosier2012-10-231-3/+8
| | | | llvm-svn: 166489
* [ms-inline-asm] Add handling for errors coming out of the backend.Eli Friedman2012-10-231-5/+46
| | | | llvm-svn: 166463
* Move private classes into anonymous namespaces.Benjamin Kramer2012-10-201-0/+4
| | | | llvm-svn: 166377
* [ms-inline asm] Set the SemaCallback in the TargetAsmParser.Chad Rosier2012-10-191-1/+3
| | | | llvm-svn: 166310
* [ms-inline asm] Set the MCTargetAsmParser as paring MS-style inline asm.Chad Rosier2012-10-191-0/+1
| | | | llvm-svn: 166293
* [ms-inline asm] Add a size argument to the LookupInlineAsmIdentifier() callback,Chad Rosier2012-10-181-3/+8
| | | | | | which will be used by the asm matcher in the near future. llvm-svn: 166221
* [ms-inline asm] Have the LookupInlineAsmIdentifier() callback function return aChad Rosier2012-10-181-19/+17
| | | | | | | *NamedDecl. In turn, build the expressions after we're finished parsing the asm. This avoids a crasher if the lookup fails. llvm-svn: 166213
* [ms-inline asm] Move most of the AsmParsing logic in clang back into the MCChad Rosier2012-10-181-180/+81
| | | | | | | layer. Use the new ParseMSInlineAsm() API and add an implementation of the MCAsmParserSemaCallback interface. llvm-svn: 166184
* [ms-inline asm] Move some logic around to simplify the interface between theChad Rosier2012-10-161-18/+32
| | | | | | front-end and the AsmParser. No functional change intended. llvm-svn: 166063
* [ms-inline asm] Rework the front-end to use the API introduced in r165946.Chad Rosier2012-10-151-217/+179
| | | | | | | | | | | | | | | | | | | -The front-end now builds a single assembly string and feeds it to the AsmParser. The front-end iterates on a per statement basis by calling the ParseStatement() function. Please note, the calling of ParseStatement() and and any notion of MCAsmParsedOperands will be sunk into the MC layer in the near future. I plan to expose more basic APIs such as getClobbers, etc. -The enumeration of the AsmString expressions have been reworked to use SMLocs rather than assembly Pieces, which were being parsed in the front-end. -The test case, t8(), was modified due to r129223. I'll have to find a way to work around things such as these. Sorry for the large commit, but breaking this in multiple smaller commits proved too irritating. llvm-svn: 165957
* Update for r165858.Chad Rosier2012-10-131-3/+4
| | | | llvm-svn: 165859
* [ms-inline asm] Remove a bunch of parsing code from the front-end.Chad Rosier2012-10-121-21/+1
| | | | llvm-svn: 165851
* Update for r165833.Chad Rosier2012-10-121-9/+5
| | | | llvm-svn: 165834
* [ms-inline asm] Remove a bunch of parsing code from the front-end, which will beChad Rosier2012-10-121-33/+0
| | | | | | reimplemented in the AsmParser where it belongs. llvm-svn: 165825
* Remove unused variable.Benjamin Kramer2012-10-121-2/+0
| | | | llvm-svn: 165793
* Remove dead code introduced in r165751.Chad Rosier2012-10-121-6/+2
| | | | llvm-svn: 165772
* [ms-inline asm] Remove a bunch of parsing code from the front-end, which will beChad Rosier2012-10-111-71/+2
| | | | | | reimplemented in the AsmParser where it belongs. llvm-svn: 165752
* [ms-inline asm] Lookup the IdentifierInfo using the Idents table and remove theChad Rosier2012-10-111-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 Rosier2012-10-021-38/+2
| | | | llvm-svn: 165070
* [ms-inline asm] Rewrite the symbol references as wildcard MCParsedAsmOperands.Chad Rosier2012-10-021-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 Rosier2012-10-021-24/+26
| | | | | | | | pointer size directives (e.g., dword ptr [eax]). llvm-svn: 165031
* No need to call the InitializeAll* functions.Chad Rosier2012-10-021-5/+0
| | | | llvm-svn: 165025
* [ms-inline asm] Use the convertToMapAndConstraints() function in the front-end.Chad Rosier2012-10-011-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 Wilson2012-09-251-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 Rosier2012-09-241-2/+2
| | | | llvm-svn: 164568
* Replace an assertion with an error for empty __asm statements.Bob Wilson2012-09-241-4/+12
| | | | llvm-svn: 164551
* Fix a comment typo and clean up formatting.Bob Wilson2012-09-241-4/+5
| | | | llvm-svn: 164550
* [ms-inline asm] Use mnemonicIsValid() in a helpful assert.Chad Rosier2012-09-211-0/+2
| | | | llvm-svn: 164421
* Add a few FIXMEs.Chad Rosier2012-09-131-0/+3
| | | | llvm-svn: 163758
* [ms-inline asm] Handle the enumeration of input and output expressions in aChad Rosier2012-09-131-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 multipleChad Rosier2012-09-121-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 Rosier2012-09-111-3/+2
| | | | | | definitions, not memory definitions. llvm-svn: 163666
* [ms-inline asm] As of r163657 this check is unnecessary.Chad Rosier2012-09-111-5/+0
| | | | llvm-svn: 163665
* [ms-inline asm] Don't consider tokens or immediates when computing clobbers, ↵Chad Rosier2012-09-111-0/+4
| | | | | | inputs and outputs. llvm-svn: 163657
* [ms-inline asm] Add $$ before numeric constants in the IR.Chad Rosier2012-09-111-8/+13
| | | | llvm-svn: 163581
* [ms-inline asm] Output empty asm statements for the directives we don'tChad Rosier2012-09-061-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 inputChad Rosier2012-09-061-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 Rosier2012-09-051-1/+1
| | | | llvm-svn: 163188
* [ms-inline asm] The MCInstrDesc only tracks register definitions. For now,Chad Rosier2012-09-041-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 Rosier2012-09-041-2/+2
| | | | llvm-svn: 163142
OpenPOWER on IntegriCloud