summaryrefslogtreecommitdiffstats
path: root/clang/test/CodeGen/ms-inline-asm.cpp
diff options
context:
space:
mode:
authorCoby Tayree <coby.tayree@intel.com>2017-08-09 13:31:41 +0000
committerCoby Tayree <coby.tayree@intel.com>2017-08-09 13:31:41 +0000
commit69eb696112e938f43d9e33dab9d710b38ad240e8 (patch)
treecd2bd27e631ed2622adc2b9f5f548c21c311106e /clang/test/CodeGen/ms-inline-asm.cpp
parentc4a4af47f35cec5a0820ff80544192eb392ae605 (diff)
downloadbcm5719-llvm-69eb696112e938f43d9e33dab9d710b38ad240e8.tar.gz
bcm5719-llvm-69eb696112e938f43d9e33dab9d710b38ad240e8.zip
[X86][Ms-InlineAsm] Extend MS Dot operator to accept "this" + struct/class pointers aliases
MS InlineAsm Dot operator accepts "Bases" such as "this" (cpp) and class/struct pointer typedef. This patch enhance its implementation with this behavior. Differential Revision: https://reviews.llvm.org/D36450 llvm-svn: 310472
Diffstat (limited to 'clang/test/CodeGen/ms-inline-asm.cpp')
-rw-r--r--clang/test/CodeGen/ms-inline-asm.cpp16
1 files changed, 16 insertions, 0 deletions
diff --git a/clang/test/CodeGen/ms-inline-asm.cpp b/clang/test/CodeGen/ms-inline-asm.cpp
index a435e4b826d..094e34aed2f 100644
--- a/clang/test/CodeGen/ms-inline-asm.cpp
+++ b/clang/test/CodeGen/ms-inline-asm.cpp
@@ -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();
+}
+
OpenPOWER on IntegriCloud