xref: /aosp_15_r20/external/clang/test/CodeGen/x86-64-inline-asm.c (revision 67e74705e28f6214e480b399dd47ea732279e315)
1*67e74705SXin Li // REQUIRES: x86-registered-target
2*67e74705SXin Li // RUN: %clang_cc1 -triple x86_64 %s -S -o /dev/null -DWARN -verify
3*67e74705SXin Li // RUN: %clang_cc1 -triple x86_64 %s -S -o /dev/null -Werror -verify
f()4*67e74705SXin Li void f() {
5*67e74705SXin Li   asm("movaps %xmm3, (%esi, 2)");
6*67e74705SXin Li // expected-note@1 {{instantiated into assembly here}}
7*67e74705SXin Li #ifdef WARN
8*67e74705SXin Li // expected-warning@-3 {{scale factor without index register is ignored}}
9*67e74705SXin Li #else
10*67e74705SXin Li // expected-error@-5 {{scale factor without index register is ignored}}
11*67e74705SXin Li #endif
12*67e74705SXin Li }
13*67e74705SXin Li 
14*67e74705SXin Li static unsigned var[1] = {};
g(void)15*67e74705SXin Li void g(void) { asm volatile("movd %%xmm0, %0"
16*67e74705SXin Li                             :
17*67e74705SXin Li                             : "m"(var)); }
18