diff options
author | Chad Rosier <mcrosier@apple.com> | 2012-10-24 17:23:06 +0000 |
---|---|---|
committer | Chad Rosier <mcrosier@apple.com> | 2012-10-24 17:23:06 +0000 |
commit | 42242552fe9769fba3c1a1f82e181688675908f0 (patch) | |
tree | 83e4afc591918482da3351c10042823a9f85be5d | |
parent | 14e71f04136de056c08ffb9ccd44b4ca391cc8a5 (diff) |
[ms-inline asm] Add test cases for r166592. The test cases only works if the
source operand is a register.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166594 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | test/CodeGen/ms-inline-asm-64.c | 7 | ||||
-rw-r--r-- | test/CodeGen/ms-inline-asm.c | 7 |
2 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/ms-inline-asm-64.c b/test/CodeGen/ms-inline-asm-64.c index 6bf3e209d1..a74ede09e0 100644 --- a/test/CodeGen/ms-inline-asm-64.c +++ b/test/CodeGen/ms-inline-asm-64.c @@ -7,3 +7,10 @@ void t1() { // CHECK: t1 // CHECK: call void asm sideeffect inteldialect "mov rax, $0", "r,~{rax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) nounwind } + +void t2() { + int var = 10; + __asm mov [eax], offset var +// CHECK: t2 +// CHECK: call void asm sideeffect inteldialect "mov [eax], $0", "r,~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) nounwind +} diff --git a/test/CodeGen/ms-inline-asm.c b/test/CodeGen/ms-inline-asm.c index 3997c53ee2..597d58148e 100644 --- a/test/CodeGen/ms-inline-asm.c +++ b/test/CodeGen/ms-inline-asm.c @@ -146,3 +146,10 @@ void t15() { // CHECK: call void asm sideeffect inteldialect "mov eax, dword ptr $0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) nounwind // CHECK: call void asm sideeffect inteldialect "mov eax, $0", "r,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) nounwind } + +void t16() { + int var = 10; + __asm mov [eax], offset var +// CHECK: t16 +// CHECK: call void asm sideeffect inteldialect "mov [eax], $0", "r,~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) nounwind +} |