[docs] Add LICENSE.txt to the root of the mono-repo
[llvm-project.git] / clang / test / Sema / arm_inline_asm_constraints_no_fp_regs.c
blob061e0eeed34e1b158b0341dd7f3a964e4248508d
1 // REQUIRES: arm-registered-target
2 // RUN: %clang_cc1 -triple arm -target-feature -fpregs -verify=arm-nofp %s
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;
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;
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;