]> granicus.if.org Git - clang/commitdiff
[ms-inline asm] Add test cases for r166592. The test cases only works if the
authorChad Rosier <mcrosier@apple.com>
Wed, 24 Oct 2012 17:23:06 +0000 (17:23 +0000)
committerChad Rosier <mcrosier@apple.com>
Wed, 24 Oct 2012 17:23:06 +0000 (17:23 +0000)
source operand is a register.

git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@166594 91177308-0d34-0410-b5e6-96231b3b80d8

test/CodeGen/ms-inline-asm-64.c
test/CodeGen/ms-inline-asm.c

index 6bf3e209d166b50bb22d93867479db14da984e06..a74ede09e001392b9149c2f8833b75fa9c0ddcc7 100644 (file)
@@ -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
+}
index 3997c53ee262220f49ea1e9d7be4293034c3c18d..597d58148ea3b877c1257fcaa87214695a5c7e20 100644 (file)
@@ -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
+}