diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-08-14 19:22:06 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-08-14 19:22:06 +0000 |
commit | 21ef7116ef308ba565b094ab32559f1eb1c277b7 (patch) | |
tree | 17e3b3ed10ccf507f58cc9b90201eb596b4c8bb2 /test | |
parent | 38aee3bb4ffe14c8323785ae2fafed6f627fb577 (diff) |
[ms-inline asm] Add a helpful assert.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@161890 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test')
-rw-r--r-- | test/CodeGen/ms-inline-asm.c | 15 | ||||
-rw-r--r-- | test/Parser/ms-inline-asm.c | 10 |
2 files changed, 15 insertions, 10 deletions
diff --git a/test/CodeGen/ms-inline-asm.c b/test/CodeGen/ms-inline-asm.c index 8c3e5f7c56..18a2e8a668 100644 --- a/test/CodeGen/ms-inline-asm.c +++ b/test/CodeGen/ms-inline-asm.c @@ -9,7 +9,9 @@ void t1() { void t2() { // CHECK: @t2 -// CHECK: call void asm sideeffect "nop\0Anop\0Anop", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect +// CHECK: call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect +// CHECK: call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect +// CHECK: call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect // CHECK: ret void __asm nop __asm nop @@ -18,14 +20,17 @@ void t2() { void t3() { // CHECK: @t3 -// CHECK: call void asm sideeffect "nop\0Anop\0Anop", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect +// CHECK: call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect +// CHECK: call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect +// CHECK: call void asm sideeffect "nop", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect // CHECK: ret void __asm nop __asm nop __asm nop } void t4(void) { // CHECK: @t4 -// CHECK: call void asm sideeffect "mov ebx, eax\0Amov ecx, ebx", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect +// CHECK: call void asm sideeffect "mov ebx, eax", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect +// CHECK: call void asm sideeffect "mov ecx, ebx", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect // CHECK: ret void __asm mov ebx, eax __asm mov ecx, ebx @@ -33,8 +38,8 @@ void t4(void) { void t5(void) { // CHECK: @t5 -// CHECK: call void asm sideeffect "mov ebx, eax\0Amov ecx, ebx", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect +// CHECK: call void asm sideeffect "mov ebx, eax", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect +// CHECK: call void asm sideeffect "mov ecx, ebx", "~{dirflag},~{fpsr},~{flags}"() nounwind ia_nsdialect // CHECK: ret void __asm mov ebx, eax __asm mov ecx, ebx } - diff --git a/test/Parser/ms-inline-asm.c b/test/Parser/ms-inline-asm.c index 2d18195885..6820f3e642 100644 --- a/test/Parser/ms-inline-asm.c +++ b/test/Parser/ms-inline-asm.c @@ -11,13 +11,13 @@ void t5() { __asm { // expected-warning {{MS-style inline assembly is not supported}} int 0x2c ; } asm comments are fun! }{ } - __asm {} // no warning as this gets merged with the previous inline asm + __asm {} // expected-warning {{MS-style inline assembly is not supported}} } int t6() { __asm int 3 ; } comments for single-line asm // expected-warning {{MS-style inline assembly is not supported}} - __asm {} // no warning as this gets merged with the previous inline asm + __asm {} // expected-warning {{MS-style inline assembly is not supported}} - __asm int 4 // no warning as this gets merged with the previous inline asm + __asm int 4 // expected-warning {{MS-style inline assembly is not supported}} return 10; } int t7() { @@ -28,10 +28,10 @@ int t7() { } } void t8() { - __asm nop __asm nop __asm nop // expected-warning {{MS-style inline assembly is not supported}} + __asm nop __asm nop __asm nop // expected-warning {{MS-style inline assembly is not supported}} expected-warning {{MS-style inline assembly is not supported}} expected-warning {{MS-style inline assembly is not supported}} } void t9() { - __asm nop __asm nop ; __asm nop // expected-warning {{MS-style inline assembly is not supported}} + __asm nop __asm nop ; __asm nop // expected-warning {{MS-style inline assembly is not supported}} expected-warning {{MS-style inline assembly is not supported}} } int t_fail() { // expected-note {{to match this}} __asm |