annotate clang/test/Sema/builtins-ppc.c @ 169:1f21f60db75c

Added tag llvm10 for changeset 980e56f2e095
author Shinji KONO <kono@ie.u-ryukyu.ac.jp>
date Mon, 25 May 2020 09:26:57 +0900
parents 1d019706d866
children c4bab56944e8
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
150
anatofuz
parents:
diff changeset
1 // REQUIRES: powerpc-registered-target
anatofuz
parents:
diff changeset
2 // RUN: %clang_cc1 -target-feature +altivec -target-feature +htm \
anatofuz
parents:
diff changeset
3 // RUN: -triple powerpc64-unknown-unknown -DTEST_HTM -fsyntax-only \
anatofuz
parents:
diff changeset
4 // RUN: -verify %s
anatofuz
parents:
diff changeset
5
anatofuz
parents:
diff changeset
6 // RUN: %clang_cc1 -target-feature +altivec -target-feature +crypto \
anatofuz
parents:
diff changeset
7 // RUN: -triple powerpc64le-unknown-unknown -DTEST_CRYPTO -fsyntax-only \
anatofuz
parents:
diff changeset
8 // RUN: -verify %s
anatofuz
parents:
diff changeset
9
anatofuz
parents:
diff changeset
10 #ifdef TEST_HTM
anatofuz
parents:
diff changeset
11 void test_htm() {
anatofuz
parents:
diff changeset
12 __builtin_tbegin(4); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
13 __builtin_tend(-1); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
14 __builtin_tsr(55); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
15 __builtin_tabortwc(-5, 2, 3); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
16 __builtin_tabortdc(55, 2, 3); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
17 __builtin_tabortwci(-5, 2, 5); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
18 __builtin_tabortwci(5, 2, 55); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
19 __builtin_tabortdci(-5, 2, 5); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
20 __builtin_tabortdci(5, 2, 55); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
21 }
anatofuz
parents:
diff changeset
22 #endif
anatofuz
parents:
diff changeset
23
anatofuz
parents:
diff changeset
24
anatofuz
parents:
diff changeset
25 #ifdef TEST_CRYPTO
anatofuz
parents:
diff changeset
26 #include <altivec.h>
anatofuz
parents:
diff changeset
27
anatofuz
parents:
diff changeset
28 #define W_INIT { 0x01020304, 0x05060708, 0x090A0B0C, 0x0D0E0F10 };
anatofuz
parents:
diff changeset
29 #define D_INIT { 0x0102030405060708, 0x090A0B0C0D0E0F10 };
anatofuz
parents:
diff changeset
30 vector unsigned int test_vshasigmaw_or(void)
anatofuz
parents:
diff changeset
31 {
anatofuz
parents:
diff changeset
32 vector unsigned int a = W_INIT
anatofuz
parents:
diff changeset
33 vector unsigned int b = __builtin_crypto_vshasigmaw(a, 2, 15); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
34 vector unsigned int c = __builtin_crypto_vshasigmaw(a, -1, 15); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
35 vector unsigned int d = __builtin_crypto_vshasigmaw(a, 0, 85); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
36 vector unsigned int e = __builtin_crypto_vshasigmaw(a, 1, -15); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
37 return __builtin_crypto_vshasigmaw(a, 1, 15);
anatofuz
parents:
diff changeset
38 }
anatofuz
parents:
diff changeset
39
anatofuz
parents:
diff changeset
40 vector unsigned long long test_vshasigmad_or(void)
anatofuz
parents:
diff changeset
41 {
anatofuz
parents:
diff changeset
42 vector unsigned long long a = D_INIT
anatofuz
parents:
diff changeset
43 vector unsigned long long b = __builtin_crypto_vshasigmad(a, 2, 15); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
44 vector unsigned long long c = __builtin_crypto_vshasigmad(a, -1, 15); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
45 vector unsigned long long d = __builtin_crypto_vshasigmad(a, 0, 85); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
46 vector unsigned long long e = __builtin_crypto_vshasigmad(a, 1, -15); // expected-error-re {{argument value {{.*}} is outside the valid range}}
anatofuz
parents:
diff changeset
47 return __builtin_crypto_vshasigmad(a, 0, 15);
anatofuz
parents:
diff changeset
48 }
anatofuz
parents:
diff changeset
49
anatofuz
parents:
diff changeset
50 #endif
anatofuz
parents:
diff changeset
51