[cfe-commits] r171919 - /cfe/trunk/test/CodeGen/ms-inline-asm.c

Chad Rosier mcrosier at apple.com
Tue Jan 8 15:51:49 PST 2013


Author: mcrosier
Date: Tue Jan  8 17:51:48 2013
New Revision: 171919

URL: http://llvm.org/viewvc/llvm-project?rev=171919&view=rev
Log:
[ms-inline asm] Add a test case for the offset operator where the operand is a
global variable.

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

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=171919&r1=171918&r2=171919&view=diff
==============================================================================
--- cfe/trunk/test/CodeGen/ms-inline-asm.c (original)
+++ cfe/trunk/test/CodeGen/ms-inline-asm.c Tue Jan  8 17:51:48 2013
@@ -138,13 +138,16 @@
 // CHECK: call void asm sideeffect inteldialect ".if 1\0A\09mov eax, dword ptr $0\0A\09.else\0A\09mov ebx, j\0A\09.endif", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}}) nounwind
 }
 
+int gvar = 10;
 void t15() {
-  int var = 10;
-  __asm mov eax, var        ; eax = 10
-  __asm mov eax, offset var ; eax = address of myvar
+  int lvar = 10;
+  __asm mov eax, lvar        ; eax = 10
+  __asm mov eax, offset lvar ; eax = address of lvar
+  __asm mov eax, offset gvar ; eax = address of gvar
 // CHECK: 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
+// CHECK: call void asm sideeffect inteldialect "mov eax, $0", "r,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* @{{.*}}) nounwind
 }
 
 void t16() {





More information about the cfe-commits mailing list