diff options
Diffstat (limited to 'test/CodeGen/ms-inline-asm.cpp')
-rw-r--r-- | test/CodeGen/ms-inline-asm.cpp | 22 |
1 files changed, 19 insertions, 3 deletions
diff --git a/test/CodeGen/ms-inline-asm.cpp b/test/CodeGen/ms-inline-asm.cpp index a435e4b826d8..039cde9e10ed 100644 --- a/test/CodeGen/ms-inline-asm.cpp +++ b/test/CodeGen/ms-inline-asm.cpp @@ -130,7 +130,7 @@ void t7_struct() { __asm mov eax, [eax].A.b // CHECK-LABEL: define void @_Z9t7_structv // CHECK: call void asm sideeffect inteldialect - // CHECK-SAME: mov eax, [eax].4 + // CHECK-SAME: mov eax, [eax + $$4] // CHECK-SAME: "~{eax},~{dirflag},~{fpsr},~{flags}"() } @@ -142,7 +142,7 @@ void t7_typedef() { __asm mov eax, [eax].A.b // CHECK-LABEL: define void @_Z10t7_typedefv // CHECK: call void asm sideeffect inteldialect - // CHECK-SAME: mov eax, [eax].4 + // CHECK-SAME: mov eax, [eax + $$4] // CHECK-SAME: "~{eax},~{dirflag},~{fpsr},~{flags}"() } @@ -154,7 +154,7 @@ void t7_using() { __asm mov eax, [eax].A.b // CHECK-LABEL: define void @_Z8t7_usingv // CHECK: call void asm sideeffect inteldialect - // CHECK-SAME: mov eax, [eax].4 + // CHECK-SAME: mov eax, [eax + $$4] // CHECK-SAME: "~{eax},~{dirflag},~{fpsr},~{flags}"() } @@ -180,3 +180,19 @@ void t8() { A::g(); } +void t9() { + // CHECK-LABEL: define void @_Z2t9v() + struct A { + int a; + int b; + void g() { + __asm mov eax, dword ptr [eax]this.b + // CHECK: call void asm sideeffect inteldialect + // CHECK-SAME: mov eax, dword ptr [eax + $$4] + // CHECK-SAME: "~{eax},~{dirflag},~{fpsr},~{flags}"() + } + }; + A AA; + AA.g(); +} + |