1 // REQUIRES: powerpc-registered-target
2 // RUN: %clang_cc1 -triple powerpc64-unknown-linux-gnu -target-cpu pwr9 \
3 // RUN: -fsyntax-only -Wall -Werror -verify %s
4 // RUN: %clang_cc1 -triple powerpc64le-unknown-linux-gnu -target-cpu pwr9 \
5 // RUN: -fsyntax-only -Wall -Werror -verify %s
6 // RUN: %clang_cc1 -triple powerpc64-unknown-aix -target-cpu pwr9 \
7 // RUN: -fsyntax-only -Wall -Werror -verify %s
8 // RUN: %clang_cc1 -triple powerpc-unknown-aix -target-cpu pwr9 \
9 // RUN: -fsyntax-only -Wall -Werror -verify %s
11 extern unsigned int ui
;
12 extern unsigned long long ull
;
17 void test_builtin_ppc_cmprb() {
18 int res
= __builtin_ppc_cmprb(3, ui
, ui
); // expected-error {{argument value 3 is outside the valid range [0, 1]}}
23 void test_builtin_ppc_addex() {
24 long long res
= __builtin_ppc_addex(ll
, ll
, 4); // expected-error {{argument value 4 is outside the valid range [0, 3]}}
25 unsigned long long res2
= __builtin_ppc_addex(ull
, ull
, -1); // expected-error {{argument value -1 is outside the valid range [0, 3]}}
30 int test_builtin_ppc_test_data_class_d() {
31 return __builtin_ppc_test_data_class(d
, -1); // expected-error {{argument value -1 is outside the valid range [0, 127]}}
34 int test_builtin_ppc_test_data_class_f() {
35 return __builtin_ppc_test_data_class(f
, -1); // expected-error {{argument value -1 is outside the valid range [0, 127]}}
38 int test_test_data_class_d() {
39 return __test_data_class(d
, 128); // expected-error {{argument value 128 is outside the valid range [0, 127]}}
42 int test_test_data_class_f() {
43 return __test_data_class(f
, 128); // expected-error {{argument value 128 is outside the valid range [0, 127]}}
46 int test_test_data_class_type() {
47 return __test_data_class(ui
, 0); // expected-error {{expected a 'float', 'double' or '__float128' for the first argument}}