diff options
author | Marina Yatsina <marina.yatsina@intel.com> | 2016-02-23 08:53:45 +0000 |
---|---|---|
committer | Marina Yatsina <marina.yatsina@intel.com> | 2016-02-23 08:53:45 +0000 |
commit | 146d2ec06d07f01762cd80561b59e1ff88965a8b (patch) | |
tree | 3ae4b3df35bfbbcf6772b4b0c9585233fb2570d4 /clang/test/CodeGen/ms-inline-asm.c | |
parent | 7862c173c3615ec07d2fdfa3a92363544dfb19b6 (diff) | |
download | bcm5719-llvm-146d2ec06d07f01762cd80561b59e1ff88965a8b.tar.gz bcm5719-llvm-146d2ec06d07f01762cd80561b59e1ff88965a8b.zip |
[ms-inline-asm] Fixing bug in single asm statement support
Fixing a crash caused by trying to merge a single-line asm statement with an asm block that follows it, e.g:
asm int 4
asm {
int 5
}
Now, only adjacent single-line asm statements that are not surrounded by braces will be merged into one asm call.
Differential Revision: http://reviews.llvm.org/D17496
llvm-svn: 261618
Diffstat (limited to 'clang/test/CodeGen/ms-inline-asm.c')
-rw-r--r-- | clang/test/CodeGen/ms-inline-asm.c | 13 |
1 files changed, 11 insertions, 2 deletions
diff --git a/clang/test/CodeGen/ms-inline-asm.c b/clang/test/CodeGen/ms-inline-asm.c index 2f5de676c72..e4d9756191d 100644 --- a/clang/test/CodeGen/ms-inline-asm.c +++ b/clang/test/CodeGen/ms-inline-asm.c @@ -63,10 +63,19 @@ void t7() { int t8() { __asm int 4 ; } comments for single-line asm __asm {} - __asm int 4 + __asm { int 5} + __asm int 6 + __asm int 7 + __asm { + int 8 + } return 10; // CHECK: t8 -// CHECK: call i32 asm sideeffect inteldialect "int $$4\0A\09int $$4", "={eax},~{dirflag},~{fpsr},~{flags}"() +// CHECK: call i32 asm sideeffect inteldialect "int $$4", "={eax},~{dirflag},~{fpsr},~{flags}"() +// CHECK: call i32 asm sideeffect inteldialect "", "={eax},~{dirflag},~{fpsr},~{flags}"() +// CHECK: call i32 asm sideeffect inteldialect "int $$5", "={eax},~{dirflag},~{fpsr},~{flags}"() +// CHECK: call i32 asm sideeffect inteldialect "int $$6\0A\09int $$7", "={eax},~{dirflag},~{fpsr},~{flags}"() +// CHECK: call i32 asm sideeffect inteldialect "int $$8", "={eax},~{dirflag},~{fpsr},~{flags}"() // CHECK: ret i32 10 } |