Revert "[llvm] Improve llvm.objectsize computation by computing GEP, alloca and mallo...
[llvm-project.git] / clang / test / CodeGen / X86 / x86-64-inline-asm.c
blob89d1fac873310fc29a1eb4ed36e444b3e3392fd6
1 // REQUIRES: x86-registered-target
2 // RUN: %clang_cc1 -triple x86_64 %s -S -o /dev/null -DWARN -verify
3 // RUN: %clang_cc1 -triple x86_64 %s -S -o /dev/null -Werror -verify
4 // RUN: %clang_cc1 -triple x86_64-linux-gnu %s -S -o - | FileCheck %s
5 void f(void) {
6 asm("movaps %xmm3, (%esi, 2)");
7 // expected-note@1 {{instantiated into assembly here}}
8 #ifdef WARN
9 // expected-warning@-3 {{scale factor without index register is ignored}}
10 #else
11 // expected-error@-5 {{scale factor without index register is ignored}}
12 #endif
15 static unsigned var[1] = {};
16 void g(void) { asm volatile("movd %%xmm0, %0"
18 : "m"(var)); }
20 void pr40890(void) {
21 struct s {
22 int a, b;
23 } s;
24 __asm__ __volatile__("\n#define S_A abcd%0\n" : : "n"(&((struct s*)0)->a));
25 __asm__ __volatile__("\n#define S_B abcd%0\n" : : "n"(&((struct s*)0)->b));
26 __asm__ __volatile__("\n#define BEEF abcd%0\n" : : "n"((int*)0xdeadbeeeeeef));
27 __asm__ __volatile__("movabsq %0, %%rax" : : "n"(4624529908474429119));
29 // CHECK-LABEL: pr40890
30 // CHECK: #define S_A abcd$0
31 // CHECK: #define S_B abcd$4
32 // CHECK: #define BEEF abcd$244837814038255
33 // CHECK: movabsq $4624529908474429119, %rax