summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/ms-inline-asm.c
Commit message (Collapse)AuthorAgeFilesLines
* [ms-inline-asm] Add field access to MS inline asm identifier lookupReid Kleckner2015-08-261-0/+18
| | | | | | | | | | | | | | Now we can parse code like this: struct A { int field; }; int f(A o) { __asm mov eax, o.field } Fixes PR19117. llvm-svn: 246088
* [X86] Recognize "flags" as an identifier, not a register in Intel-syntax ↵Michael Kuperstein2015-07-301-0/+8
| | | | | | | | | | | inline asm This contains the test-case for r243630. Patch by: marina.yatsina@intel.com Differential Revision: http://reviews.llvm.org/D11513 llvm-svn: 243632
* Add test for parsing the XOR operator in Intel syntax inline assembly.Michael Kuperstein2015-06-141-0/+2
| | | | | | | | | LLVM side of the patch was committed as r239695. Differential Revision: http://reviews.llvm.org/D10384 Patch by marina.yatsina@intel.com llvm-svn: 239696
* Update Clang tests to handle explicitly typed load changes in LLVM.David Blaikie2015-02-271-1/+1
| | | | llvm-svn: 230795
* ms-inline-asm: Add a test case for the usage of labels in bracket expressionsEhsan Akhgari2014-09-221-0/+9
| | | | | | | | | | | | Summary: This is a test for this patch: http://reviews.llvm.org/D5445. Reviewers: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D5446 llvm-svn: 218271
* ms-inline-asm: Scope inline asm labels to functionsEhsan Akhgari2014-09-221-1/+28
| | | | | | | | | | | | | | | | Summary: This fixes PR20023. In order to implement this scoping rule, we piggy back on the existing LabelDecl machinery, by creating LabelDecl's that will carry the "internal" name of the inline assembly label, which we will rewrite the asm label to. Reviewers: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4589 llvm-svn: 218230
* MS inline asm: Allow __asm blocks to set a return valueReid Kleckner2014-09-041-5/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | If control falls off the end of a function after an __asm block, MSVC assumes that the inline assembly filled the EAX and possibly EDX registers with an appropriate return value. This functionality is used in inline functions returning 64-bit integers in system headers, so we need some amount of compatibility. This is implemented in Clang by adding extra output constraints to every inline asm block, and storing the resulting output registers into the return value slot. If we see an asm block somewhere in the function body, we emit a normal epilogue instead of marking the end of the function with a return type unreachable. Normal returns in functions not using this functionality will overwrite the return value slot, and in most cases LLVM should be able to eliminate the dead stores. Fixes PR17201. Reviewed By: majnemer Differential Revision: http://reviews.llvm.org/D5177 llvm-svn: 217187
* MS inline asm: Add a test for xgetbv clobbersReid Kleckner2014-09-041-0/+6
| | | | llvm-svn: 217174
* MS inline asm: Tests for r214550Reid Kleckner2014-08-011-2/+2
| | | | | | | | | These tests seem like an exception to the rule against assembly emitting tests in clang. I made an LLVM side change that can only be tested by setting up the inline assembly machinery that is only implemented by Clang. llvm-svn: 214552
* ms-inline-asm: Add a test to ensure that call doesn't clobber eax.Ehsan Akhgari2014-07-311-0/+6
| | | | | | | | | | | | | Note that it's not clear whether this is the right behavior, please see the review for the discussion. Reviewers: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4577 llvm-svn: 214401
* Fix test/CodeGen/ms-inline-asm.c from r213916.Ehsan Akhgari2014-07-251-1/+1
| | | | llvm-svn: 213919
* clang-cl: Merge adjacent single-line __asm blocksEhsan Akhgari2014-07-251-125/+135
| | | | | | | | | | | | | | | | | Summary: This patch extends the __asm parser to make it keep parsing input tokens as inline assembly if a single-line __asm line is followed by another line starting with __asm too. It also makes sure that we correctly keep matching braces in such situations by separating the notions of how many braces we are matching and whether we are in single-line asm block mode. Reviewers: rnk Subscribers: cfe-commits Differential Revision: http://reviews.llvm.org/D4598 llvm-svn: 213916
* clang/test/CodeGen/ms-inline-asm.c: Fix for -Asserts.NAKAMURA Takumi2014-07-171-7/+9
| | | | llvm-svn: 213329
* Add a test for PR20343 after llvm r213303.Nico Weber2014-07-171-0/+16
| | | | llvm-svn: 213305
* Add support for nested blocks in Microsoft inline assemblyEhsan Akhgari2014-07-061-3/+8
| | | | | | This fixes http://llvm.org/PR20204. llvm-svn: 212389
* Add a test case for the tilde operator in Microsoft inline assemblyEhsan Akhgari2014-07-051-0/+2
| | | | llvm-svn: 212373
* MS asm: Filter out fpsw clobbersReid Kleckner2014-03-271-0/+9
| | | | | | | | | | | | | | | | When parsing MS inline assembly, we note that fpsw is an implicit def of most x87 FP operations, and add it to the clobber list. However, we don't recognize fpsw as a gcc register name, and we assert. Clang always adds an fpsr clobber, which means the same thing to LLVM, so we can just use that. This test case was broken by my LLVM change r196939. Reviewers: echristo Differential Revision: http://llvm-reviews.chandlerc.com/D2993 llvm-svn: 204878
* Add tests for MS inline asm change r203146Reid Kleckner2014-03-061-0/+15
| | | | llvm-svn: 203147
* Test case for clobbers on cpuid in ms inline asmReid Kleckner2014-01-281-0/+6
| | | | | | Tests r200279 in LLVM. llvm-svn: 200280
* Update clang MS inline asm tests for r196939Reid Kleckner2013-12-101-7/+8
| | | | llvm-svn: 196940
* clang/test: REQUIRES: s/x86-64-registered-target/x86-registered-target/NAKAMURA Takumi2013-12-041-1/+1
| | | | llvm-svn: 196350
* Don't pass -O0 to clang_cc1, it is the default.Rafael Espindola2013-09-041-1/+1
| | | | llvm-svn: 189910
* Fix typo.Chad Rosier2013-04-181-1/+1
| | | | llvm-svn: 179811
* Test cases for r179719.Chad Rosier2013-04-171-0/+6
| | | | llvm-svn: 179720
* Test cases for r179655.Chad Rosier2013-04-171-3/+36
| | | | llvm-svn: 179656
* Add test case for r179403.Chad Rosier2013-04-121-0/+12
| | | | llvm-svn: 179404
* Add test case for r179399.Chad Rosier2013-04-121-1/+3
| | | | llvm-svn: 179400
* Add test case for r179383 and r179393.Chad Rosier2013-04-121-1/+8
| | | | llvm-svn: 179394
* [ms-inline asm] Move a few test cases from the 32-bit version to the 64-bitChad Rosier2013-04-101-30/+0
| | | | | | version as lea is only available in 64-bit mode. llvm-svn: 179190
* [ms-inline asm] Add a few test cases that were regressed by r179115. ThatChad Rosier2013-04-101-0/+3
| | | | | | | commit was reverted in r179120, but I do plan on reapplying with a fix shortly. Part of rdar://13611297 llvm-svn: 179182
* Test case for r179030.Chad Rosier2013-04-081-0/+7
| | | | llvm-svn: 179031
* Add test case for r178881.Chad Rosier2013-04-051-1/+9
| | | | llvm-svn: 178882
* Remove unnecessary attributes from test case.Chad Rosier2013-03-271-81/+79
| | | | llvm-svn: 178188
* Add a front-end test case for r178186.Chad Rosier2013-03-271-0/+8
| | | | llvm-svn: 178187
* Test case for r177439 and r177440.Chad Rosier2013-03-191-0/+13
| | | | llvm-svn: 177441
* Update test for r177413.Chad Rosier2013-03-191-2/+2
| | | | llvm-svn: 177414
* Test case for r177347.Chad Rosier2013-03-181-0/+13
| | | | llvm-svn: 177349
* Add a front-end test case for r176036.Chad Rosier2013-02-251-0/+8
| | | | llvm-svn: 176038
* Update to use references to attribute groups instead of listing the ↵Bill Wendling2013-02-221-69/+71
| | | | | | attributes on the call/invoke instructions. llvm-svn: 175878
* [ms-inline asm] Remove this test while I investigate why eax isn't being ↵Chad Rosier2013-02-201-6/+0
| | | | | | clobbered. llvm-svn: 175637
* Add test case for r175312.Chad Rosier2013-02-151-0/+6
| | | | llvm-svn: 175313
* [ms-inline asm] Add test case for r175083.Chad Rosier2013-02-131-0/+12
| | | | llvm-svn: 175084
* [ms-inline-asm] Test cases to ensure the AsmRewrite list is sorted (r175021).Chad Rosier2013-02-131-0/+12
| | | | | | Part of rdar://13202662 llvm-svn: 175022
* [ms-inline-asm] Add test cases for the align/emit directives.Chad Rosier2013-02-121-0/+16
| | | | | | Part of rdar://13200215 llvm-svn: 175009
* [ms-inline asm] Update test case now that we are correctly parsing __emit ↵Chad Rosier2013-02-121-2/+2
| | | | | | directives. llvm-svn: 175000
* Typo.Chad Rosier2013-02-121-1/+1
| | | | llvm-svn: 174995
* [ms-inline asm] Add a few test cases for the parsing of hexidecimal integers.Chad Rosier2013-02-121-0/+34
| | | | llvm-svn: 174989
* [ms-inline asm] Remove the -fenable-experimental-ms-inline-asm flag. MS-styleChad Rosier2013-01-221-1/+1
| | | | | | inline assembly can be enable with -fasm-blocks or -fms-extensions alone. llvm-svn: 173186
* [ms-inline asm] Updates and test case for r172743.Chad Rosier2013-01-171-1/+29
| | | | | | Part of rdar://12576868 llvm-svn: 172744
* [ms-inline asm] Add test case for r172121. Chad Rosier2013-01-101-0/+7
| | | | | | Part of rdar://12991541 llvm-svn: 172122
OpenPOWER on IntegriCloud