summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/ms-inline-asm.cpp
Commit message (Collapse)AuthorAgeFilesLines
* [X86][AsmParser] re-introduce 'offset' operatorEric Astor2019-12-301-1/+1
| | | | | | | | | | | | | | | | | | | | | | | Summary: Amend MS offset operator implementation, to more closely fit with its MS counterpart: 1. InlineAsm: evaluate non-local source entities to their (address) location 2. Provide a mean with which one may acquire the address of an assembly label via MS syntax, rather than yielding a memory reference (i.e. "offset asm_label" and "$asm_label" should be synonymous 3. address PR32530 Based on http://llvm.org/D37461 Fix broken test where the break appears unrelated. - Set up appropriate memory-input rewrites for variable references. - Intel-dialect assembly printing now correctly handles addresses by adding "offset". - Pass offsets as immediate operands (using "r" constraint for offsets of locals). Reviewed By: rnk Differential Revision: https://reviews.llvm.org/D71436
* [ms] [X86] Use "P" modifier on operands to call instructions in inline X86 ↵Eric Astor2019-12-221-1/+1
| | | | | | | | | | | | | | | | | | | | assembly. Summary: This is documented as the appropriate template modifier for call operands. Fixes PR44272, and adds a regression test. Also adds support for operand modifiers in Intel-style inline assembly. Reviewers: rnk Reviewed By: rnk Subscribers: merge_guards_bot, hiraditya, cfe-commits, llvm-commits Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D71677
* Fixups to FE tests affected by D36793Coby Tayree2017-08-241-4/+4
| | | | | | Differential Revision: https://reviews.llvm.org/D36794 llvm-svn: 311640
* [X86][Ms-InlineAsm] Extend MS Dot operator to accept "this" + struct/class ↵Coby Tayree2017-08-091-0/+16
| | | | | | | | | | | pointers aliases MS InlineAsm Dot operator accepts "Bases" such as "this" (cpp) and class/struct pointer typedef. This patch enhance its implementation with this behavior. Differential Revision: https://reviews.llvm.org/D36450 llvm-svn: 310472
* [ms-inline-asm] Use the frontend size only for ambiguous instructionsReid Kleckner2017-05-041-12/+53
| | | | | | | | | | | | | | | | | | This avoids problems on code like this: char buf[16]; __asm { movups xmm0, [buf] mov [buf], eax } The frontend size in this case (1) is wrong, and the register makes the instruction matching unambiguous. There are also enough bytes available that we shouldn't complain to the user that they are potentially using an incorrectly sized instruction to access the variable. Supersedes D32636 and D26586 and fixes PR28266 llvm-svn: 302179
* Use ${:uid} to generate unique MS asm labels, not {:uid}Reid Kleckner2016-11-291-2/+2
| | | | llvm-svn: 288093
* [MS] Mangle a unique ID into all MS inline asm labelsReid Kleckner2016-11-281-2/+2
| | | | | | | | | | | | This solves PR23715 in a way that is compatible with LTO. MSVC supports jumping to source-level labels and between inline asm blocks, but we don't. Also revert the old solution, r255201, which was to mark these calls as noduplicate. llvm-svn: 288059
* Update Clang tests to handle explicitly typed load changes in LLVM.David Blaikie2015-02-271-1/+1
| | | | llvm-svn: 230795
* Update Clang tests to handle explicitly typed gep changes in LLVM.David Blaikie2015-02-271-1/+1
| | | | llvm-svn: 230783
* ms-inline-asm: Scope inline asm labels to functionsEhsan Akhgari2014-09-221-0/+17
| | | | | | | | | | | | | | | | 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: Tests for r214550Reid Kleckner2014-08-011-1/+1
| | | | | | | | | 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
* Fix test/CodeGen/ms-inline-asm.cpp from r213916.Ehsan Akhgari2014-07-251-1/+1
| | | | llvm-svn: 213918
* clang-cl: Merge adjacent single-line __asm blocksEhsan Akhgari2014-07-251-24/+5
| | | | | | | | | | | | | | | | | 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
* Support field references to struct names and c++11 aliases from inline asm.Nico Weber2014-05-061-1/+31
| | | | | | This is in addition to the existing support for typedefs. llvm-svn: 208053
* Update clang MS inline asm tests for r196939Reid Kleckner2013-12-101-1/+1
| | | | 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
* CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin2013-08-151-3/+3
| | | | | | tests fail. llvm-svn: 188447
* [ms-inline asm] Don't diagnose an empty lookup for inline assmebly. This happenChad Rosier2013-05-241-0/+8
| | | | | | | | | | | | | for labels in inline assembly that aren't in the lookup tables. E.g., __asm { a: jmp a } rdar://13983623 llvm-svn: 182659
* Move parsing of identifiers in MS-style inline assembly intoJohn McCall2013-05-031-15/+62
| | | | | | | | | | | | | | | | | | | | | the actual parser and support arbitrary id-expressions. We're actually basically set up to do arbitrary expressions here if we wanted to. Assembly operands permit things like A::x to be written regardless of language mode, which forces us to embellish the evaluation context logic somewhat. The logic here under template instantiation is incorrect; we need to preserve the fact that an expression was unevaluated. Of course, template instantiation in general is fishy here because we have no way of delaying semantic analysis in the MC parser. It's all just fishy. I've also fixed the serialization of MS asm statements. This commit depends on an LLVM commit. llvm-svn: 180976
* Add test case for r179343.Chad Rosier2013-04-111-0/+22
| | | | llvm-svn: 179344
* Test case for r179339.Chad Rosier2013-04-111-0/+10
| | | | llvm-svn: 179340
* Update test case for r179323.Chad Rosier2013-04-111-3/+3
| | | | llvm-svn: 179324
* [ms-inline asm] Test case for r178566.Chad Rosier2013-04-021-0/+26
llvm-svn: 178568
OpenPOWER on IntegriCloud