summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/ms-inline-asm.c
Commit message (Collapse)AuthorAgeFilesLines
...
* [ms-inline asm] Rework the front-end to use the API introduced in r165946.Chad Rosier2012-10-151-2/+2
| | | | | | | | | | | | | | | | | | | -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
* [ms-inline asm] Remove a bunch of parsing code from the front-end, which will beChad Rosier2012-10-121-32/+3
| | | | | | reimplemented in the AsmParser where it belongs. llvm-svn: 165825
* [ms-inline asm] Remove a bunch of parsing code from the front-end, which will beChad Rosier2012-10-111-26/+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-9/+0
| | | | | | | | | 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
* Test case for r165275.Chad Rosier2012-10-041-0/+9
| | | | llvm-svn: 165276
* Update test case for r165174.Chad Rosier2012-10-031-3/+3
| | | | llvm-svn: 165175
* [ms-inline asm] Fixup test case to be valid ms-style asm. Fix whitespace.Chad Rosier2012-10-021-2/+4
| | | | llvm-svn: 165045
* clang/test/CodeGen/ms-inline-asm.c: It requires x86 codegen. Reported by ↵NAKAMURA Takumi2012-09-271-0/+1
| | | | | | Joey Gouly. llvm-svn: 164775
* [ms-inline asm] Handle the enumeration of input and output expressions in aChad Rosier2012-09-131-0/+13
| | | | | | | | | | | | 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
* Whitespace.Chad Rosier2012-09-121-1/+1
| | | | llvm-svn: 163751
* Fix test case for Release builds.Chad Rosier2012-09-121-1/+1
| | | | llvm-svn: 163737
* [ms-inline asm] Add a test case.Chad Rosier2012-09-121-0/+6
| | | | llvm-svn: 163731
* [ms-inline asm] Test case for r163729.Chad Rosier2012-09-121-0/+6
| | | | llvm-svn: 163730
* [ms-inline asm] If we have a single asm operand that maps to multipleChad Rosier2012-09-121-0/+12
| | | | | | | | | | | 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] Add $$ before numeric constants in the IR.Chad Rosier2012-09-111-8/+14
| | | | llvm-svn: 163581
* [ms-inline asm] Output empty asm statements for the directives we don'tChad Rosier2012-09-061-0/+9
| | | | | | | 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-1/+1
| | | | | | | 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 r163231.Chad Rosier2012-09-051-16/+16
| | | | llvm-svn: 163232
* [ms-inline asm] Update test case for r163181.Chad Rosier2012-09-051-16/+16
| | | | llvm-svn: 163182
* [ms-inline asm] Remove the Inline Asm Non-Standard Dialect attribute. ThisChad Rosier2012-09-041-16/+16
| | | | | | | implementation does not co-exist well with how the sideeffect and alignstack attributes are handled. llvm-svn: 163173
* [ms-inline asm] The MCInstrDesc only tracks register definitions. For now,Chad Rosier2012-09-041-2/+1
| | | | | | | assume that if the 1st operands is an expression and the instruction mayStore, then it is a memory definition. llvm-svn: 163144
* Fix test case for Release builds.Chad Rosier2012-08-281-1/+1
| | | | llvm-svn: 162800
* [ms-inline asm] Have MSAsmStmts use the generic EmitAsmStmt codegen function.Chad Rosier2012-08-281-1/+2
| | | | llvm-svn: 162796
* [ms-inline asm] Start sending non-simple inline asms to the AsmParser.Chad Rosier2012-08-221-1/+1
| | | | | | | 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 this test case and the associated special case code.Chad Rosier2012-08-211-17/+11
| | | | llvm-svn: 162288
* [ms-inline asm] Add a helper function, isMSAsmKeyword().Chad Rosier2012-08-161-0/+20
| | | | | | | | These require special handling, which we don't currently handle. This is being put in place to ensure we don't do invalid symbol table lookups or try to parse invalid assembly. The test cases just makes sure the latter isn't happening. llvm-svn: 162050
* Fixup test case for Release builds.Chad Rosier2012-08-161-1/+0
| | | | llvm-svn: 162038
* [ms-inline asm] Start tracking which tokens are registers and which areChad Rosier2012-08-161-0/+17
| | | | | | | | variables, function or label references. The former is a potential clobber. The latter is either an input or an output. Unfortunately, it's difficult to test this patch at the moment, but the added test case will eventually do so. llvm-svn: 162026
* [ms-inline asm] Use a set container to remove redundant clobbers.Chad Rosier2012-08-151-1/+1
| | | | llvm-svn: 161991
* [ms-inline asm] MSVC parses multiple __asm statements on a single line as oneChad Rosier2012-08-151-5/+2
| | | | | | | | | | | | statement. For example, if (x) __asm out dx, ax __asm out dx, ax results in a single inline asm statement (i.e., both "out dx, ax" statements are predicated on if(x)). llvm-svn: 161986
* [ms-inline asm] Add support for clobbers in CodeGen.Chad Rosier2012-08-151-5/+5
| | | | | | | This is a reapplication of r161914 now that the scoping issue has been resolved in r161966. llvm-svn: 161967
* Revert this to try to bring the i386 bots back.Eric Christopher2012-08-151-5/+5
| | | | llvm-svn: 161931
* [ms-inline asm] Add support for clobbers in CodeGen.Chad Rosier2012-08-151-5/+5
| | | | llvm-svn: 161914
* [ms-inline asm] More test cases to make sure buildMSAsmString() doesn't regress.Chad Rosier2012-08-141-0/+42
| | | | llvm-svn: 161908
* [ms-inline asm] Add a helpful assert.Chad Rosier2012-08-141-5/+10
| | | | llvm-svn: 161890
* [ms-inline asm] Have patchMSAsmStrings() return a vector or AsmStrings.Chad Rosier2012-08-131-0/+32
| | | | | | | | | | | | | | | | | | | | | | | | | The AsmParser expects a single asm instruction, but valid ms-style inline asm statements may contain multiple instructions. This happens with asm blocks __asm { mov ebx, eax mov ecx, ebx } or when multiple asm statements are adjacent to one another __asm mov ebx, eax __asm mov ecx, ebx and __asm mov ebx, eax __asm mov ecx, ebx Currently, asm blocks are not properly handled. llvm-svn: 161780
* [ms-inline asm] Use the new Inline Asm Non-Standard Dialect attribute.Chad Rosier2012-08-101-1/+1
| | | | llvm-svn: 161642
* [ms-inline asm] Add basic codegen support for simple asm stmts. Currently,Chad Rosier2012-08-081-1/+2
| | | | | | only machine specific clobbers are modeled. llvm-svn: 161524
* [ms-inline asm] Add a very simple test case. Basically, we're only testing forChad Rosier2012-08-081-0/+7
crashers at the moment (and coincidentally this case was causing a crash). llvm-svn: 161520
OpenPOWER on IntegriCloud