[ms-inline asm] Add support for calling functions from inline assembly.
[oota-llvm.git] / test / CodeGen / X86 / ms-inline-asm.ll
index 24d28adda894969f437c4629d9937f1970c722d1..9bca1acf656d403076534a4c6c865695fde2262c 100644 (file)
@@ -61,3 +61,21 @@ entry:
 ; CHECK: .att_syntax
 ; CHECK: {{## InlineAsm End|#NO_APP}}
 }
+
+define void @t19_helper() nounwind {
+entry:
+  ret void
+}
+
+define void @t19() nounwind {
+entry:
+  call void asm sideeffect inteldialect "call $0", "r,~{dirflag},~{fpsr},~{flags}"(void ()* @t19_helper) nounwind
+  ret void
+; CHECK: t19
+; CHECK: movl $_t19_helper, %eax
+; CHECK: {{## InlineAsm Start|#APP}}
+; CHECK: .intel_syntax
+; CHECK: call eax
+; CHECK: .att_syntax
+; CHECK: {{## InlineAsm End|#NO_APP}}
+}