summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen
diff options
context:
space:
mode:
authorEhsan Akhgari <ehsan.akhgari@gmail.com>2014-07-06 05:26:54 +0000
committerEhsan Akhgari <ehsan.akhgari@gmail.com>2014-07-06 05:26:54 +0000
commit0f89fac7a51d489eb4300fcb0159e2b6f2ba5556 (patch)
treee6d72e1071e9ff1da3031d05c6c277eda65bc9fd /clang/test/CodeGen
parent80758084f70dbdaa4ca16661871215bacee0ab18 (diff)
downloadbcm5719-llvm-0f89fac7a51d489eb4300fcb0159e2b6f2ba5556.tar.gz
bcm5719-llvm-0f89fac7a51d489eb4300fcb0159e2b6f2ba5556.zip
Add support for nested blocks in Microsoft inline assembly
This fixes http://llvm.org/PR20204. llvm-svn: 212389
Diffstat (limited to 'clang/test/CodeGen')
-rw-r--r--clang/test/CodeGen/ms-inline-asm-64.c4
-rw-r--r--clang/test/CodeGen/ms-inline-asm.c11
2 files changed, 11 insertions, 4 deletions
diff --git a/clang/test/CodeGen/ms-inline-asm-64.c b/clang/test/CodeGen/ms-inline-asm-64.c
index 69066aa8395..d6f6e2ee0e0 100644
--- a/clang/test/CodeGen/ms-inline-asm-64.c
+++ b/clang/test/CodeGen/ms-inline-asm-64.c
@@ -37,7 +37,9 @@ int t4() {
foo.b = 2;
__asm {
lea ebx, foo
- mov eax, [ebx].foo.a
+ {
+ mov eax, [ebx].foo.a
+ }
mov [ebx].foo.b, ecx
}
return foo.b;
diff --git a/clang/test/CodeGen/ms-inline-asm.c b/clang/test/CodeGen/ms-inline-asm.c
index 3836dddc909..3b55b50aa12 100644
--- a/clang/test/CodeGen/ms-inline-asm.c
+++ b/clang/test/CodeGen/ms-inline-asm.c
@@ -52,6 +52,11 @@ void t7() {
__asm {
int 0x2c ; } asm comments are fun! }{
}
+ __asm {
+ {
+ int 0x2c ; } asm comments are fun! }{
+ }
+ }
__asm {}
// CHECK: t7
// CHECK: call void asm sideeffect inteldialect "int $$0x2c", "~{dirflag},~{fpsr},~{flags}"()
@@ -73,8 +78,8 @@ int t8() {
void t9() {
__asm {
push ebx
- mov ebx, 0x07
- pop ebx
+ { mov ebx, 0x07 }
+ __asm { pop ebx }
}
// CHECK: t9
// CHECK: call void asm sideeffect inteldialect "push ebx\0A\09mov ebx, $$0x07\0A\09pop ebx", "~{ebx},~{esp},~{dirflag},~{fpsr},~{flags}"()
@@ -129,7 +134,7 @@ void t14() {
unsigned i = 1, j = 2;
__asm {
.if 1
- mov eax, i
+ { mov eax, i }
.else
mov ebx, j
.endif
OpenPOWER on IntegriCloud