diff options
author | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
---|---|---|
committer | Dimitry Andric <dim@FreeBSD.org> | 2017-12-18 20:11:37 +0000 |
commit | 461a67fa15370a9ec88f8f8a240bf7c123bb2029 (patch) | |
tree | 6942083d7d56bba40ec790a453ca58ad3baf6832 /test/CodeGen/ms-inline-asm.cpp | |
parent | 75c3240472ba6ac2669ee72ca67eb72d4e2851fc (diff) |
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(); +} + |