aboutsummaryrefslogtreecommitdiffstats
path: root/test/CodeGen/X86/ms-inline-asm.ll
diff options
context:
space:
mode:
authorChad Rosier <mcrosier@apple.com>2013-02-13 21:33:44 +0000
committerChad Rosier <mcrosier@apple.com>2013-02-13 21:33:44 +0000
commit7b0bc3fe3e8210ec7fffb311443a07d81cbe1308 (patch)
treedb44b8914f8c1d9b848e52c65072ef8f2a6f3649 /test/CodeGen/X86/ms-inline-asm.ll
parent19aa3e37dcf09b126bbd83e11ec9059615c6bd8b (diff)
downloadexternal_llvm-7b0bc3fe3e8210ec7fffb311443a07d81cbe1308.zip
external_llvm-7b0bc3fe3e8210ec7fffb311443a07d81cbe1308.tar.gz
external_llvm-7b0bc3fe3e8210ec7fffb311443a07d81cbe1308.tar.bz2
[ms-inline-asm] Add support for memory references that have non-immediate
displacements. rdar://12974533 git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@175083 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'test/CodeGen/X86/ms-inline-asm.ll')
-rw-r--r--test/CodeGen/X86/ms-inline-asm.ll23
1 files changed, 23 insertions, 0 deletions
diff --git a/test/CodeGen/X86/ms-inline-asm.ll b/test/CodeGen/X86/ms-inline-asm.ll
index 68e332e..c6eb633 100644
--- a/test/CodeGen/X86/ms-inline-asm.ll
+++ b/test/CodeGen/X86/ms-inline-asm.ll
@@ -79,3 +79,26 @@ entry:
; CHECK: .att_syntax
; CHECK: {{## InlineAsm End|#NO_APP}}
}
+
+@results = global [2 x i32] [i32 3, i32 2], align 4
+
+define i32* @t30() nounwind ssp {
+entry:
+ %res = alloca i32*, align 4
+ call void asm sideeffect inteldialect "lea edi, dword ptr $0", "*m,~{edi},~{dirflag},~{fpsr},~{flags}"([2 x i32]* @results) nounwind
+ call void asm sideeffect inteldialect "mov dword ptr $0, edi", "=*m,~{dirflag},~{fpsr},~{flags}"(i32** %res) nounwind
+ %0 = load i32** %res, align 4
+ ret i32* %0
+; CHECK: t30:
+; CHECK: {{## InlineAsm Start|#APP}}
+; CHECK: .intel_syntax
+; CHECK: lea edi, dword ptr [_results]
+; CHECK: .att_syntax
+; CHECK: {{## InlineAsm End|#NO_APP}}
+; CHECK: {{## InlineAsm Start|#APP}}
+; CHECK: .intel_syntax
+; CHECK: mov dword ptr [esp], edi
+; CHECK: .att_syntax
+; CHECK: {{## InlineAsm End|#NO_APP}}
+; CHECK: movl (%esp), %eax
+}