forked from OSchip/llvm-project
[X86][ms-inline asm] Test case for adding support for memory operands that include structs
Test case for commit 256381 Differential Revision: http://reviews.llvm.org/D15749 llvm-svn: 256382
This commit is contained in:
parent
8dfd5cbb73
commit
59d35f1415
|
@ -536,6 +536,38 @@ void t42() {
|
|||
// CHECK: "=*m,~{dirflag},~{fpsr},~{flags}"(i32* %flags)
|
||||
}
|
||||
|
||||
void t43() {
|
||||
// CHECK-LABEL: define void @t43
|
||||
C strct;
|
||||
// Work around PR20368: These should be single line blocks
|
||||
__asm { mov eax, 4[strct.c1] }
|
||||
// CHECK: call void asm sideeffect inteldialect "mov eax, dword ptr $$4$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}})
|
||||
__asm { mov eax, 4[strct.c3 + 4] }
|
||||
// CHECK: call void asm sideeffect inteldialect "mov eax, dword ptr $$8$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}})
|
||||
__asm { mov eax, 8[strct.c2.a + 4 + 32*2 - 4] }
|
||||
// CHECK: call void asm sideeffect inteldialect "mov eax, dword ptr $$72$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}})
|
||||
__asm { mov eax, 12[4 + strct.c2.b] }
|
||||
// CHECK: call void asm sideeffect inteldialect "mov eax, dword ptr $$16$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}})
|
||||
__asm { mov eax, 4[4 + strct.c4.b2.b + 4] }
|
||||
// CHECK: call void asm sideeffect inteldialect "mov eax, dword ptr $$12$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}})
|
||||
__asm { mov eax, 4[64 + strct.c1 + (2*32)] }
|
||||
// CHECK: call void asm sideeffect inteldialect "mov eax, dword ptr $$132$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}})
|
||||
__asm { mov eax, 4[64 + strct.c2.a - 2*32] }
|
||||
// CHECK: call void asm sideeffect inteldialect "mov eax, dword ptr $$4$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}})
|
||||
__asm { mov eax, [strct.c4.b1 + 4] }
|
||||
// CHECK: call void asm sideeffect inteldialect "mov eax, dword ptr $$4$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}})
|
||||
__asm { mov eax, [strct.c4.b2.a + 4 + 32*2 - 4] }
|
||||
// CHECK: call void asm sideeffect inteldialect "mov eax, dword ptr $$64$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}})
|
||||
__asm { mov eax, [4 + strct.c1] }
|
||||
// CHECK: call void asm sideeffect inteldialect "mov eax, dword ptr $$4$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}})
|
||||
__asm { mov eax, [4 + strct.c2.b + 4] }
|
||||
// CHECK: call void asm sideeffect inteldialect "mov eax, dword ptr $$8$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}})
|
||||
__asm { mov eax, [64 + strct.c3 + (2*32)] }
|
||||
// CHECK: call void asm sideeffect inteldialect "mov eax, dword ptr $$128$0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}})
|
||||
__asm { mov eax, [64 + strct.c4.b2.b - 2*32] }
|
||||
// CHECK: call void asm sideeffect inteldialect "mov eax, dword ptr $0", "*m,~{eax},~{dirflag},~{fpsr},~{flags}"(i32* %{{.*}})
|
||||
}
|
||||
|
||||
void call_clobber() {
|
||||
__asm call t41
|
||||
// CHECK-LABEL: define void @call_clobber
|
||||
|
|
Loading…
Reference in New Issue