| 1 |
// REQUIRES: arm-registered-target |
| 2 |
// RUN: %clang_cc1 -triple arm -target-feature -fpregs -verify=arm-nofp %s |
| 3 |
|
| 4 |
// w: A 32, 64, or 128-bit floating-point/SIMD register: s0-s31, d0-d31, or q0-q15. |
| 5 |
float test_w(float x) { |
| 6 |
__asm__("vsqrt.f32 %0, %1" |
| 7 |
: "=w"(x) |
| 8 |
: "w"(x)); // No error expected. |
| 9 |
// arm-nofp-error@7 {{invalid output constraint '=w' in asm}} |
| 10 |
return x; |
| 11 |
} |
| 12 |
|
| 13 |
// x: A 32, 64, or 128-bit floating-point/SIMD register: s0-s15, d0-d7, or q0-q3. |
| 14 |
float test_x(float x) { |
| 15 |
__asm__("vsqrt.f32 %0, %1" |
| 16 |
: "=x"(x) |
| 17 |
: "x"(x)); // No error expected. |
| 18 |
// arm-nofp-error@16 {{invalid output constraint '=x' in asm}} |
| 19 |
return x; |
| 20 |
} |
| 21 |
|
| 22 |
// t: A 32, 64, or 128-bit floating-point/SIMD register: s0-s31, d0-d15, or q0-q7. |
| 23 |
float test_t(float x) { |
| 24 |
__asm__("vsqrt.f32 %0, %1" |
| 25 |
: "=t"(x) |
| 26 |
: "t"(x)); // No error expected. |
| 27 |
// arm-nofp-error@25 {{invalid output constraint '=t' in asm}} |
| 28 |
return x; |
| 29 |
} |