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