annotate gcc/testsuite/gcc.target/powerpc/xxgenpc-runnable.c @ 19:2b5abeee2509 default tip

update gcc11
author anatofuz
date Mon, 25 May 2020 07:50:57 +0900
parents
children
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
19
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
1 /* { dg-do run } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
2 /* { dg-options "-mdejagnu-cpu=future -O2" } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
3 /* { dg-require-effective-target powerpc_future_hw } */
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
4
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
5 #include <altivec.h>
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
6
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
7 #ifdef DEBUG
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
8 #include <stdio.h>
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
9 #endif
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
10
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
11 #define IMM0 0
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
12 #define IMM1 1
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
13 #define IMM2 2
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
14 #define IMM3 3
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
15
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
16 void abort (void);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
17
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
18 int main ()
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
19 {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
20 int i;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
21 vector unsigned char vec_byte_arg;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
22 vector unsigned char vec_byte_result, vec_byte_expected0, vec_byte_expected1;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
23 vector unsigned char vec_byte_expected2, vec_byte_expected3;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
24
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
25 vector unsigned short vec_hword_arg;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
26 vector unsigned short vec_hword_result, vec_hword_expected0;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
27 vector unsigned short vec_hword_expected1, vec_hword_expected2;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
28 vector unsigned short vec_hword_expected3;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
29
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
30 vector unsigned int vec_word_arg;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
31 vector unsigned int vec_word_result, vec_word_expected0, vec_word_expected1;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
32 vector unsigned int vec_word_expected2, vec_word_expected3;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
33
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
34 vec_byte_arg = (vector unsigned char ){ 0xFF, 0xF0, 0x7F, 0xFF,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
35 0xFF, 0xFF, 0xFF, 0xFF,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
36 0x00, 0x00, 0x01, 0x23,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
37 0x45, 0x67, 0x00, 0x00 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
38
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
39 vec_byte_result = (vector unsigned char ){ 0xFF, 0xFF, 0xFF, 0xFF,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
40 0xFF, 0xFF, 0xFF, 0xFF,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
41 0xFF, 0xFF, 0xFF, 0xFF,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
42 0xFF, 0xFF, 0xFF, 0xFF };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
43
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
44 vec_byte_expected0 = (vector unsigned char){ 0x1F, 0x1E, 0x1D, 0x1C,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
45 0x1B, 0x1A, 0x19, 0x18,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
46 0x06, 0x05, 0x15, 0x04,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
47 0x03, 0x02, 0x01, 0x00 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
48
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
49 vec_byte_expected1 = (vector unsigned char){ 0x00, 0x00, 0x00, 0x00,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
50 0x00, 0x00, 0x00, 0x00,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
51 0x00, 0x07, 0x06, 0x04,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
52 0x03, 0x02, 0x01, 0x00 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
53
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
54 vec_byte_expected2 = (vector unsigned char){ 0x10, 0x11, 0x12, 0x13,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
55 0x14, 0x15, 0x16, 0x17,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
56 0x00, 0x01, 0x1a, 0x02,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
57 0x03, 0x04, 0x05, 0x06 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
58
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
59 vec_byte_expected3 = (vector unsigned char){ 0x08, 0x09, 0x0B, 0x0C,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
60 0x0D, 0x0E, 0x0F, 0x00,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
61 0x00, 0x00, 0x00, 0x00,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
62 0x00, 0x00, 0x00, 0x00 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
63
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
64 vec_hword_arg = (vector unsigned short) { 0x0004, 0xF003, 0x0002, 0x0001,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
65 0xF004, 0x1003, 0xF002, 0x0001 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
66 vec_hword_expected0 = (vector unsigned short int){ 0x405, 0x1c1d, 0x203,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
67 0x1819, 0x1617, 0x1,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
68 0x1213, 0x1011 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
69 vec_hword_expected1 = (vector unsigned short int){ 0x0, 0x0, 0x0, 0x0,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
70 0x0, 0xe0f, 0xa0b, 0x405 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
71 vec_hword_expected2 = (vector unsigned short int){ 0x100, 0x1312, 0x302,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
72 0x1716, 0x1918, 0x504,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
73 0x1d1c, 0x1f1e };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
74 vec_hword_expected3 = (vector unsigned short int){ 0x100, 0x504, 0xb0a, 0x0,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
75 0x0, 0x0, 0x0, 0x0 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
76
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
77 vec_word_arg = (vector unsigned int){ 0xFEDCBA90, 0xF101, 0xF0000202, 0xF303 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
78 vec_word_expected0 = (vector unsigned int){ 0x4050607, 0x18191a1b,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
79 0x10203, 0x10111213 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
80 vec_word_expected1 = (vector unsigned int){ 0x0, 0x0, 0xc0d0e0f, 0x4050607 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
81 vec_word_expected2 = (vector unsigned int){ 0x3020100, 0x17161514,
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
82 0x7060504, 0x1f1e1d1c };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
83 vec_word_expected3 = (vector unsigned int){ 0x3020100, 0xb0a0908, 0x0, 0x0 };
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
84
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
85 vec_byte_result = vec_genpcvm (vec_byte_arg, IMM0);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
86
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
87 for (i = 0; i < 16; i++) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
88 if (vec_byte_expected0[i] != vec_byte_result[i])
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
89 #if DEBUG
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
90 printf("ERROR: vec_genpcvm(IMM = 0), vec_byte_expected[%d] = 0x%x does not match vec_byte_result[%d] = 0x%x\n",
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
91 i, vec_byte_expected0[i], i, vec_byte_result[i]);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
92 #else
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
93 abort();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
94 #endif
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
95 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
96
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
97 vec_byte_result = vec_genpcvm (vec_byte_arg, IMM1);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
98
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
99 for (i = 0; i < 16; i++) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
100 if (vec_byte_expected1[i] != vec_byte_result[i])
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
101 #if DEBUG
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
102 printf("ERROR: vec_genpcvm(IMM = 1), vec_byte_expected[%d] = 0x%x does not match vec_byte_result[%d] = 0x%x\n",
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
103 i, vec_byte_expected1[i], i, vec_byte_result[i]);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
104 #else
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
105 abort();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
106 #endif
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
107 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
108
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
109 vec_byte_result = vec_genpcvm (vec_byte_arg, IMM2);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
110
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
111 for (i = 0; i < 16; i++) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
112 if (vec_byte_expected2[i] != vec_byte_result[i])
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
113 #if DEBUG
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
114 printf("ERROR: vec_genpcvmbm(IMM = 2), vec_byte_expected[%d] = 0x%x does not match vec_byte_result[%d] = 0x%x\n",
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
115 i, vec_byte_expected2[i], i, vec_byte_result[i]);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
116 #else
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
117 abort();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
118 #endif
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
119 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
120
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
121 vec_byte_result = vec_genpcvm (vec_byte_arg, IMM3);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
122
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
123 for (i = 0; i < 16; i++) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
124 if (vec_byte_expected3[i] != vec_byte_result[i])
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
125 #if DEBUG
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
126 printf("ERROR: vec_genpcvm(IMM = 3), vec_byte_expected[%d] = 0x%x does not match vec_byte_result[%d] = 0x%x\n",
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
127 i, vec_byte_expected3[i], i, vec_byte_result[i]);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
128 #else
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
129 abort();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
130 #endif
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
131 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
132
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
133 vec_hword_result = vec_genpcvm (vec_hword_arg, IMM0);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
134
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
135 for (i = 0; i < 8; i++) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
136 if (vec_hword_expected0[i] != vec_hword_result[i])
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
137 #if DEBUG
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
138 printf("ERROR: vec_genpcvmhm(IMM = 0), vec_hword_expected[%d] = 0x%x does not match vec_hword_result[%d] = 0x%x\n",
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
139 i, vec_hword_expected0[i], i, vec_hword_result[i]);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
140 #else
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
141 abort();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
142 #endif
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
143 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
144
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
145 vec_hword_result = vec_genpcvm (vec_hword_arg, IMM1);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
146
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
147 for (i = 0; i < 8; i++) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
148 if (vec_hword_expected1[i] != vec_hword_result[i])
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
149 #if DEBUG
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
150 printf("ERROR: vec_genpcvm(IMM = 1), vec_hword_expected[%d] = 0x%x does not match vec_hword_result[%d] = 0x%x\n",
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
151 i, vec_hword_expected1[i], i, vec_hword_result[i]);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
152 #else
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
153 abort();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
154 #endif
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
155 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
156
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
157 vec_hword_result = vec_genpcvm (vec_hword_arg, IMM2);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
158
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
159 for (i = 0; i < 8; i++) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
160 if (vec_hword_expected2[i] != vec_hword_result[i])
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
161 #if DEBUG
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
162 printf("ERROR: vec_genpcvm(IMM = 2), vec_hword_expected[%d] = 0x%x does not match vec_hword_result[%d] = 0x%x\n",
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
163 i, vec_hword_expected2[i], i, vec_hword_result[i]);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
164 #else
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
165 abort();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
166 #endif
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
167 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
168
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
169 vec_hword_result = vec_genpcvm (vec_hword_arg, IMM3);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
170
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
171 for (i = 0; i < 8; i++) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
172 if (vec_hword_expected3[i] != vec_hword_result[i])
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
173 #if DEBUG
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
174 printf("ERROR: vec_genpcvm(IMM = 3), vec_hword_expected[%d] = 0x%x does not match vec_hword_result[%d] = 0x%x\n",
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
175 i, vec_hword_expected3[i], i, vec_hword_result[i]);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
176 #else
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
177 abort();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
178 #endif
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
179 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
180
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
181
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
182 vec_word_result = vec_genpcvm (vec_word_arg, IMM0);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
183
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
184 for (i = 0; i < 4; i++) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
185 if (vec_word_expected0[i] != vec_word_result[i])
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
186 #if DEBUG
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
187 printf("ERROR: vec_genpcvm(IMM = 0), vec_word_expected[%d] = 0x%x does not match vec_word_result[%d] = 0x%x\n",
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
188 i, vec_word_expected0[i], i, vec_word_result[i]);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
189 #else
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
190 abort();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
191 #endif
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
192 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
193
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
194 vec_word_result = vec_genpcvm (vec_word_arg, IMM1);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
195
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
196 for (i = 0; i < 4; i++) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
197 if (vec_word_expected1[i] != vec_word_result[i])
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
198 #if DEBUG
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
199 printf("ERROR: vec_genpcvm(IMM = 1), vec_word_expected[%d] = 0%x does not match vec_word_result[%d] = 0x%x\n",
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
200 i, vec_word_expected1[i], i, vec_word_result[i]);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
201 #else
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
202 abort();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
203 #endif
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
204 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
205
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
206 vec_word_result = vec_genpcvm (vec_word_arg, IMM2);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
207
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
208 for (i = 0; i < 4; i++) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
209 if (vec_word_expected2[i] != vec_word_result[i])
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
210 #if DEBUG
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
211 printf("ERROR: vec_genpcvm(IMM = 2), vec_word_expected[%d] = 0x%x does not match vec_word_result[%d] = 0x%x\n",
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
212 i, vec_word_expected2[i], i, vec_word_result[i]);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
213 #else
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
214 abort();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
215 #endif
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
216 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
217
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
218 vec_word_result = vec_genpcvm (vec_word_arg, IMM3);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
219
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
220 for (i = 0; i < 4; i++) {
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
221 if (vec_word_expected3[i] != vec_word_result[i])
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
222 #if DEBUG
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
223 printf("ERROR: vec_genpcvm(IMM = 3), vec_word_expected[%d] = 0x%x does not match vec_word_result[%d] = 0x%x\n",
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
224 i, vec_word_expected3[i], i, vec_word_result[i]);
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
225 #else
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
226 abort();
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
227 #endif
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
228 }
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
229
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
230 return 0;
2b5abeee2509 update gcc11
anatofuz
parents:
diff changeset
231 }