blob: bb46eda633b705675c05f32969d299022d5a3a9b [file] [log] [blame]
Joey Gouly5798b262014-06-05 21:23:42 +00001// REQUIRES: x86-registered-target
Joey Gouly41181d12014-06-08 21:28:54 +00002// 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
Joey Gouly5798b262014-06-05 21:23:42 +00004void f() {
Joey Gouly41181d12014-06-08 21:28:54 +00005 asm("movaps %xmm3, (%esi, 2)");
6// expected-note@1 {{instantiated into assembly here}}
7#ifdef WARN
8// expected-warning@-3 {{scale factor without index register is ignored}}
9#else
10// expected-error@-5 {{scale factor without index register is ignored}}
11#endif
Joey Gouly5798b262014-06-05 21:23:42 +000012}
David Majnemerade4bee2014-07-14 16:27:53 +000013
14static unsigned var[1] = {};
15void g(void) { asm volatile("movd %%xmm0, %0"
16 :
17 : "m"(var)); }