[PATCH] ms-inline-asm: Add a test to ensure that call doesn't clobber eax.

Ehsan Akhgari ehsan.akhgari at gmail.com
Thu Jul 17 19:21:33 PDT 2014


Hi rnk,

http://reviews.llvm.org/D4577

Files:
  test/CodeGen/ms-inline-asm.c

Index: test/CodeGen/ms-inline-asm.c
===================================================================
--- test/CodeGen/ms-inline-asm.c
+++ test/CodeGen/ms-inline-asm.c
@@ -494,3 +494,9 @@
   // CHECK: call void asm sideeffect inteldialect "mov gs, word ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(i16* [[T41_A_ADDR]])
   // CHECK: call void asm sideeffect inteldialect "mov ss, word ptr $0", "*m,~{dirflag},~{fpsr},~{flags}"(i16* [[T41_A_ADDR]])
 }
+
+void call_clobber() {
+  __asm call t41
+  // CHECK-LABEL: define void @call_clobber
+  // CHECK: call void asm sideeffect inteldialect "call $0", "r,~{dirflag},~{fpsr},~{flags}"(void (i16)* @t41)
+}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D4577.11624.patch
Type: text/x-patch
Size: 652 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20140718/e7455da3/attachment.bin>


More information about the cfe-commits mailing list