summaryrefslogtreecommitdiff
path: root/test/CodeGen/X86/ms-inline-asm.ll
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2012-10-03 22:06:44 +0000
committerChad Rosier <mcrosier@apple.com>2012-10-03 22:06:44 +0000
commit34448ae39398eeb5339a3dc6c669b4ca6791eadc (patch)
tree33e3565df4721abeb19144de019342c080abcc8b /test/CodeGen/X86/ms-inline-asm.ll
parent42faefc11da326f10a4a52d72953318921d9e43d (diff)
downloadllvm-34448ae39398eeb5339a3dc6c669b4ca6791eadc.tar.gz
llvm-34448ae39398eeb5339a3dc6c669b4ca6791eadc.tar.bz2
llvm-34448ae39398eeb5339a3dc6c669b4ca6791eadc.tar.xz
[ms-inline asm] Add support in the X86AsmPrinter for printing memory references
in the Intel syntax. The MC layer supports emitting in the Intel syntax, but this would require the inline assembly MachineInstr to be lowered to an MCInst before emission. This is potential future work, but for now emitting directly from the MachineInstr suffices. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@165173 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/ms-inline-asm.ll')
-rw-r--r--test/CodeGen/X86/ms-inline-asm.ll14
1 files changed, 14 insertions, 0 deletions
diff --git a/test/CodeGen/X86/ms-inline-asm.ll b/test/CodeGen/X86/ms-inline-asm.ll
index cd06fe68a6..59efa8d547 100644
--- a/test/CodeGen/X86/ms-inline-asm.ll
+++ b/test/CodeGen/X86/ms-inline-asm.ll
@@ -24,3 +24,17 @@ entry:
; CHECK: .att_syntax
; CHECK: {{## InlineAsm End|#NO_APP}}
}
+
+define void @t3(i32 %V) nounwind {
+entry:
+ %V.addr = alloca i32, align 4
+ store i32 %V, i32* %V.addr, align 4
+ call void asm sideeffect inteldialect "mov eax, DWORD PTR [$0]", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %V.addr) nounwind
+ ret void
+; CHECK: t3
+; CHECK: {{## InlineAsm Start|#APP}}
+; CHECK: .intel_syntax
+; CHECK: mov eax, DWORD PTR {{[[esp]}}
+; CHECK: .att_syntax
+; CHECK: {{## InlineAsm End|#NO_APP}}
+}