aboutsummaryrefslogtreecommitdiff
path: root/clang/test/CodeGen/ms-inline-asm.cpp
AgeCommit message (Collapse)AuthorFilesLines
2017-05-04[ms-inline-asm] Use the frontend size only for ambiguous instructionsReid Kleckner1-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
2016-11-29Use ${:uid} to generate unique MS asm labels, not {:uid}Reid Kleckner1-2/+2
llvm-svn: 288093
2016-11-28[MS] Mangle a unique ID into all MS inline asm labelsReid Kleckner1-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
2015-02-27Update Clang tests to handle explicitly typed load changes in LLVM.David Blaikie1-1/+1
llvm-svn: 230795
2015-02-27Update Clang tests to handle explicitly typed gep changes in LLVM.David Blaikie1-1/+1
llvm-svn: 230783
2014-09-22ms-inline-asm: Scope inline asm labels to functionsEhsan Akhgari1-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
2014-08-01MS inline asm: Tests for r214550Reid Kleckner1-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
2014-07-25Fix test/CodeGen/ms-inline-asm.cpp from r213916.Ehsan Akhgari1-1/+1
llvm-svn: 213918
2014-07-25clang-cl: Merge adjacent single-line __asm blocksEhsan Akhgari1-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
2014-05-06Support field references to struct names and c++11 aliases from inline asm.Nico Weber1-1/+31
This is in addition to the existing support for typedefs. llvm-svn: 208053
2013-12-10Update clang MS inline asm tests for r196939Reid Kleckner1-1/+1
llvm-svn: 196940
2013-12-04clang/test: REQUIRES: s/x86-64-registered-target/x86-registered-target/NAKAMURA Takumi1-1/+1
llvm-svn: 196350
2013-09-04Don't pass -O0 to clang_cc1, it is the default.Rafael Espindola1-1/+1
llvm-svn: 189910
2013-08-15CHECK-LABEL-ify some code gen tests to improve diagnostic experience when ↵Stephen Lin1-3/+3
tests fail. llvm-svn: 188447
2013-05-24[ms-inline asm] Don't diagnose an empty lookup for inline assmebly. This happenChad Rosier1-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
2013-05-03Move parsing of identifiers in MS-style inline assembly intoJohn McCall1-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
2013-04-11Add test case for r179343.Chad Rosier1-0/+22
llvm-svn: 179344
2013-04-11Test case for r179339.Chad Rosier1-0/+10
llvm-svn: 179340
2013-04-11Update test case for r179323.Chad Rosier1-3/+3
llvm-svn: 179324
2013-04-02[ms-inline asm] Test case for r178566.Chad Rosier1-0/+26
llvm-svn: 178568