blob: 38d5345cbdc868aac73af501d0974f4d578c0a6e [file] [log] [blame]
Bill Wendling50d46ca2012-10-25 23:28:48 +00001// REQUIRES: arm-registered-target
2// RUN: %clang_cc1 -triple armv7 %s -emit-llvm -o /dev/null
Bill Wendling50d46ca2012-10-25 23:28:48 +00003
Bill Wendlinge2dbaa92012-11-30 23:18:12 +00004char bar();
5
6void t1(int x, char y) {
7 __asm__ volatile("mcr p15, 0, %1, c9, c12, 5;"
8 "mrc p15, 0, %0, c9, c13, 2;"
9 : "=r" (x)
10 : "r" (bar())); // no warning
11}
12
13// <rdar://problem/12284092>
Bill Wendling50d46ca2012-10-25 23:28:48 +000014typedef __attribute__((neon_vector_type(2))) long long int64x2_t;
15typedef struct int64x2x4_t {
16 int64x2_t val[4];
17} int64x2x4_t;
18int64x2x4_t t2(const long long a[]) {
19 int64x2x4_t r;
20 __asm__("vldm %[a], { %q[r0], %q[r1], %q[r2], %q[r3] }"
Bill Wendlinge2dbaa92012-11-30 23:18:12 +000021 : [r0] "=r"(r.val[0]), // expected-warning {{the value is truncated when put into register, use a modifier to specify the size}}
22 [r1] "=r"(r.val[1]), // expected-warning {{the value is truncated when put into register, use a modifier to specify the size}}
23 [r2] "=r"(r.val[2]), // expected-warning {{the value is truncated when put into register, use a modifier to specify the size}}
24 [r3] "=r"(r.val[3]) // expected-warning {{the value is truncated when put into register, use a modifier to specify the size}}
Bill Wendling50d46ca2012-10-25 23:28:48 +000025 : [a] "r"(a));
26 return r;
27}