1 // REQUIRES: x86-registered-target
2 // RUN: %clang_cc1 %s -triple x86_64-apple-darwin10 -Wno-strict-prototypes -fasm-blocks -emit-llvm -o - | FileCheck %s
6 __asm mov rax
, offset var
; rax
= address of myvar
8 // CHECK: call void asm sideeffect inteldialect
9 // CHECK-SAME: mov rax, $0
10 // CHECK-SAME: "r,~{rax},~{dirflag},~{fpsr},~{flags}"(ptr %{{.*}})
15 __asm mov qword ptr
[eax
], offset var
17 // CHECK: call void asm sideeffect inteldialect
18 // CHECK-SAME: mov qword ptr [eax], $0
19 // CHECK-SAME: "r,~{dirflag},~{fpsr},~{flags}"(ptr %{{.*}})
22 struct t3_type
{ int a
, b
; };
35 // CHECK: call void asm sideeffect inteldialect
36 // CHECK-SAME: lea ebx, $0
37 // CHECK-SAME: mov eax, [ebx]
38 // CHECK-SAME: mov [ebx + $$4], ecx
39 // CHECK-SAME: "*m,~{eax},~{ebx},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(%struct.t3_type) %{{.*}})
55 // CHECK: call void asm sideeffect inteldialect
56 // CHECK-SAME: lea ebx, $0
57 // CHECK-SAME: mov eax, [ebx]
58 // CHECK-SAME: mov [ebx + $$4], ecx
59 // CHECK-SAME: "*m,~{eax},~{ebx},~{dirflag},~{fpsr},~{flags}"(ptr elementtype(%struct.t3_type) %{{.*}})
70 // CHECK: call void asm sideeffect inteldialect
71 // CHECK-SAME: call qword ptr ${0:P}
72 // CHECK-SAME: jmp qword ptr ${1:P}
73 // CHECK-SAME: "*m,*m,~{dirflag},~{fpsr},~{flags}"(ptr elementtype(void (...)) @bar, ptr elementtype(void (...)) @bar)