diff options
| author | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2014-07-06 05:26:54 +0000 |
|---|---|---|
| committer | Ehsan Akhgari <ehsan.akhgari@gmail.com> | 2014-07-06 05:26:54 +0000 |
| commit | 0f89fac7a51d489eb4300fcb0159e2b6f2ba5556 (patch) | |
| tree | e6d72e1071e9ff1da3031d05c6c277eda65bc9fd /clang/test/CodeGen | |
| parent | 80758084f70dbdaa4ca16661871215bacee0ab18 (diff) | |
| download | bcm5719-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.c | 4 | ||||
| -rw-r--r-- | clang/test/CodeGen/ms-inline-asm.c | 11 |
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 |

