summaryrefslogtreecommitdiff
path: root/gcc/testsuite/gcc.target/spu/cpat-1.c
blob: 6fe2925621590180981cecf1e0f1abd6786ed364 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
/* { dg-do compile } */
/* { dg-options "-O2 -w" } */
/* { dg-final { scan-assembler-times "lqr\t.3,.LC" 4 } } */
/* { dg-final { scan-assembler-times "cbd\t.3,0\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cbd\t.3,1\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cbd\t.3,2\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cbd\t.3,3\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cbd\t.3,4\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cbd\t.3,5\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cbd\t.3,6\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cbd\t.3,7\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cbd\t.3,8\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cbd\t.3,9\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cbd\t.3,10\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cbd\t.3,11\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cbd\t.3,12\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cbd\t.3,13\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cbd\t.3,14\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cbd\t.3,15\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "chd\t.3,0\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "chd\t.3,2\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "chd\t.3,4\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "chd\t.3,6\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "chd\t.3,8\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "chd\t.3,10\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "chd\t.3,12\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "chd\t.3,14\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cwd\t.3,0\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cwd\t.3,4\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cwd\t.3,8\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cwd\t.3,12\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cdd\t.3,0\\(.sp\\)" 1 } } */
/* { dg-final { scan-assembler-times "cdd\t.3,8\\(.sp\\)" 1 } } */

__vector unsigned char
not_cpat0()
{
  /* Contains no runs */
  return (__vector unsigned char) {
	    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
	    0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F};
}

__vector unsigned char
not_cpat1()
{
  /* Includes 1 run but not in the right place. */
  return (__vector unsigned char) {
	    0x10, 0x02, 0x03, 0x13, 0x14, 0x15, 0x16, 0x17,
	    0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F};
}

__vector unsigned char
not_cpat2()
{
  /* Includes 2 runs. */
  return (__vector unsigned char) {
	    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
	    0x00, 0x01, 0x02, 0x03, 0x00, 0x01, 0x02, 0x03};
}

__vector unsigned char
not_cpat3()
{
  /* Includes 1 incorrect run. */
  return (__vector unsigned char) {
	    0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17,
	    0x00, 0x01, 0x02, 0x03, 0x05, 0x06, 0x07, 0x1F};
}

__vector unsigned char cbd_0() { return (__vector unsigned char) { 0x03, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char cbd_1() { return (__vector unsigned char) { 0x10, 0x03, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char cbd_2() { return (__vector unsigned char) { 0x10, 0x11, 0x03, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char cbd_3() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x03, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char cbd_4() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x03, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char cbd_5() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x03, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char cbd_6() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x03, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char cbd_7() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x03, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char cbd_8() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x03, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char cbd_9() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x03, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char cbd_a() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x03, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char cbd_b() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x03, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char cbd_c() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x03, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char cbd_d() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x03, 0x1E, 0x1F}; }
__vector unsigned char cbd_e() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x03, 0x1F}; }
__vector unsigned char cbd_f() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x03}; }

__vector unsigned char chd_0() { return (__vector unsigned char) { 0x02, 0x03, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char chd_2() { return (__vector unsigned char) { 0x10, 0x11, 0x02, 0x03, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char chd_4() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x02, 0x03, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char chd_6() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x02, 0x03, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char chd_8() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x02, 0x03, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char chd_a() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x02, 0x03, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char chd_c() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x02, 0x03, 0x1E, 0x1F}; }
__vector unsigned char chd_e() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x02, 0x03}; }

__vector unsigned char cwd_0() { return (__vector unsigned char) { 0x00, 0x01, 0x02, 0x03, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char cwd_4() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x00, 0x01, 0x02, 0x03, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char cwd_8() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x00, 0x01, 0x02, 0x03, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char cwd_c() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1A, 0x1B, 0x00, 0x01, 0x02, 0x03}; }

__vector unsigned char cdd_0() { return (__vector unsigned char) { 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x18, 0x19, 0x1A, 0x1B, 0x1C, 0x1D, 0x1E, 0x1F}; }
__vector unsigned char cdd_8() { return (__vector unsigned char) { 0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07}; }