[cfe-commits] r166594 - in /cfe/trunk/test/CodeGen: ms-inline-asm-64.c ms-inline-asm.c

Chad Rosier mcrosier at apple.com
Wed Oct 24 10:23:06 PDT 2012


Author: mcrosier
Date: Wed Oct 24 12:23:06 2012
New Revision: 166594

URL: http://llvm.org/viewvc/llvm-project?rev=166594&view=rev
Log:
[ms-inline asm] Add test cases for r166592. The test cases only works if the
source operand is a register.

Modified:
    cfe/trunk/test/CodeGen/ms-inline-asm-64.c
    cfe/trunk/test/CodeGen/ms-inline-asm.c

Modified: cfe/trunk/test/CodeGen/ms-inline-asm-64.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-inline-asm-64.c?rev=166594&r1=166593&r2=166594&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/ms-inline-asm-64.c (original)
+++ cfe/trunk/test/CodeGen/ms-inline-asm-64.c Wed Oct 24 12:23:06 2012
@@ -7,3 +7,10 @@
 // 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
+}

Modified: cfe/trunk/test/CodeGen/ms-inline-asm.c
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/test/CodeGen/ms-inline-asm.c?rev=166594&r1=166593&r2=166594&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/ms-inline-asm.c (original)
+++ cfe/trunk/test/CodeGen/ms-inline-asm.c Wed Oct 24 12:23:06 2012
@@ -146,3 +146,10 @@
 // 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
+}





More information about the cfe-commits mailing list