[flang] Update CommandTest for AIX (NFC) (#118403)
[llvm-project.git] / clang / lib / Headers / hexagon_types.h
blob8e73fad4bcd4240ff858c07d82a00cfeb6fd9fbd
1 //===----------------------------------------------------------------------===//
2 //
3 // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
4 // See https://llvm.org/LICENSE.txt for license information.
5 // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
6 //
7 //===----------------------------------------------------------------------===//
9 #ifndef HEXAGON_TYPES_H
10 #define HEXAGON_TYPES_H
12 #include <hexagon_protos.h>
14 /* Hexagon names */
15 #define HEXAGON_Vect HEXAGON_Vect64
16 #define HEXAGON_V_GET_D HEXAGON_V64_GET_D
17 #define HEXAGON_V_GET_UD HEXAGON_V64_GET_UD
18 #define HEXAGON_V_GET_W0 HEXAGON_V64_GET_W0
19 #define HEXAGON_V_GET_W1 HEXAGON_V64_GET_W1
20 #define HEXAGON_V_GET_UW0 HEXAGON_V64_GET_UW0
21 #define HEXAGON_V_GET_UW1 HEXAGON_V64_GET_UW1
22 #define HEXAGON_V_GET_H0 HEXAGON_V64_GET_H0
23 #define HEXAGON_V_GET_H1 HEXAGON_V64_GET_H1
24 #define HEXAGON_V_GET_H2 HEXAGON_V64_GET_H2
25 #define HEXAGON_V_GET_H3 HEXAGON_V64_GET_H3
26 #define HEXAGON_V_GET_UH0 HEXAGON_V64_GET_UH0
27 #define HEXAGON_V_GET_UH1 HEXAGON_V64_GET_UH1
28 #define HEXAGON_V_GET_UH2 HEXAGON_V64_GET_UH2
29 #define HEXAGON_V_GET_UH3 HEXAGON_V64_GET_UH3
30 #define HEXAGON_V_GET_B0 HEXAGON_V64_GET_B0
31 #define HEXAGON_V_GET_B1 HEXAGON_V64_GET_B1
32 #define HEXAGON_V_GET_B2 HEXAGON_V64_GET_B2
33 #define HEXAGON_V_GET_B3 HEXAGON_V64_GET_B3
34 #define HEXAGON_V_GET_B4 HEXAGON_V64_GET_B4
35 #define HEXAGON_V_GET_B5 HEXAGON_V64_GET_B5
36 #define HEXAGON_V_GET_B6 HEXAGON_V64_GET_B6
37 #define HEXAGON_V_GET_B7 HEXAGON_V64_GET_B7
38 #define HEXAGON_V_GET_UB0 HEXAGON_V64_GET_UB0
39 #define HEXAGON_V_GET_UB1 HEXAGON_V64_GET_UB1
40 #define HEXAGON_V_GET_UB2 HEXAGON_V64_GET_UB2
41 #define HEXAGON_V_GET_UB3 HEXAGON_V64_GET_UB3
42 #define HEXAGON_V_GET_UB4 HEXAGON_V64_GET_UB4
43 #define HEXAGON_V_GET_UB5 HEXAGON_V64_GET_UB5
44 #define HEXAGON_V_GET_UB6 HEXAGON_V64_GET_UB6
45 #define HEXAGON_V_GET_UB7 HEXAGON_V64_GET_UB7
46 #define HEXAGON_V_PUT_D HEXAGON_V64_PUT_D
47 #define HEXAGON_V_PUT_W0 HEXAGON_V64_PUT_W0
48 #define HEXAGON_V_PUT_W1 HEXAGON_V64_PUT_W1
49 #define HEXAGON_V_PUT_H0 HEXAGON_V64_PUT_H0
50 #define HEXAGON_V_PUT_H1 HEXAGON_V64_PUT_H1
51 #define HEXAGON_V_PUT_H2 HEXAGON_V64_PUT_H2
52 #define HEXAGON_V_PUT_H3 HEXAGON_V64_PUT_H3
53 #define HEXAGON_V_PUT_B0 HEXAGON_V64_PUT_B0
54 #define HEXAGON_V_PUT_B1 HEXAGON_V64_PUT_B1
55 #define HEXAGON_V_PUT_B2 HEXAGON_V64_PUT_B2
56 #define HEXAGON_V_PUT_B3 HEXAGON_V64_PUT_B3
57 #define HEXAGON_V_PUT_B4 HEXAGON_V64_PUT_B4
58 #define HEXAGON_V_PUT_B5 HEXAGON_V64_PUT_B5
59 #define HEXAGON_V_PUT_B6 HEXAGON_V64_PUT_B6
60 #define HEXAGON_V_PUT_B7 HEXAGON_V64_PUT_B7
61 #define HEXAGON_V_CREATE_D HEXAGON_V64_CREATE_D
62 #define HEXAGON_V_CREATE_W HEXAGON_V64_CREATE_W
63 #define HEXAGON_V_CREATE_H HEXAGON_V64_CREATE_H
64 #define HEXAGON_V_CREATE_B HEXAGON_V64_CREATE_B
66 #ifdef __cplusplus
67 #define HEXAGON_VectC HEXAGON_Vect64C
68 #endif /* __cplusplus */
70 /* 64 Bit Vectors */
72 typedef long long __attribute__((__may_alias__)) HEXAGON_Vect64;
74 /* Extract doubleword macros */
76 #define HEXAGON_V64_GET_D(v) (v)
77 #define HEXAGON_V64_GET_UD(v) ((unsigned long long)(v))
79 /* Extract word macros */
81 #define HEXAGON_V64_GET_W0(v) \
82 __extension__({ \
83 union { \
84 long long d; \
85 int w[2]; \
86 } _HEXAGON_V64_internal_union; \
87 _HEXAGON_V64_internal_union.d = (v); \
88 _HEXAGON_V64_internal_union.w[0]; \
90 #define HEXAGON_V64_GET_W1(v) \
91 __extension__({ \
92 union { \
93 long long d; \
94 int w[2]; \
95 } _HEXAGON_V64_internal_union; \
96 _HEXAGON_V64_internal_union.d = (v); \
97 _HEXAGON_V64_internal_union.w[1]; \
99 #define HEXAGON_V64_GET_UW0(v) \
100 __extension__({ \
101 union { \
102 long long d; \
103 unsigned int uw[2]; \
104 } _HEXAGON_V64_internal_union; \
105 _HEXAGON_V64_internal_union.d = (v); \
106 _HEXAGON_V64_internal_union.uw[0]; \
108 #define HEXAGON_V64_GET_UW1(v) \
109 __extension__({ \
110 union { \
111 long long d; \
112 unsigned int uw[2]; \
113 } _HEXAGON_V64_internal_union; \
114 _HEXAGON_V64_internal_union.d = (v); \
115 _HEXAGON_V64_internal_union.uw[1]; \
118 /* Extract half word macros */
120 #define HEXAGON_V64_GET_H0(v) \
121 __extension__({ \
122 union { \
123 long long d; \
124 short h[4]; \
125 } _HEXAGON_V64_internal_union; \
126 _HEXAGON_V64_internal_union.d = (v); \
127 _HEXAGON_V64_internal_union.h[0]; \
129 #define HEXAGON_V64_GET_H1(v) \
130 __extension__({ \
131 union { \
132 long long d; \
133 short h[4]; \
134 } _HEXAGON_V64_internal_union; \
135 _HEXAGON_V64_internal_union.d = (v); \
136 _HEXAGON_V64_internal_union.h[1]; \
138 #define HEXAGON_V64_GET_H2(v) \
139 __extension__({ \
140 union { \
141 long long d; \
142 short h[4]; \
143 } _HEXAGON_V64_internal_union; \
144 _HEXAGON_V64_internal_union.d = (v); \
145 _HEXAGON_V64_internal_union.h[2]; \
147 #define HEXAGON_V64_GET_H3(v) \
148 __extension__({ \
149 union { \
150 long long d; \
151 short h[4]; \
152 } _HEXAGON_V64_internal_union; \
153 _HEXAGON_V64_internal_union.d = (v); \
154 _HEXAGON_V64_internal_union.h[3]; \
156 #define HEXAGON_V64_GET_UH0(v) \
157 __extension__({ \
158 union { \
159 long long d; \
160 unsigned short uh[4]; \
161 } _HEXAGON_V64_internal_union; \
162 _HEXAGON_V64_internal_union.d = (v); \
163 _HEXAGON_V64_internal_union.uh[0]; \
165 #define HEXAGON_V64_GET_UH1(v) \
166 __extension__({ \
167 union { \
168 long long d; \
169 unsigned short uh[4]; \
170 } _HEXAGON_V64_internal_union; \
171 _HEXAGON_V64_internal_union.d = (v); \
172 _HEXAGON_V64_internal_union.uh[1]; \
174 #define HEXAGON_V64_GET_UH2(v) \
175 __extension__({ \
176 union { \
177 long long d; \
178 unsigned short uh[4]; \
179 } _HEXAGON_V64_internal_union; \
180 _HEXAGON_V64_internal_union.d = (v); \
181 _HEXAGON_V64_internal_union.uh[2]; \
183 #define HEXAGON_V64_GET_UH3(v) \
184 __extension__({ \
185 union { \
186 long long d; \
187 unsigned short uh[4]; \
188 } _HEXAGON_V64_internal_union; \
189 _HEXAGON_V64_internal_union.d = (v); \
190 _HEXAGON_V64_internal_union.uh[3]; \
193 /* Extract byte macros */
195 #define HEXAGON_V64_GET_B0(v) \
196 __extension__({ \
197 union { \
198 long long d; \
199 signed char b[8]; \
200 } _HEXAGON_V64_internal_union; \
201 _HEXAGON_V64_internal_union.d = (v); \
202 _HEXAGON_V64_internal_union.b[0]; \
204 #define HEXAGON_V64_GET_B1(v) \
205 __extension__({ \
206 union { \
207 long long d; \
208 signed char b[8]; \
209 } _HEXAGON_V64_internal_union; \
210 _HEXAGON_V64_internal_union.d = (v); \
211 _HEXAGON_V64_internal_union.b[1]; \
213 #define HEXAGON_V64_GET_B2(v) \
214 __extension__({ \
215 union { \
216 long long d; \
217 signed char b[8]; \
218 } _HEXAGON_V64_internal_union; \
219 _HEXAGON_V64_internal_union.d = (v); \
220 _HEXAGON_V64_internal_union.b[2]; \
222 #define HEXAGON_V64_GET_B3(v) \
223 __extension__({ \
224 union { \
225 long long d; \
226 signed char b[8]; \
227 } _HEXAGON_V64_internal_union; \
228 _HEXAGON_V64_internal_union.d = (v); \
229 _HEXAGON_V64_internal_union.b[3]; \
231 #define HEXAGON_V64_GET_B4(v) \
232 __extension__({ \
233 union { \
234 long long d; \
235 signed char b[8]; \
236 } _HEXAGON_V64_internal_union; \
237 _HEXAGON_V64_internal_union.d = (v); \
238 _HEXAGON_V64_internal_union.b[4]; \
240 #define HEXAGON_V64_GET_B5(v) \
241 __extension__({ \
242 union { \
243 long long d; \
244 signed char b[8]; \
245 } _HEXAGON_V64_internal_union; \
246 _HEXAGON_V64_internal_union.d = (v); \
247 _HEXAGON_V64_internal_union.b[5]; \
249 #define HEXAGON_V64_GET_B6(v) \
250 __extension__({ \
251 union { \
252 long long d; \
253 signed char b[8]; \
254 } _HEXAGON_V64_internal_union; \
255 _HEXAGON_V64_internal_union.d = (v); \
256 _HEXAGON_V64_internal_union.b[6]; \
258 #define HEXAGON_V64_GET_B7(v) \
259 __extension__({ \
260 union { \
261 long long d; \
262 signed char b[8]; \
263 } _HEXAGON_V64_internal_union; \
264 _HEXAGON_V64_internal_union.d = (v); \
265 _HEXAGON_V64_internal_union.b[7]; \
267 #define HEXAGON_V64_GET_UB0(v) \
268 __extension__({ \
269 union { \
270 long long d; \
271 unsigned char ub[8]; \
272 } _HEXAGON_V64_internal_union; \
273 _HEXAGON_V64_internal_union.d = (v); \
274 _HEXAGON_V64_internal_union.ub[0]; \
276 #define HEXAGON_V64_GET_UB1(v) \
277 __extension__({ \
278 union { \
279 long long d; \
280 unsigned char ub[8]; \
281 } _HEXAGON_V64_internal_union; \
282 _HEXAGON_V64_internal_union.d = (v); \
283 _HEXAGON_V64_internal_union.ub[1]; \
285 #define HEXAGON_V64_GET_UB2(v) \
286 __extension__({ \
287 union { \
288 long long d; \
289 unsigned char ub[8]; \
290 } _HEXAGON_V64_internal_union; \
291 _HEXAGON_V64_internal_union.d = (v); \
292 _HEXAGON_V64_internal_union.ub[2]; \
294 #define HEXAGON_V64_GET_UB3(v) \
295 __extension__({ \
296 union { \
297 long long d; \
298 unsigned char ub[8]; \
299 } _HEXAGON_V64_internal_union; \
300 _HEXAGON_V64_internal_union.d = (v); \
301 _HEXAGON_V64_internal_union.ub[3]; \
303 #define HEXAGON_V64_GET_UB4(v) \
304 __extension__({ \
305 union { \
306 long long d; \
307 unsigned char ub[8]; \
308 } _HEXAGON_V64_internal_union; \
309 _HEXAGON_V64_internal_union.d = (v); \
310 _HEXAGON_V64_internal_union.ub[4]; \
312 #define HEXAGON_V64_GET_UB5(v) \
313 __extension__({ \
314 union { \
315 long long d; \
316 unsigned char ub[8]; \
317 } _HEXAGON_V64_internal_union; \
318 _HEXAGON_V64_internal_union.d = (v); \
319 _HEXAGON_V64_internal_union.ub[5]; \
321 #define HEXAGON_V64_GET_UB6(v) \
322 __extension__({ \
323 union { \
324 long long d; \
325 unsigned char ub[8]; \
326 } _HEXAGON_V64_internal_union; \
327 _HEXAGON_V64_internal_union.d = (v); \
328 _HEXAGON_V64_internal_union.ub[6]; \
330 #define HEXAGON_V64_GET_UB7(v) \
331 __extension__({ \
332 union { \
333 long long d; \
334 unsigned char ub[8]; \
335 } _HEXAGON_V64_internal_union; \
336 _HEXAGON_V64_internal_union.d = (v); \
337 _HEXAGON_V64_internal_union.ub[7]; \
340 /* NOTE: All set macros return a HEXAGON_Vect64 type */
342 /* Set doubleword macro */
344 #define HEXAGON_V64_PUT_D(v, new) (new)
346 /* Set word macros */
348 #ifdef __hexagon__
350 #define HEXAGON_V64_PUT_W0(v, new) \
351 __extension__({ \
352 union { \
353 long long d; \
354 int w[2]; \
355 } _HEXAGON_V64_internal_union; \
356 _HEXAGON_V64_internal_union.d = (v); \
357 _HEXAGON_V64_internal_union.w[0] = (new); \
358 _HEXAGON_V64_internal_union.d; \
360 #define HEXAGON_V64_PUT_W1(v, new) \
361 __extension__({ \
362 union { \
363 long long d; \
364 int w[2]; \
365 } _HEXAGON_V64_internal_union; \
366 _HEXAGON_V64_internal_union.d = (v); \
367 _HEXAGON_V64_internal_union.w[1] = (new); \
368 _HEXAGON_V64_internal_union.d; \
371 #else /* !__hexagon__ */
373 #define HEXAGON_V64_PUT_W0(v, new) \
374 (((v) & 0xffffffff00000000LL) | ((HEXAGON_Vect64)((unsigned int)(new))))
375 #define HEXAGON_V64_PUT_W1(v, new) \
376 (((v) & 0x00000000ffffffffLL) | (((HEXAGON_Vect64)(new)) << 32LL))
378 #endif /* !__hexagon__ */
380 /* Set half word macros */
382 #ifdef __hexagon__
384 #define HEXAGON_V64_PUT_H0(v, new) \
385 __extension__({ \
386 union { \
387 long long d; \
388 short h[4]; \
389 } _HEXAGON_V64_internal_union; \
390 _HEXAGON_V64_internal_union.d = (v); \
391 _HEXAGON_V64_internal_union.h[0] = (new); \
392 _HEXAGON_V64_internal_union.d; \
394 #define HEXAGON_V64_PUT_H1(v, new) \
395 __extension__({ \
396 union { \
397 long long d; \
398 short h[4]; \
399 } _HEXAGON_V64_internal_union; \
400 _HEXAGON_V64_internal_union.d = (v); \
401 _HEXAGON_V64_internal_union.h[1] = (new); \
402 _HEXAGON_V64_internal_union.d; \
404 #define HEXAGON_V64_PUT_H2(v, new) \
405 __extension__({ \
406 union { \
407 long long d; \
408 short h[4]; \
409 } _HEXAGON_V64_internal_union; \
410 _HEXAGON_V64_internal_union.d = (v); \
411 _HEXAGON_V64_internal_union.h[2] = (new); \
412 _HEXAGON_V64_internal_union.d; \
414 #define HEXAGON_V64_PUT_H3(v, new) \
415 __extension__({ \
416 union { \
417 long long d; \
418 short h[4]; \
419 } _HEXAGON_V64_internal_union; \
420 _HEXAGON_V64_internal_union.d = (v); \
421 _HEXAGON_V64_internal_union.h[3] = (new); \
422 _HEXAGON_V64_internal_union.d; \
425 #else /* !__hexagon__ */
427 #define HEXAGON_V64_PUT_H0(v, new) \
428 (((v) & 0xffffffffffff0000LL) | ((HEXAGON_Vect64)((unsigned short)(new))))
429 #define HEXAGON_V64_PUT_H1(v, new) \
430 (((v) & 0xffffffff0000ffffLL) | (((HEXAGON_Vect64)((unsigned short)(new))) << 16LL))
431 #define HEXAGON_V64_PUT_H2(v, new) \
432 (((v) & 0xffff0000ffffffffLL) | (((HEXAGON_Vect64)((unsigned short)(new))) << 32LL))
433 #define HEXAGON_V64_PUT_H3(v, new) \
434 (((v) & 0x0000ffffffffffffLL) | (((HEXAGON_Vect64)(new)) << 48LL))
436 #endif /* !__hexagon__ */
438 /* Set byte macros */
440 #ifdef __hexagon__
442 #define HEXAGON_V64_PUT_B0(v, new) \
443 __extension__({ \
444 union { \
445 long long d; \
446 char b[8]; \
447 } _HEXAGON_V64_internal_union; \
448 _HEXAGON_V64_internal_union.d = (v); \
449 _HEXAGON_V64_internal_union.b[0] = (new); \
450 _HEXAGON_V64_internal_union.d; \
452 #define HEXAGON_V64_PUT_B1(v, new) \
453 __extension__({ \
454 union { \
455 long long d; \
456 char b[8]; \
457 } _HEXAGON_V64_internal_union; \
458 _HEXAGON_V64_internal_union.d = (v); \
459 _HEXAGON_V64_internal_union.b[1] = (new); \
460 _HEXAGON_V64_internal_union.d; \
462 #define HEXAGON_V64_PUT_B2(v, new) \
463 __extension__({ \
464 union { \
465 long long d; \
466 char b[8]; \
467 } _HEXAGON_V64_internal_union; \
468 _HEXAGON_V64_internal_union.d = (v); \
469 _HEXAGON_V64_internal_union.b[2] = (new); \
470 _HEXAGON_V64_internal_union.d; \
472 #define HEXAGON_V64_PUT_B3(v, new) \
473 __extension__({ \
474 union { \
475 long long d; \
476 char b[8]; \
477 } _HEXAGON_V64_internal_union; \
478 _HEXAGON_V64_internal_union.d = (v); \
479 _HEXAGON_V64_internal_union.b[3] = (new); \
480 _HEXAGON_V64_internal_union.d; \
482 #define HEXAGON_V64_PUT_B4(v, new) \
483 __extension__({ \
484 union { \
485 long long d; \
486 char b[8]; \
487 } _HEXAGON_V64_internal_union; \
488 _HEXAGON_V64_internal_union.d = (v); \
489 _HEXAGON_V64_internal_union.b[4] = (new); \
490 _HEXAGON_V64_internal_union.d; \
492 #define HEXAGON_V64_PUT_B5(v, new) \
493 __extension__({ \
494 union { \
495 long long d; \
496 char b[8]; \
497 } _HEXAGON_V64_internal_union; \
498 _HEXAGON_V64_internal_union.d = (v); \
499 _HEXAGON_V64_internal_union.b[5] = (new); \
500 _HEXAGON_V64_internal_union.d; \
502 #define HEXAGON_V64_PUT_B6(v, new) \
503 __extension__({ \
504 union { \
505 long long d; \
506 char b[8]; \
507 } _HEXAGON_V64_internal_union; \
508 _HEXAGON_V64_internal_union.d = (v); \
509 _HEXAGON_V64_internal_union.b[6] = (new); \
510 _HEXAGON_V64_internal_union.d; \
512 #define HEXAGON_V64_PUT_B7(v, new) \
513 __extension__({ \
514 union { \
515 long long d; \
516 char b[8]; \
517 } _HEXAGON_V64_internal_union; \
518 _HEXAGON_V64_internal_union.d = (v); \
519 _HEXAGON_V64_internal_union.b[7] = (new); \
520 _HEXAGON_V64_internal_union.d; \
523 #else /* !__hexagon__ */
525 #define HEXAGON_V64_PUT_B0(v, new) \
526 (((v) & 0xffffffffffffff00LL) | ((HEXAGON_Vect64)((unsigned char)(new))))
527 #define HEXAGON_V64_PUT_B1(v, new) \
528 (((v) & 0xffffffffffff00ffLL) | (((HEXAGON_Vect64)((unsigned char)(new))) << 8LL))
529 #define HEXAGON_V64_PUT_B2(v, new) \
530 (((v) & 0xffffffffff00ffffLL) | (((HEXAGON_Vect64)((unsigned char)(new))) << 16LL))
531 #define HEXAGON_V64_PUT_B3(v, new) \
532 (((v) & 0xffffffff00ffffffLL) | (((HEXAGON_Vect64)((unsigned char)(new))) << 24LL))
533 #define HEXAGON_V64_PUT_B4(v, new) \
534 (((v) & 0xffffff00ffffffffLL) | (((HEXAGON_Vect64)((unsigned char)(new))) << 32LL))
535 #define HEXAGON_V64_PUT_B5(v, new) \
536 (((v) & 0xffff00ffffffffffLL) | (((HEXAGON_Vect64)((unsigned char)(new))) << 40LL))
537 #define HEXAGON_V64_PUT_B6(v, new) \
538 (((v) & 0xff00ffffffffffffLL) | (((HEXAGON_Vect64)((unsigned char)(new))) << 48LL))
539 #define HEXAGON_V64_PUT_B7(v, new) \
540 (((v) & 0x00ffffffffffffffLL) | (((HEXAGON_Vect64)(new)) << 56LL))
542 #endif /* !__hexagon__ */
544 /* NOTE: All create macros return a HEXAGON_Vect64 type */
546 /* Create from a doubleword */
548 #define HEXAGON_V64_CREATE_D(d) (d)
550 /* Create from words */
552 #ifdef __hexagon__
554 #define HEXAGON_V64_CREATE_W(w1, w0) \
555 __extension__({ \
556 union { \
557 long long d; \
558 int w[2]; \
559 } _HEXAGON_V64_internal_union; \
560 _HEXAGON_V64_internal_union.w[0] = (w0); \
561 _HEXAGON_V64_internal_union.w[1] = (w1); \
562 _HEXAGON_V64_internal_union.d; \
565 #else /* !__hexagon__ */
567 #define HEXAGON_V64_CREATE_W(w1, w0) \
568 ((((HEXAGON_Vect64)(w1)) << 32LL) | ((HEXAGON_Vect64)((w0) & 0xffffffff)))
570 #endif /* !__hexagon__ */
572 /* Create from half words */
574 #ifdef __hexagon__
576 #define HEXAGON_V64_CREATE_H(h3, h2, h1, h0) \
577 __extension__({ \
578 union { \
579 long long d; \
580 short h[4]; \
581 } _HEXAGON_V64_internal_union; \
582 _HEXAGON_V64_internal_union.h[0] = (h0); \
583 _HEXAGON_V64_internal_union.h[1] = (h1); \
584 _HEXAGON_V64_internal_union.h[2] = (h2); \
585 _HEXAGON_V64_internal_union.h[3] = (h3); \
586 _HEXAGON_V64_internal_union.d; \
589 #else /* !__hexagon__ */
591 #define HEXAGON_V64_CREATE_H(h3, h2, h1, h0) \
592 ((((HEXAGON_Vect64)(h3)) << 48LL) | (((HEXAGON_Vect64)((h2) & 0xffff)) << 32LL) | \
593 (((HEXAGON_Vect64)((h1) & 0xffff)) << 16LL) | ((HEXAGON_Vect64)((h0) & 0xffff)))
595 #endif /* !__hexagon__ */
597 /* Create from bytes */
599 #ifdef __hexagon__
601 #define HEXAGON_V64_CREATE_B(b7, b6, b5, b4, b3, b2, b1, b0) \
602 __extension__({ \
603 union { \
604 long long d; \
605 char b[8]; \
606 } _HEXAGON_V64_internal_union; \
607 _HEXAGON_V64_internal_union.b[0] = (b0); \
608 _HEXAGON_V64_internal_union.b[1] = (b1); \
609 _HEXAGON_V64_internal_union.b[2] = (b2); \
610 _HEXAGON_V64_internal_union.b[3] = (b3); \
611 _HEXAGON_V64_internal_union.b[4] = (b4); \
612 _HEXAGON_V64_internal_union.b[5] = (b5); \
613 _HEXAGON_V64_internal_union.b[6] = (b6); \
614 _HEXAGON_V64_internal_union.b[7] = (b7); \
615 _HEXAGON_V64_internal_union.d; \
618 #else /* !__hexagon__ */
620 #define HEXAGON_V64_CREATE_B(b7, b6, b5, b4, b3, b2, b1, b0) \
621 ((((HEXAGON_Vect64)(b7)) << 56LL) | (((HEXAGON_Vect64)((b6) & 0xff)) << 48LL) | \
622 (((HEXAGON_Vect64)((b5) & 0xff)) << 40LL) | (((HEXAGON_Vect64)((b4) & 0xff)) << 32LL) | \
623 (((HEXAGON_Vect64)((b3) & 0xff)) << 24LL) | (((HEXAGON_Vect64)((b2) & 0xff)) << 16LL) | \
624 (((HEXAGON_Vect64)((b1) & 0xff)) << 8LL) | ((HEXAGON_Vect64)((b0) & 0xff)))
626 #endif /* !__hexagon__ */
628 #ifdef __cplusplus
630 class HEXAGON_Vect64C {
631 public:
632 // Constructors
633 HEXAGON_Vect64C(long long d = 0) : data(d) {};
634 HEXAGON_Vect64C(int w1, int w0) : data(HEXAGON_V64_CREATE_W(w1, w0)) {};
635 HEXAGON_Vect64C(short h3, short h2, short h1, short h0)
636 : data(HEXAGON_V64_CREATE_H(h3, h2, h1, h0)) {};
637 HEXAGON_Vect64C(signed char b7, signed char b6, signed char b5, signed char b4,
638 signed char b3, signed char b2, signed char b1, signed char b0)
639 : data(HEXAGON_V64_CREATE_B(b7, b6, b5, b4, b3, b2, b1, b0)) {};
640 HEXAGON_Vect64C(const HEXAGON_Vect64C &v) : data(v.data) {};
642 HEXAGON_Vect64C &operator=(const HEXAGON_Vect64C &v) {
643 data = v.data;
644 return *this;
647 operator long long() {
648 return data;
651 // Extract doubleword methods
652 long long D(void) {
653 return HEXAGON_V64_GET_D(data);
655 unsigned long long UD(void) {
656 return HEXAGON_V64_GET_UD(data);
659 // Extract word methods
660 int W0(void) {
661 return HEXAGON_V64_GET_W0(data);
663 int W1(void) {
664 return HEXAGON_V64_GET_W1(data);
666 unsigned int UW0(void) {
667 return HEXAGON_V64_GET_UW0(data);
669 unsigned int UW1(void) {
670 return HEXAGON_V64_GET_UW1(data);
673 // Extract half word methods
674 short H0(void) {
675 return HEXAGON_V64_GET_H0(data);
677 short H1(void) {
678 return HEXAGON_V64_GET_H1(data);
680 short H2(void) {
681 return HEXAGON_V64_GET_H2(data);
683 short H3(void) {
684 return HEXAGON_V64_GET_H3(data);
686 unsigned short UH0(void) {
687 return HEXAGON_V64_GET_UH0(data);
689 unsigned short UH1(void) {
690 return HEXAGON_V64_GET_UH1(data);
692 unsigned short UH2(void) {
693 return HEXAGON_V64_GET_UH2(data);
695 unsigned short UH3(void) {
696 return HEXAGON_V64_GET_UH3(data);
699 // Extract byte methods
700 signed char B0(void) {
701 return HEXAGON_V64_GET_B0(data);
703 signed char B1(void) {
704 return HEXAGON_V64_GET_B1(data);
706 signed char B2(void) {
707 return HEXAGON_V64_GET_B2(data);
709 signed char B3(void) {
710 return HEXAGON_V64_GET_B3(data);
712 signed char B4(void) {
713 return HEXAGON_V64_GET_B4(data);
715 signed char B5(void) {
716 return HEXAGON_V64_GET_B5(data);
718 signed char B6(void) {
719 return HEXAGON_V64_GET_B6(data);
721 signed char B7(void) {
722 return HEXAGON_V64_GET_B7(data);
724 unsigned char UB0(void) {
725 return HEXAGON_V64_GET_UB0(data);
727 unsigned char UB1(void) {
728 return HEXAGON_V64_GET_UB1(data);
730 unsigned char UB2(void) {
731 return HEXAGON_V64_GET_UB2(data);
733 unsigned char UB3(void) {
734 return HEXAGON_V64_GET_UB3(data);
736 unsigned char UB4(void) {
737 return HEXAGON_V64_GET_UB4(data);
739 unsigned char UB5(void) {
740 return HEXAGON_V64_GET_UB5(data);
742 unsigned char UB6(void) {
743 return HEXAGON_V64_GET_UB6(data);
745 unsigned char UB7(void) {
746 return HEXAGON_V64_GET_UB7(data);
749 // NOTE: All set methods return a HEXAGON_Vect64C type
751 // Set doubleword method
752 HEXAGON_Vect64C D(long long d) {
753 return HEXAGON_Vect64C(HEXAGON_V64_PUT_D(data, d));
756 // Set word methods
757 HEXAGON_Vect64C W0(int w) {
758 return HEXAGON_Vect64C(HEXAGON_V64_PUT_W0(data, w));
760 HEXAGON_Vect64C W1(int w) {
761 return HEXAGON_Vect64C(HEXAGON_V64_PUT_W1(data, w));
764 // Set half word methods
765 HEXAGON_Vect64C H0(short h) {
766 return HEXAGON_Vect64C(HEXAGON_V64_PUT_H0(data, h));
768 HEXAGON_Vect64C H1(short h) {
769 return HEXAGON_Vect64C(HEXAGON_V64_PUT_H1(data, h));
771 HEXAGON_Vect64C H2(short h) {
772 return HEXAGON_Vect64C(HEXAGON_V64_PUT_H2(data, h));
774 HEXAGON_Vect64C H3(short h) {
775 return HEXAGON_Vect64C(HEXAGON_V64_PUT_H3(data, h));
778 // Set byte methods
779 HEXAGON_Vect64C B0(signed char b) {
780 return HEXAGON_Vect64C(HEXAGON_V64_PUT_B0(data, b));
782 HEXAGON_Vect64C B1(signed char b) {
783 return HEXAGON_Vect64C(HEXAGON_V64_PUT_B1(data, b));
785 HEXAGON_Vect64C B2(signed char b) {
786 return HEXAGON_Vect64C(HEXAGON_V64_PUT_B2(data, b));
788 HEXAGON_Vect64C B3(signed char b) {
789 return HEXAGON_Vect64C(HEXAGON_V64_PUT_B3(data, b));
791 HEXAGON_Vect64C B4(signed char b) {
792 return HEXAGON_Vect64C(HEXAGON_V64_PUT_B4(data, b));
794 HEXAGON_Vect64C B5(signed char b) {
795 return HEXAGON_Vect64C(HEXAGON_V64_PUT_B5(data, b));
797 HEXAGON_Vect64C B6(signed char b) {
798 return HEXAGON_Vect64C(HEXAGON_V64_PUT_B6(data, b));
800 HEXAGON_Vect64C B7(signed char b) {
801 return HEXAGON_Vect64C(HEXAGON_V64_PUT_B7(data, b));
804 private:
805 long long data;
808 #endif /* __cplusplus */
810 /* 32 Bit Vectors */
812 typedef int HEXAGON_Vect32;
814 /* Extract word macros */
816 #define HEXAGON_V32_GET_W(v) (v)
817 #define HEXAGON_V32_GET_UW(v) ((unsigned int)(v))
819 /* Extract half word macros */
821 #define HEXAGON_V32_GET_H0(v) \
822 __extension__({ \
823 union { \
824 int w; \
825 short h[2]; \
826 } _HEXAGON_V32_internal_union; \
827 _HEXAGON_V32_internal_union.w = (v); \
828 _HEXAGON_V32_internal_union.h[0]; \
830 #define HEXAGON_V32_GET_H1(v) \
831 __extension__({ \
832 union { \
833 int w; \
834 short h[2]; \
835 } _HEXAGON_V32_internal_union; \
836 _HEXAGON_V32_internal_union.w = (v); \
837 _HEXAGON_V32_internal_union.h[1]; \
839 #define HEXAGON_V32_GET_UH0(v) \
840 __extension__({ \
841 union { \
842 int w; \
843 unsigned short uh[2]; \
844 } _HEXAGON_V32_internal_union; \
845 _HEXAGON_V32_internal_union.w = (v); \
846 _HEXAGON_V32_internal_union.uh[0]; \
848 #define HEXAGON_V32_GET_UH1(v) \
849 __extension__({ \
850 union { \
851 int w; \
852 unsigned short uh[2]; \
853 } _HEXAGON_V32_internal_union; \
854 _HEXAGON_V32_internal_union.w = (v); \
855 _HEXAGON_V32_internal_union.uh[1]; \
858 /* Extract byte macros */
860 #define HEXAGON_V32_GET_B0(v) \
861 __extension__({ \
862 union { \
863 int w; \
864 signed char b[4]; \
865 } _HEXAGON_V32_internal_union; \
866 _HEXAGON_V32_internal_union.w = (v); \
867 _HEXAGON_V32_internal_union.b[0]; \
869 #define HEXAGON_V32_GET_B1(v) \
870 __extension__({ \
871 union { \
872 int w; \
873 signed char b[4]; \
874 } _HEXAGON_V32_internal_union; \
875 _HEXAGON_V32_internal_union.w = (v); \
876 _HEXAGON_V32_internal_union.b[1]; \
878 #define HEXAGON_V32_GET_B2(v) \
879 __extension__({ \
880 union { \
881 int w; \
882 signed char b[4]; \
883 } _HEXAGON_V32_internal_union; \
884 _HEXAGON_V32_internal_union.w = (v); \
885 _HEXAGON_V32_internal_union.b[2]; \
887 #define HEXAGON_V32_GET_B3(v) \
888 __extension__({ \
889 union { \
890 int w; \
891 signed char b[4]; \
892 } _HEXAGON_V32_internal_union; \
893 _HEXAGON_V32_internal_union.w = (v); \
894 _HEXAGON_V32_internal_union.b[3]; \
896 #define HEXAGON_V32_GET_UB0(v) \
897 __extension__({ \
898 union { \
899 int w; \
900 unsigned char ub[4]; \
901 } _HEXAGON_V32_internal_union; \
902 _HEXAGON_V32_internal_union.w = (v); \
903 _HEXAGON_V32_internal_union.ub[0]; \
905 #define HEXAGON_V32_GET_UB1(v) \
906 __extension__({ \
907 union { \
908 int w; \
909 unsigned char ub[4]; \
910 } _HEXAGON_V32_internal_union; \
911 _HEXAGON_V32_internal_union.w = (v); \
912 _HEXAGON_V32_internal_union.ub[1]; \
914 #define HEXAGON_V32_GET_UB2(v) \
915 __extension__({ \
916 union { \
917 int w; \
918 unsigned char ub[4]; \
919 } _HEXAGON_V32_internal_union; \
920 _HEXAGON_V32_internal_union.w = (v); \
921 _HEXAGON_V32_internal_union.ub[2]; \
923 #define HEXAGON_V32_GET_UB3(v) \
924 __extension__({ \
925 union { \
926 int w; \
927 unsigned char ub[4]; \
928 } _HEXAGON_V32_internal_union; \
929 _HEXAGON_V32_internal_union.w = (v); \
930 _HEXAGON_V32_internal_union.ub[3]; \
933 /* NOTE: All set macros return a HEXAGON_Vect32 type */
935 /* Set word macro */
937 #define HEXAGON_V32_PUT_W(v, new) (new)
939 /* Set half word macros */
941 #ifdef __hexagon__
943 #define HEXAGON_V32_PUT_H0(v, new) \
944 __extension__({ \
945 union { \
946 int w; \
947 short h[2]; \
948 } _HEXAGON_V32_internal_union; \
949 _HEXAGON_V32_internal_union.w = (v); \
950 _HEXAGON_V32_internal_union.h[0] = (new); \
951 _HEXAGON_V32_internal_union.w; \
953 #define HEXAGON_V32_PUT_H1(v, new) \
954 __extension__({ \
955 union { \
956 int w; \
957 short h[2]; \
958 } _HEXAGON_V32_internal_union; \
959 _HEXAGON_V32_internal_union.w = (v); \
960 _HEXAGON_V32_internal_union.h[1] = (new); \
961 _HEXAGON_V32_internal_union.w; \
964 #else /* !__hexagon__ */
966 #define HEXAGON_V32_PUT_H0(v, new) \
967 (((v) & 0xffff0000) | ((HEXAGON_Vect32)((unsigned short)(new))))
968 #define HEXAGON_V32_PUT_H1(v, new) (((v) & 0x0000ffff) | (((HEXAGON_Vect32)(new)) << 16))
970 #endif /* !__hexagon__ */
972 /* Set byte macros */
974 #ifdef __hexagon__
976 #define HEXAGON_V32_PUT_B0(v, new) \
977 __extension__({ \
978 union { \
979 int w; \
980 char b[4]; \
981 } _HEXAGON_V32_internal_union; \
982 _HEXAGON_V32_internal_union.w = (v); \
983 _HEXAGON_V32_internal_union.b[0] = (new); \
984 _HEXAGON_V32_internal_union.w; \
986 #define HEXAGON_V32_PUT_B1(v, new) \
987 __extension__({ \
988 union { \
989 int w; \
990 char b[4]; \
991 } _HEXAGON_V32_internal_union; \
992 _HEXAGON_V32_internal_union.w = (v); \
993 _HEXAGON_V32_internal_union.b[1] = (new); \
994 _HEXAGON_V32_internal_union.w; \
996 #define HEXAGON_V32_PUT_B2(v, new) \
997 __extension__({ \
998 union { \
999 int w; \
1000 char b[4]; \
1001 } _HEXAGON_V32_internal_union; \
1002 _HEXAGON_V32_internal_union.w = (v); \
1003 _HEXAGON_V32_internal_union.b[2] = (new); \
1004 _HEXAGON_V32_internal_union.w; \
1006 #define HEXAGON_V32_PUT_B3(v, new) \
1007 __extension__({ \
1008 union { \
1009 int w; \
1010 char b[4]; \
1011 } _HEXAGON_V32_internal_union; \
1012 _HEXAGON_V32_internal_union.w = (v); \
1013 _HEXAGON_V32_internal_union.b[3] = (new); \
1014 _HEXAGON_V32_internal_union.w; \
1017 #else /* !__hexagon__ */
1019 #define HEXAGON_V32_PUT_B0(v, new) \
1020 (((v) & 0xffffff00) | ((HEXAGON_Vect32)((unsigned char)(new))))
1021 #define HEXAGON_V32_PUT_B1(v, new) \
1022 (((v) & 0xffff00ff) | (((HEXAGON_Vect32)((unsigned char)(new))) << 8))
1023 #define HEXAGON_V32_PUT_B2(v, new) \
1024 (((v) & 0xff00ffff) | (((HEXAGON_Vect32)((unsigned char)(new))) << 16))
1025 #define HEXAGON_V32_PUT_B3(v, new) (((v) & 0x00ffffff) | (((HEXAGON_Vect32)(new)) << 24))
1027 #endif /* !__hexagon__ */
1029 /* NOTE: All create macros return a HEXAGON_Vect32 type */
1031 /* Create from a word */
1033 #define HEXAGON_V32_CREATE_W(w) (w)
1035 /* Create from half words */
1037 #ifdef __hexagon__
1039 #define HEXAGON_V32_CREATE_H(h1, h0) \
1040 __extension__({ \
1041 union { \
1042 long long d; \
1043 short h[2]; \
1044 } _HEXAGON_V32_internal_union; \
1045 _HEXAGON_V32_internal_union.h[0] = (h0); \
1046 _HEXAGON_V32_internal_union.h[1] = (h1); \
1047 _HEXAGON_V32_internal_union.d; \
1050 #else /* !__hexagon__ */
1052 #define HEXAGON_V32_CREATE_H(h1, h0) \
1053 ((((HEXAGON_Vect32)(h1)) << 16) | ((HEXAGON_Vect32)((h0) & 0xffff)))
1055 #endif /* !__hexagon__ */
1057 /* Create from bytes */
1058 #ifdef __hexagon__
1060 #define HEXAGON_V32_CREATE_B(b3, b2, b1, b0) \
1061 __extension__({ \
1062 union { \
1063 long long d; \
1064 char b[4]; \
1065 } _HEXAGON_V32_internal_union; \
1066 _HEXAGON_V32_internal_union.b[0] = (b0); \
1067 _HEXAGON_V32_internal_union.b[1] = (b1); \
1068 _HEXAGON_V32_internal_union.b[2] = (b2); \
1069 _HEXAGON_V32_internal_union.b[3] = (b3); \
1070 _HEXAGON_V32_internal_union.d; \
1073 #else /* !__hexagon__ */
1075 #define HEXAGON_V32_CREATE_B(b3, b2, b1, b0) \
1076 ((((HEXAGON_Vect32)(b3)) << 24) | (((HEXAGON_Vect32)((b2) & 0xff)) << 16) | \
1077 (((HEXAGON_Vect32)((b1) & 0xff)) << 8) | ((HEXAGON_Vect32)((b0) & 0xff)))
1079 #endif /* !__hexagon__ */
1081 #ifdef __cplusplus
1083 class HEXAGON_Vect32C {
1084 public:
1085 // Constructors
1086 HEXAGON_Vect32C(int w = 0) : data(w) {};
1087 HEXAGON_Vect32C(short h1, short h0) : data(HEXAGON_V32_CREATE_H(h1, h0)) {};
1088 HEXAGON_Vect32C(signed char b3, signed char b2, signed char b1, signed char b0)
1089 : data(HEXAGON_V32_CREATE_B(b3, b2, b1, b0)) {};
1090 HEXAGON_Vect32C(const HEXAGON_Vect32C &v) : data(v.data) {};
1092 HEXAGON_Vect32C &operator=(const HEXAGON_Vect32C &v) {
1093 data = v.data;
1094 return *this;
1097 operator int() {
1098 return data;
1101 // Extract word methods
1102 int W(void) {
1103 return HEXAGON_V32_GET_W(data);
1105 unsigned int UW(void) {
1106 return HEXAGON_V32_GET_UW(data);
1109 // Extract half word methods
1110 short H0(void) {
1111 return HEXAGON_V32_GET_H0(data);
1113 short H1(void) {
1114 return HEXAGON_V32_GET_H1(data);
1116 unsigned short UH0(void) {
1117 return HEXAGON_V32_GET_UH0(data);
1119 unsigned short UH1(void) {
1120 return HEXAGON_V32_GET_UH1(data);
1123 // Extract byte methods
1124 signed char B0(void) {
1125 return HEXAGON_V32_GET_B0(data);
1127 signed char B1(void) {
1128 return HEXAGON_V32_GET_B1(data);
1130 signed char B2(void) {
1131 return HEXAGON_V32_GET_B2(data);
1133 signed char B3(void) {
1134 return HEXAGON_V32_GET_B3(data);
1136 unsigned char UB0(void) {
1137 return HEXAGON_V32_GET_UB0(data);
1139 unsigned char UB1(void) {
1140 return HEXAGON_V32_GET_UB1(data);
1142 unsigned char UB2(void) {
1143 return HEXAGON_V32_GET_UB2(data);
1145 unsigned char UB3(void) {
1146 return HEXAGON_V32_GET_UB3(data);
1149 // NOTE: All set methods return a HEXAGON_Vect32C type
1151 // Set word method
1152 HEXAGON_Vect32C W(int w) {
1153 return HEXAGON_Vect32C(HEXAGON_V32_PUT_W(data, w));
1156 // Set half word methods
1157 HEXAGON_Vect32C H0(short h) {
1158 return HEXAGON_Vect32C(HEXAGON_V32_PUT_H0(data, h));
1160 HEXAGON_Vect32C H1(short h) {
1161 return HEXAGON_Vect32C(HEXAGON_V32_PUT_H1(data, h));
1164 // Set byte methods
1165 HEXAGON_Vect32C B0(signed char b) {
1166 return HEXAGON_Vect32C(HEXAGON_V32_PUT_B0(data, b));
1168 HEXAGON_Vect32C B1(signed char b) {
1169 return HEXAGON_Vect32C(HEXAGON_V32_PUT_B1(data, b));
1171 HEXAGON_Vect32C B2(signed char b) {
1172 return HEXAGON_Vect32C(HEXAGON_V32_PUT_B2(data, b));
1174 HEXAGON_Vect32C B3(signed char b) {
1175 return HEXAGON_Vect32C(HEXAGON_V32_PUT_B3(data, b));
1178 private:
1179 int data;
1182 #endif /* __cplusplus */
1184 // V65 Vector types
1185 #if __HVX_ARCH__ >= 65
1186 #if defined __HVX__ && (__HVX_LENGTH__ == 128)
1187 typedef long HEXAGON_VecPred128 __attribute__((__vector_size__(128)))
1188 __attribute__((aligned(128)));
1190 typedef long HEXAGON_Vect1024 __attribute__((__vector_size__(128)))
1191 __attribute__((aligned(128)));
1193 typedef long HEXAGON_Vect2048 __attribute__((__vector_size__(256)))
1194 __attribute__((aligned(256)));
1196 typedef long HEXAGON_UVect1024 __attribute__((__vector_size__(128)))
1197 __attribute__((aligned(4)));
1199 typedef long HEXAGON_UVect2048 __attribute__((__vector_size__(256)))
1200 __attribute__((aligned(4)));
1202 #define HVX_VectorPred HEXAGON_VecPred128
1203 #define HVX_Vector HEXAGON_Vect1024
1204 #define HVX_VectorPair HEXAGON_Vect2048
1205 #define HVX_UVector HEXAGON_UVect1024
1206 #define HVX_UVectorPair HEXAGON_UVect2048
1207 #else /* defined __HVX__ && (__HVX_LENGTH__ == 128) */
1208 #if defined __HVX__ && (__HVX_LENGTH__ == 64)
1209 typedef long HEXAGON_VecPred64 __attribute__((__vector_size__(64)))
1210 __attribute__((aligned(64)));
1212 typedef long HEXAGON_Vect512 __attribute__((__vector_size__(64)))
1213 __attribute__((aligned(64)));
1215 typedef long HEXAGON_Vect1024 __attribute__((__vector_size__(128)))
1216 __attribute__((aligned(128)));
1218 typedef long HEXAGON_UVect512 __attribute__((__vector_size__(64)))
1219 __attribute__((aligned(4)));
1221 typedef long HEXAGON_UVect1024 __attribute__((__vector_size__(128)))
1222 __attribute__((aligned(4)));
1224 #define HVX_VectorPred HEXAGON_VecPred64
1225 #define HVX_Vector HEXAGON_Vect512
1226 #define HVX_VectorPair HEXAGON_Vect1024
1227 #define HVX_UVector HEXAGON_UVect512
1228 #define HVX_UVectorPair HEXAGON_UVect1024
1229 #endif /* defined __HVX__ && (__HVX_LENGTH__ == 64) */
1230 #endif /* defined __HVX__ && (__HVX_LENGTH__ == 128) */
1231 #endif /* __HVX_ARCH__ >= 65 */
1233 /* Predicates */
1235 typedef int HEXAGON_Pred;
1237 /***
1238 *** backward compatibility aliases
1239 ***/
1241 /* Old names */
1242 #define Q6Vect Q6Vect64
1243 #define Q6V_GET_D Q6V64_GET_D
1244 #define Q6V_GET_UD Q6V64_GET_UD
1245 #define Q6V_GET_W0 Q6V64_GET_W0
1246 #define Q6V_GET_W1 Q6V64_GET_W1
1247 #define Q6V_GET_UW0 Q6V64_GET_UW0
1248 #define Q6V_GET_UW1 Q6V64_GET_UW1
1249 #define Q6V_GET_H0 Q6V64_GET_H0
1250 #define Q6V_GET_H1 Q6V64_GET_H1
1251 #define Q6V_GET_H2 Q6V64_GET_H2
1252 #define Q6V_GET_H3 Q6V64_GET_H3
1253 #define Q6V_GET_UH0 Q6V64_GET_UH0
1254 #define Q6V_GET_UH1 Q6V64_GET_UH1
1255 #define Q6V_GET_UH2 Q6V64_GET_UH2
1256 #define Q6V_GET_UH3 Q6V64_GET_UH3
1257 #define Q6V_GET_B0 Q6V64_GET_B0
1258 #define Q6V_GET_B1 Q6V64_GET_B1
1259 #define Q6V_GET_B2 Q6V64_GET_B2
1260 #define Q6V_GET_B3 Q6V64_GET_B3
1261 #define Q6V_GET_B4 Q6V64_GET_B4
1262 #define Q6V_GET_B5 Q6V64_GET_B5
1263 #define Q6V_GET_B6 Q6V64_GET_B6
1264 #define Q6V_GET_B7 Q6V64_GET_B7
1265 #define Q6V_GET_UB0 Q6V64_GET_UB0
1266 #define Q6V_GET_UB1 Q6V64_GET_UB1
1267 #define Q6V_GET_UB2 Q6V64_GET_UB2
1268 #define Q6V_GET_UB3 Q6V64_GET_UB3
1269 #define Q6V_GET_UB4 Q6V64_GET_UB4
1270 #define Q6V_GET_UB5 Q6V64_GET_UB5
1271 #define Q6V_GET_UB6 Q6V64_GET_UB6
1272 #define Q6V_GET_UB7 Q6V64_GET_UB7
1273 #define Q6V_PUT_D Q6V64_PUT_D
1274 #define Q6V_PUT_W0 Q6V64_PUT_W0
1275 #define Q6V_PUT_W1 Q6V64_PUT_W1
1276 #define Q6V_PUT_H0 Q6V64_PUT_H0
1277 #define Q6V_PUT_H1 Q6V64_PUT_H1
1278 #define Q6V_PUT_H2 Q6V64_PUT_H2
1279 #define Q6V_PUT_H3 Q6V64_PUT_H3
1280 #define Q6V_PUT_B0 Q6V64_PUT_B0
1281 #define Q6V_PUT_B1 Q6V64_PUT_B1
1282 #define Q6V_PUT_B2 Q6V64_PUT_B2
1283 #define Q6V_PUT_B3 Q6V64_PUT_B3
1284 #define Q6V_PUT_B4 Q6V64_PUT_B4
1285 #define Q6V_PUT_B5 Q6V64_PUT_B5
1286 #define Q6V_PUT_B6 Q6V64_PUT_B6
1287 #define Q6V_PUT_B7 Q6V64_PUT_B7
1288 #define Q6V_CREATE_D Q6V64_CREATE_D
1289 #define Q6V_CREATE_W Q6V64_CREATE_W
1290 #define Q6V_CREATE_H Q6V64_CREATE_H
1291 #define Q6V_CREATE_B Q6V64_CREATE_B
1293 #ifdef __cplusplus
1294 #define Q6VectC Q6Vect64C
1295 #endif /* __cplusplus */
1297 /* 64 Bit Vectors */
1299 typedef long long __attribute__((__may_alias__)) Q6Vect64;
1301 /* Extract doubleword macros */
1303 #define Q6V64_GET_D(v) (v)
1304 #define Q6V64_GET_UD(v) ((unsigned long long)(v))
1306 /* Extract word macros */
1308 #define Q6V64_GET_W0(v) \
1309 __extension__({ \
1310 union { \
1311 long long d; \
1312 int w[2]; \
1313 } _Q6V64_internal_union; \
1314 _Q6V64_internal_union.d = (v); \
1315 _Q6V64_internal_union.w[0]; \
1317 #define Q6V64_GET_W1(v) \
1318 __extension__({ \
1319 union { \
1320 long long d; \
1321 int w[2]; \
1322 } _Q6V64_internal_union; \
1323 _Q6V64_internal_union.d = (v); \
1324 _Q6V64_internal_union.w[1]; \
1326 #define Q6V64_GET_UW0(v) \
1327 __extension__({ \
1328 union { \
1329 long long d; \
1330 unsigned int uw[2]; \
1331 } _Q6V64_internal_union; \
1332 _Q6V64_internal_union.d = (v); \
1333 _Q6V64_internal_union.uw[0]; \
1335 #define Q6V64_GET_UW1(v) \
1336 __extension__({ \
1337 union { \
1338 long long d; \
1339 unsigned int uw[2]; \
1340 } _Q6V64_internal_union; \
1341 _Q6V64_internal_union.d = (v); \
1342 _Q6V64_internal_union.uw[1]; \
1345 /* Extract half word macros */
1347 #define Q6V64_GET_H0(v) \
1348 __extension__({ \
1349 union { \
1350 long long d; \
1351 short h[4]; \
1352 } _Q6V64_internal_union; \
1353 _Q6V64_internal_union.d = (v); \
1354 _Q6V64_internal_union.h[0]; \
1356 #define Q6V64_GET_H1(v) \
1357 __extension__({ \
1358 union { \
1359 long long d; \
1360 short h[4]; \
1361 } _Q6V64_internal_union; \
1362 _Q6V64_internal_union.d = (v); \
1363 _Q6V64_internal_union.h[1]; \
1365 #define Q6V64_GET_H2(v) \
1366 __extension__({ \
1367 union { \
1368 long long d; \
1369 short h[4]; \
1370 } _Q6V64_internal_union; \
1371 _Q6V64_internal_union.d = (v); \
1372 _Q6V64_internal_union.h[2]; \
1374 #define Q6V64_GET_H3(v) \
1375 __extension__({ \
1376 union { \
1377 long long d; \
1378 short h[4]; \
1379 } _Q6V64_internal_union; \
1380 _Q6V64_internal_union.d = (v); \
1381 _Q6V64_internal_union.h[3]; \
1383 #define Q6V64_GET_UH0(v) \
1384 __extension__({ \
1385 union { \
1386 long long d; \
1387 unsigned short uh[4]; \
1388 } _Q6V64_internal_union; \
1389 _Q6V64_internal_union.d = (v); \
1390 _Q6V64_internal_union.uh[0]; \
1392 #define Q6V64_GET_UH1(v) \
1393 __extension__({ \
1394 union { \
1395 long long d; \
1396 unsigned short uh[4]; \
1397 } _Q6V64_internal_union; \
1398 _Q6V64_internal_union.d = (v); \
1399 _Q6V64_internal_union.uh[1]; \
1401 #define Q6V64_GET_UH2(v) \
1402 __extension__({ \
1403 union { \
1404 long long d; \
1405 unsigned short uh[4]; \
1406 } _Q6V64_internal_union; \
1407 _Q6V64_internal_union.d = (v); \
1408 _Q6V64_internal_union.uh[2]; \
1410 #define Q6V64_GET_UH3(v) \
1411 __extension__({ \
1412 union { \
1413 long long d; \
1414 unsigned short uh[4]; \
1415 } _Q6V64_internal_union; \
1416 _Q6V64_internal_union.d = (v); \
1417 _Q6V64_internal_union.uh[3]; \
1420 /* Extract byte macros */
1422 #define Q6V64_GET_B0(v) \
1423 __extension__({ \
1424 union { \
1425 long long d; \
1426 signed char b[8]; \
1427 } _Q6V64_internal_union; \
1428 _Q6V64_internal_union.d = (v); \
1429 _Q6V64_internal_union.b[0]; \
1431 #define Q6V64_GET_B1(v) \
1432 __extension__({ \
1433 union { \
1434 long long d; \
1435 signed char b[8]; \
1436 } _Q6V64_internal_union; \
1437 _Q6V64_internal_union.d = (v); \
1438 _Q6V64_internal_union.b[1]; \
1440 #define Q6V64_GET_B2(v) \
1441 __extension__({ \
1442 union { \
1443 long long d; \
1444 signed char b[8]; \
1445 } _Q6V64_internal_union; \
1446 _Q6V64_internal_union.d = (v); \
1447 _Q6V64_internal_union.b[2]; \
1449 #define Q6V64_GET_B3(v) \
1450 __extension__({ \
1451 union { \
1452 long long d; \
1453 signed char b[8]; \
1454 } _Q6V64_internal_union; \
1455 _Q6V64_internal_union.d = (v); \
1456 _Q6V64_internal_union.b[3]; \
1458 #define Q6V64_GET_B4(v) \
1459 __extension__({ \
1460 union { \
1461 long long d; \
1462 signed char b[8]; \
1463 } _Q6V64_internal_union; \
1464 _Q6V64_internal_union.d = (v); \
1465 _Q6V64_internal_union.b[4]; \
1467 #define Q6V64_GET_B5(v) \
1468 __extension__({ \
1469 union { \
1470 long long d; \
1471 signed char b[8]; \
1472 } _Q6V64_internal_union; \
1473 _Q6V64_internal_union.d = (v); \
1474 _Q6V64_internal_union.b[5]; \
1476 #define Q6V64_GET_B6(v) \
1477 __extension__({ \
1478 union { \
1479 long long d; \
1480 signed char b[8]; \
1481 } _Q6V64_internal_union; \
1482 _Q6V64_internal_union.d = (v); \
1483 _Q6V64_internal_union.b[6]; \
1485 #define Q6V64_GET_B7(v) \
1486 __extension__({ \
1487 union { \
1488 long long d; \
1489 signed char b[8]; \
1490 } _Q6V64_internal_union; \
1491 _Q6V64_internal_union.d = (v); \
1492 _Q6V64_internal_union.b[7]; \
1494 #define Q6V64_GET_UB0(v) \
1495 __extension__({ \
1496 union { \
1497 long long d; \
1498 unsigned char ub[8]; \
1499 } _Q6V64_internal_union; \
1500 _Q6V64_internal_union.d = (v); \
1501 _Q6V64_internal_union.ub[0]; \
1503 #define Q6V64_GET_UB1(v) \
1504 __extension__({ \
1505 union { \
1506 long long d; \
1507 unsigned char ub[8]; \
1508 } _Q6V64_internal_union; \
1509 _Q6V64_internal_union.d = (v); \
1510 _Q6V64_internal_union.ub[1]; \
1512 #define Q6V64_GET_UB2(v) \
1513 __extension__({ \
1514 union { \
1515 long long d; \
1516 unsigned char ub[8]; \
1517 } _Q6V64_internal_union; \
1518 _Q6V64_internal_union.d = (v); \
1519 _Q6V64_internal_union.ub[2]; \
1521 #define Q6V64_GET_UB3(v) \
1522 __extension__({ \
1523 union { \
1524 long long d; \
1525 unsigned char ub[8]; \
1526 } _Q6V64_internal_union; \
1527 _Q6V64_internal_union.d = (v); \
1528 _Q6V64_internal_union.ub[3]; \
1530 #define Q6V64_GET_UB4(v) \
1531 __extension__({ \
1532 union { \
1533 long long d; \
1534 unsigned char ub[8]; \
1535 } _Q6V64_internal_union; \
1536 _Q6V64_internal_union.d = (v); \
1537 _Q6V64_internal_union.ub[4]; \
1539 #define Q6V64_GET_UB5(v) \
1540 __extension__({ \
1541 union { \
1542 long long d; \
1543 unsigned char ub[8]; \
1544 } _Q6V64_internal_union; \
1545 _Q6V64_internal_union.d = (v); \
1546 _Q6V64_internal_union.ub[5]; \
1548 #define Q6V64_GET_UB6(v) \
1549 __extension__({ \
1550 union { \
1551 long long d; \
1552 unsigned char ub[8]; \
1553 } _Q6V64_internal_union; \
1554 _Q6V64_internal_union.d = (v); \
1555 _Q6V64_internal_union.ub[6]; \
1557 #define Q6V64_GET_UB7(v) \
1558 __extension__({ \
1559 union { \
1560 long long d; \
1561 unsigned char ub[8]; \
1562 } _Q6V64_internal_union; \
1563 _Q6V64_internal_union.d = (v); \
1564 _Q6V64_internal_union.ub[7]; \
1567 /* NOTE: All set macros return a Q6Vect64 type */
1569 /* Set doubleword macro */
1571 #define Q6V64_PUT_D(v, new) (new)
1573 /* Set word macros */
1575 #ifdef __qdsp6__
1577 #define Q6V64_PUT_W0(v, new) \
1578 __extension__({ \
1579 union { \
1580 long long d; \
1581 int w[2]; \
1582 } _Q6V64_internal_union; \
1583 _Q6V64_internal_union.d = (v); \
1584 _Q6V64_internal_union.w[0] = (new); \
1585 _Q6V64_internal_union.d; \
1587 #define Q6V64_PUT_W1(v, new) \
1588 __extension__({ \
1589 union { \
1590 long long d; \
1591 int w[2]; \
1592 } _Q6V64_internal_union; \
1593 _Q6V64_internal_union.d = (v); \
1594 _Q6V64_internal_union.w[1] = (new); \
1595 _Q6V64_internal_union.d; \
1598 #else /* !__qdsp6__ */
1600 #define Q6V64_PUT_W0(v, new) \
1601 (((v) & 0xffffffff00000000LL) | ((Q6Vect64)((unsigned int)(new))))
1602 #define Q6V64_PUT_W1(v, new) \
1603 (((v) & 0x00000000ffffffffLL) | (((Q6Vect64)(new)) << 32LL))
1605 #endif /* !__qdsp6__ */
1607 /* Set half word macros */
1609 #ifdef __qdsp6__
1611 #define Q6V64_PUT_H0(v, new) \
1612 __extension__({ \
1613 union { \
1614 long long d; \
1615 short h[4]; \
1616 } _Q6V64_internal_union; \
1617 _Q6V64_internal_union.d = (v); \
1618 _Q6V64_internal_union.h[0] = (new); \
1619 _Q6V64_internal_union.d; \
1621 #define Q6V64_PUT_H1(v, new) \
1622 __extension__({ \
1623 union { \
1624 long long d; \
1625 short h[4]; \
1626 } _Q6V64_internal_union; \
1627 _Q6V64_internal_union.d = (v); \
1628 _Q6V64_internal_union.h[1] = (new); \
1629 _Q6V64_internal_union.d; \
1631 #define Q6V64_PUT_H2(v, new) \
1632 __extension__({ \
1633 union { \
1634 long long d; \
1635 short h[4]; \
1636 } _Q6V64_internal_union; \
1637 _Q6V64_internal_union.d = (v); \
1638 _Q6V64_internal_union.h[2] = (new); \
1639 _Q6V64_internal_union.d; \
1641 #define Q6V64_PUT_H3(v, new) \
1642 __extension__({ \
1643 union { \
1644 long long d; \
1645 short h[4]; \
1646 } _Q6V64_internal_union; \
1647 _Q6V64_internal_union.d = (v); \
1648 _Q6V64_internal_union.h[3] = (new); \
1649 _Q6V64_internal_union.d; \
1652 #else /* !__qdsp6__ */
1654 #define Q6V64_PUT_H0(v, new) \
1655 (((v) & 0xffffffffffff0000LL) | ((Q6Vect64)((unsigned short)(new))))
1656 #define Q6V64_PUT_H1(v, new) \
1657 (((v) & 0xffffffff0000ffffLL) | (((Q6Vect64)((unsigned short)(new))) << 16LL))
1658 #define Q6V64_PUT_H2(v, new) \
1659 (((v) & 0xffff0000ffffffffLL) | (((Q6Vect64)((unsigned short)(new))) << 32LL))
1660 #define Q6V64_PUT_H3(v, new) \
1661 (((v) & 0x0000ffffffffffffLL) | (((Q6Vect64)(new)) << 48LL))
1663 #endif /* !__qdsp6__ */
1665 /* Set byte macros */
1667 #ifdef __qdsp6__
1669 #define Q6V64_PUT_B0(v, new) \
1670 __extension__({ \
1671 union { \
1672 long long d; \
1673 char b[8]; \
1674 } _Q6V64_internal_union; \
1675 _Q6V64_internal_union.d = (v); \
1676 _Q6V64_internal_union.b[0] = (new); \
1677 _Q6V64_internal_union.d; \
1679 #define Q6V64_PUT_B1(v, new) \
1680 __extension__({ \
1681 union { \
1682 long long d; \
1683 char b[8]; \
1684 } _Q6V64_internal_union; \
1685 _Q6V64_internal_union.d = (v); \
1686 _Q6V64_internal_union.b[1] = (new); \
1687 _Q6V64_internal_union.d; \
1689 #define Q6V64_PUT_B2(v, new) \
1690 __extension__({ \
1691 union { \
1692 long long d; \
1693 char b[8]; \
1694 } _Q6V64_internal_union; \
1695 _Q6V64_internal_union.d = (v); \
1696 _Q6V64_internal_union.b[2] = (new); \
1697 _Q6V64_internal_union.d; \
1699 #define Q6V64_PUT_B3(v, new) \
1700 __extension__({ \
1701 union { \
1702 long long d; \
1703 char b[8]; \
1704 } _Q6V64_internal_union; \
1705 _Q6V64_internal_union.d = (v); \
1706 _Q6V64_internal_union.b[3] = (new); \
1707 _Q6V64_internal_union.d; \
1709 #define Q6V64_PUT_B4(v, new) \
1710 __extension__({ \
1711 union { \
1712 long long d; \
1713 char b[8]; \
1714 } _Q6V64_internal_union; \
1715 _Q6V64_internal_union.d = (v); \
1716 _Q6V64_internal_union.b[4] = (new); \
1717 _Q6V64_internal_union.d; \
1719 #define Q6V64_PUT_B5(v, new) \
1720 __extension__({ \
1721 union { \
1722 long long d; \
1723 char b[8]; \
1724 } _Q6V64_internal_union; \
1725 _Q6V64_internal_union.d = (v); \
1726 _Q6V64_internal_union.b[5] = (new); \
1727 _Q6V64_internal_union.d; \
1729 #define Q6V64_PUT_B6(v, new) \
1730 __extension__({ \
1731 union { \
1732 long long d; \
1733 char b[8]; \
1734 } _Q6V64_internal_union; \
1735 _Q6V64_internal_union.d = (v); \
1736 _Q6V64_internal_union.b[6] = (new); \
1737 _Q6V64_internal_union.d; \
1739 #define Q6V64_PUT_B7(v, new) \
1740 __extension__({ \
1741 union { \
1742 long long d; \
1743 char b[8]; \
1744 } _Q6V64_internal_union; \
1745 _Q6V64_internal_union.d = (v); \
1746 _Q6V64_internal_union.b[7] = (new); \
1747 _Q6V64_internal_union.d; \
1750 #else /* !__qdsp6__ */
1752 #define Q6V64_PUT_B0(v, new) \
1753 (((v) & 0xffffffffffffff00LL) | ((Q6Vect64)((unsigned char)(new))))
1754 #define Q6V64_PUT_B1(v, new) \
1755 (((v) & 0xffffffffffff00ffLL) | (((Q6Vect64)((unsigned char)(new))) << 8LL))
1756 #define Q6V64_PUT_B2(v, new) \
1757 (((v) & 0xffffffffff00ffffLL) | (((Q6Vect64)((unsigned char)(new))) << 16LL))
1758 #define Q6V64_PUT_B3(v, new) \
1759 (((v) & 0xffffffff00ffffffLL) | (((Q6Vect64)((unsigned char)(new))) << 24LL))
1760 #define Q6V64_PUT_B4(v, new) \
1761 (((v) & 0xffffff00ffffffffLL) | (((Q6Vect64)((unsigned char)(new))) << 32LL))
1762 #define Q6V64_PUT_B5(v, new) \
1763 (((v) & 0xffff00ffffffffffLL) | (((Q6Vect64)((unsigned char)(new))) << 40LL))
1764 #define Q6V64_PUT_B6(v, new) \
1765 (((v) & 0xff00ffffffffffffLL) | (((Q6Vect64)((unsigned char)(new))) << 48LL))
1766 #define Q6V64_PUT_B7(v, new) \
1767 (((v) & 0x00ffffffffffffffLL) | (((Q6Vect64)(new)) << 56LL))
1769 #endif /* !__qdsp6__ */
1771 /* NOTE: All create macros return a Q6Vect64 type */
1773 /* Create from a doubleword */
1775 #define Q6V64_CREATE_D(d) (d)
1777 /* Create from words */
1779 #ifdef __qdsp6__
1781 #define Q6V64_CREATE_W(w1, w0) \
1782 __extension__({ \
1783 union { \
1784 long long d; \
1785 int w[2]; \
1786 } _Q6V64_internal_union; \
1787 _Q6V64_internal_union.w[0] = (w0); \
1788 _Q6V64_internal_union.w[1] = (w1); \
1789 _Q6V64_internal_union.d; \
1792 #else /* !__qdsp6__ */
1794 #define Q6V64_CREATE_W(w1, w0) \
1795 ((((Q6Vect64)(w1)) << 32LL) | ((Q6Vect64)((w0) & 0xffffffff)))
1797 #endif /* !__qdsp6__ */
1799 /* Create from half words */
1801 #ifdef __qdsp6__
1803 #define Q6V64_CREATE_H(h3, h2, h1, h0) \
1804 __extension__({ \
1805 union { \
1806 long long d; \
1807 short h[4]; \
1808 } _Q6V64_internal_union; \
1809 _Q6V64_internal_union.h[0] = (h0); \
1810 _Q6V64_internal_union.h[1] = (h1); \
1811 _Q6V64_internal_union.h[2] = (h2); \
1812 _Q6V64_internal_union.h[3] = (h3); \
1813 _Q6V64_internal_union.d; \
1816 #else /* !__qdsp6__ */
1818 #define Q6V64_CREATE_H(h3, h2, h1, h0) \
1819 ((((Q6Vect64)(h3)) << 48LL) | (((Q6Vect64)((h2) & 0xffff)) << 32LL) | \
1820 (((Q6Vect64)((h1) & 0xffff)) << 16LL) | ((Q6Vect64)((h0) & 0xffff)))
1822 #endif /* !__qdsp6__ */
1824 /* Create from bytes */
1826 #ifdef __qdsp6__
1828 #define Q6V64_CREATE_B(b7, b6, b5, b4, b3, b2, b1, b0) \
1829 __extension__({ \
1830 union { \
1831 long long d; \
1832 char b[8]; \
1833 } _Q6V64_internal_union; \
1834 _Q6V64_internal_union.b[0] = (b0); \
1835 _Q6V64_internal_union.b[1] = (b1); \
1836 _Q6V64_internal_union.b[2] = (b2); \
1837 _Q6V64_internal_union.b[3] = (b3); \
1838 _Q6V64_internal_union.b[4] = (b4); \
1839 _Q6V64_internal_union.b[5] = (b5); \
1840 _Q6V64_internal_union.b[6] = (b6); \
1841 _Q6V64_internal_union.b[7] = (b7); \
1842 _Q6V64_internal_union.d; \
1845 #else /* !__qdsp6__ */
1847 #define Q6V64_CREATE_B(b7, b6, b5, b4, b3, b2, b1, b0) \
1848 ((((Q6Vect64)(b7)) << 56LL) | (((Q6Vect64)((b6) & 0xff)) << 48LL) | \
1849 (((Q6Vect64)((b5) & 0xff)) << 40LL) | (((Q6Vect64)((b4) & 0xff)) << 32LL) | \
1850 (((Q6Vect64)((b3) & 0xff)) << 24LL) | (((Q6Vect64)((b2) & 0xff)) << 16LL) | \
1851 (((Q6Vect64)((b1) & 0xff)) << 8LL) | ((Q6Vect64)((b0) & 0xff)))
1853 #endif /* !__qdsp6__ */
1855 #ifdef __cplusplus
1857 class Q6Vect64C {
1858 public:
1859 // Constructors
1860 Q6Vect64C(long long d = 0) : data(d) {};
1861 Q6Vect64C(int w1, int w0) : data(Q6V64_CREATE_W(w1, w0)) {};
1862 Q6Vect64C(short h3, short h2, short h1, short h0)
1863 : data(Q6V64_CREATE_H(h3, h2, h1, h0)) {};
1864 Q6Vect64C(signed char b7, signed char b6, signed char b5, signed char b4,
1865 signed char b3, signed char b2, signed char b1, signed char b0)
1866 : data(Q6V64_CREATE_B(b7, b6, b5, b4, b3, b2, b1, b0)) {};
1867 Q6Vect64C(const Q6Vect64C &v) : data(v.data) {};
1869 Q6Vect64C &operator=(const Q6Vect64C &v) {
1870 data = v.data;
1871 return *this;
1874 operator long long() {
1875 return data;
1878 // Extract doubleword methods
1879 long long D(void) {
1880 return Q6V64_GET_D(data);
1882 unsigned long long UD(void) {
1883 return Q6V64_GET_UD(data);
1886 // Extract word methods
1887 int W0(void) {
1888 return Q6V64_GET_W0(data);
1890 int W1(void) {
1891 return Q6V64_GET_W1(data);
1893 unsigned int UW0(void) {
1894 return Q6V64_GET_UW0(data);
1896 unsigned int UW1(void) {
1897 return Q6V64_GET_UW1(data);
1900 // Extract half word methods
1901 short H0(void) {
1902 return Q6V64_GET_H0(data);
1904 short H1(void) {
1905 return Q6V64_GET_H1(data);
1907 short H2(void) {
1908 return Q6V64_GET_H2(data);
1910 short H3(void) {
1911 return Q6V64_GET_H3(data);
1913 unsigned short UH0(void) {
1914 return Q6V64_GET_UH0(data);
1916 unsigned short UH1(void) {
1917 return Q6V64_GET_UH1(data);
1919 unsigned short UH2(void) {
1920 return Q6V64_GET_UH2(data);
1922 unsigned short UH3(void) {
1923 return Q6V64_GET_UH3(data);
1926 // Extract byte methods
1927 signed char B0(void) {
1928 return Q6V64_GET_B0(data);
1930 signed char B1(void) {
1931 return Q6V64_GET_B1(data);
1933 signed char B2(void) {
1934 return Q6V64_GET_B2(data);
1936 signed char B3(void) {
1937 return Q6V64_GET_B3(data);
1939 signed char B4(void) {
1940 return Q6V64_GET_B4(data);
1942 signed char B5(void) {
1943 return Q6V64_GET_B5(data);
1945 signed char B6(void) {
1946 return Q6V64_GET_B6(data);
1948 signed char B7(void) {
1949 return Q6V64_GET_B7(data);
1951 unsigned char UB0(void) {
1952 return Q6V64_GET_UB0(data);
1954 unsigned char UB1(void) {
1955 return Q6V64_GET_UB1(data);
1957 unsigned char UB2(void) {
1958 return Q6V64_GET_UB2(data);
1960 unsigned char UB3(void) {
1961 return Q6V64_GET_UB3(data);
1963 unsigned char UB4(void) {
1964 return Q6V64_GET_UB4(data);
1966 unsigned char UB5(void) {
1967 return Q6V64_GET_UB5(data);
1969 unsigned char UB6(void) {
1970 return Q6V64_GET_UB6(data);
1972 unsigned char UB7(void) {
1973 return Q6V64_GET_UB7(data);
1976 // NOTE: All set methods return a Q6Vect64C type
1978 // Set doubleword method
1979 Q6Vect64C D(long long d) {
1980 return Q6Vect64C(Q6V64_PUT_D(data, d));
1983 // Set word methods
1984 Q6Vect64C W0(int w) {
1985 return Q6Vect64C(Q6V64_PUT_W0(data, w));
1987 Q6Vect64C W1(int w) {
1988 return Q6Vect64C(Q6V64_PUT_W1(data, w));
1991 // Set half word methods
1992 Q6Vect64C H0(short h) {
1993 return Q6Vect64C(Q6V64_PUT_H0(data, h));
1995 Q6Vect64C H1(short h) {
1996 return Q6Vect64C(Q6V64_PUT_H1(data, h));
1998 Q6Vect64C H2(short h) {
1999 return Q6Vect64C(Q6V64_PUT_H2(data, h));
2001 Q6Vect64C H3(short h) {
2002 return Q6Vect64C(Q6V64_PUT_H3(data, h));
2005 // Set byte methods
2006 Q6Vect64C B0(signed char b) {
2007 return Q6Vect64C(Q6V64_PUT_B0(data, b));
2009 Q6Vect64C B1(signed char b) {
2010 return Q6Vect64C(Q6V64_PUT_B1(data, b));
2012 Q6Vect64C B2(signed char b) {
2013 return Q6Vect64C(Q6V64_PUT_B2(data, b));
2015 Q6Vect64C B3(signed char b) {
2016 return Q6Vect64C(Q6V64_PUT_B3(data, b));
2018 Q6Vect64C B4(signed char b) {
2019 return Q6Vect64C(Q6V64_PUT_B4(data, b));
2021 Q6Vect64C B5(signed char b) {
2022 return Q6Vect64C(Q6V64_PUT_B5(data, b));
2024 Q6Vect64C B6(signed char b) {
2025 return Q6Vect64C(Q6V64_PUT_B6(data, b));
2027 Q6Vect64C B7(signed char b) {
2028 return Q6Vect64C(Q6V64_PUT_B7(data, b));
2031 private:
2032 long long data;
2035 #endif /* __cplusplus */
2037 /* 32 Bit Vectors */
2039 typedef int Q6Vect32;
2041 /* Extract word macros */
2043 #define Q6V32_GET_W(v) (v)
2044 #define Q6V32_GET_UW(v) ((unsigned int)(v))
2046 /* Extract half word macros */
2048 #define Q6V32_GET_H0(v) \
2049 __extension__({ \
2050 union { \
2051 int w; \
2052 short h[2]; \
2053 } _Q6V32_internal_union; \
2054 _Q6V32_internal_union.w = (v); \
2055 _Q6V32_internal_union.h[0]; \
2057 #define Q6V32_GET_H1(v) \
2058 __extension__({ \
2059 union { \
2060 int w; \
2061 short h[2]; \
2062 } _Q6V32_internal_union; \
2063 _Q6V32_internal_union.w = (v); \
2064 _Q6V32_internal_union.h[1]; \
2066 #define Q6V32_GET_UH0(v) \
2067 __extension__({ \
2068 union { \
2069 int w; \
2070 unsigned short uh[2]; \
2071 } _Q6V32_internal_union; \
2072 _Q6V32_internal_union.w = (v); \
2073 _Q6V32_internal_union.uh[0]; \
2075 #define Q6V32_GET_UH1(v) \
2076 __extension__({ \
2077 union { \
2078 int w; \
2079 unsigned short uh[2]; \
2080 } _Q6V32_internal_union; \
2081 _Q6V32_internal_union.w = (v); \
2082 _Q6V32_internal_union.uh[1]; \
2085 /* Extract byte macros */
2087 #define Q6V32_GET_B0(v) \
2088 __extension__({ \
2089 union { \
2090 int w; \
2091 signed char b[4]; \
2092 } _Q6V32_internal_union; \
2093 _Q6V32_internal_union.w = (v); \
2094 _Q6V32_internal_union.b[0]; \
2096 #define Q6V32_GET_B1(v) \
2097 __extension__({ \
2098 union { \
2099 int w; \
2100 signed char b[4]; \
2101 } _Q6V32_internal_union; \
2102 _Q6V32_internal_union.w = (v); \
2103 _Q6V32_internal_union.b[1]; \
2105 #define Q6V32_GET_B2(v) \
2106 __extension__({ \
2107 union { \
2108 int w; \
2109 signed char b[4]; \
2110 } _Q6V32_internal_union; \
2111 _Q6V32_internal_union.w = (v); \
2112 _Q6V32_internal_union.b[2]; \
2114 #define Q6V32_GET_B3(v) \
2115 __extension__({ \
2116 union { \
2117 int w; \
2118 signed char b[4]; \
2119 } _Q6V32_internal_union; \
2120 _Q6V32_internal_union.w = (v); \
2121 _Q6V32_internal_union.b[3]; \
2123 #define Q6V32_GET_UB0(v) \
2124 __extension__({ \
2125 union { \
2126 int w; \
2127 unsigned char ub[4]; \
2128 } _Q6V32_internal_union; \
2129 _Q6V32_internal_union.w = (v); \
2130 _Q6V32_internal_union.ub[0]; \
2132 #define Q6V32_GET_UB1(v) \
2133 __extension__({ \
2134 union { \
2135 int w; \
2136 unsigned char ub[4]; \
2137 } _Q6V32_internal_union; \
2138 _Q6V32_internal_union.w = (v); \
2139 _Q6V32_internal_union.ub[1]; \
2141 #define Q6V32_GET_UB2(v) \
2142 __extension__({ \
2143 union { \
2144 int w; \
2145 unsigned char ub[4]; \
2146 } _Q6V32_internal_union; \
2147 _Q6V32_internal_union.w = (v); \
2148 _Q6V32_internal_union.ub[2]; \
2150 #define Q6V32_GET_UB3(v) \
2151 __extension__({ \
2152 union { \
2153 int w; \
2154 unsigned char ub[4]; \
2155 } _Q6V32_internal_union; \
2156 _Q6V32_internal_union.w = (v); \
2157 _Q6V32_internal_union.ub[3]; \
2160 /* NOTE: All set macros return a Q6Vect32 type */
2162 /* Set word macro */
2164 #define Q6V32_PUT_W(v, new) (new)
2166 /* Set half word macros */
2168 #ifdef __qdsp6__
2170 #define Q6V32_PUT_H0(v, new) \
2171 __extension__({ \
2172 union { \
2173 int w; \
2174 short h[2]; \
2175 } _Q6V32_internal_union; \
2176 _Q6V32_internal_union.w = (v); \
2177 _Q6V32_internal_union.h[0] = (new); \
2178 _Q6V32_internal_union.w; \
2180 #define Q6V32_PUT_H1(v, new) \
2181 __extension__({ \
2182 union { \
2183 int w; \
2184 short h[2]; \
2185 } _Q6V32_internal_union; \
2186 _Q6V32_internal_union.w = (v); \
2187 _Q6V32_internal_union.h[1] = (new); \
2188 _Q6V32_internal_union.w; \
2191 #else /* !__qdsp6__ */
2193 #define Q6V32_PUT_H0(v, new) \
2194 (((v) & 0xffff0000) | ((Q6Vect32)((unsigned short)(new))))
2195 #define Q6V32_PUT_H1(v, new) (((v) & 0x0000ffff) | (((Q6Vect32)(new)) << 16))
2197 #endif /* !__qdsp6__ */
2199 /* Set byte macros */
2201 #ifdef __qdsp6__
2203 #define Q6V32_PUT_B0(v, new) \
2204 __extension__({ \
2205 union { \
2206 int w; \
2207 char b[4]; \
2208 } _Q6V32_internal_union; \
2209 _Q6V32_internal_union.w = (v); \
2210 _Q6V32_internal_union.b[0] = (new); \
2211 _Q6V32_internal_union.w; \
2213 #define Q6V32_PUT_B1(v, new) \
2214 __extension__({ \
2215 union { \
2216 int w; \
2217 char b[4]; \
2218 } _Q6V32_internal_union; \
2219 _Q6V32_internal_union.w = (v); \
2220 _Q6V32_internal_union.b[1] = (new); \
2221 _Q6V32_internal_union.w; \
2223 #define Q6V32_PUT_B2(v, new) \
2224 __extension__({ \
2225 union { \
2226 int w; \
2227 char b[4]; \
2228 } _Q6V32_internal_union; \
2229 _Q6V32_internal_union.w = (v); \
2230 _Q6V32_internal_union.b[2] = (new); \
2231 _Q6V32_internal_union.w; \
2233 #define Q6V32_PUT_B3(v, new) \
2234 __extension__({ \
2235 union { \
2236 int w; \
2237 char b[4]; \
2238 } _Q6V32_internal_union; \
2239 _Q6V32_internal_union.w = (v); \
2240 _Q6V32_internal_union.b[3] = (new); \
2241 _Q6V32_internal_union.w; \
2244 #else /* !__qdsp6__ */
2246 #define Q6V32_PUT_B0(v, new) \
2247 (((v) & 0xffffff00) | ((Q6Vect32)((unsigned char)(new))))
2248 #define Q6V32_PUT_B1(v, new) \
2249 (((v) & 0xffff00ff) | (((Q6Vect32)((unsigned char)(new))) << 8))
2250 #define Q6V32_PUT_B2(v, new) \
2251 (((v) & 0xff00ffff) | (((Q6Vect32)((unsigned char)(new))) << 16))
2252 #define Q6V32_PUT_B3(v, new) (((v) & 0x00ffffff) | (((Q6Vect32)(new)) << 24))
2254 #endif /* !__qdsp6__ */
2256 /* NOTE: All create macros return a Q6Vect32 type */
2258 /* Create from a word */
2260 #define Q6V32_CREATE_W(w) (w)
2262 /* Create from half words */
2264 #ifdef __qdsp6__
2266 #define Q6V32_CREATE_H(h1, h0) \
2267 __extension__({ \
2268 union { \
2269 long long d; \
2270 short h[2]; \
2271 } _Q6V32_internal_union; \
2272 _Q6V32_internal_union.h[0] = (h0); \
2273 _Q6V32_internal_union.h[1] = (h1); \
2274 _Q6V32_internal_union.d; \
2277 #else /* !__qdsp6__ */
2279 #define Q6V32_CREATE_H(h1, h0) \
2280 ((((Q6Vect32)(h1)) << 16) | ((Q6Vect32)((h0) & 0xffff)))
2282 #endif /* !__qdsp6__ */
2284 /* Create from bytes */
2285 #ifdef __qdsp6__
2287 #define Q6V32_CREATE_B(b3, b2, b1, b0) \
2288 __extension__({ \
2289 union { \
2290 long long d; \
2291 char b[4]; \
2292 } _Q6V32_internal_union; \
2293 _Q6V32_internal_union.b[0] = (b0); \
2294 _Q6V32_internal_union.b[1] = (b1); \
2295 _Q6V32_internal_union.b[2] = (b2); \
2296 _Q6V32_internal_union.b[3] = (b3); \
2297 _Q6V32_internal_union.d; \
2300 #else /* !__qdsp6__ */
2302 #define Q6V32_CREATE_B(b3, b2, b1, b0) \
2303 ((((Q6Vect32)(b3)) << 24) | (((Q6Vect32)((b2) & 0xff)) << 16) | \
2304 (((Q6Vect32)((b1) & 0xff)) << 8) | ((Q6Vect32)((b0) & 0xff)))
2306 #endif /* !__qdsp6__ */
2308 #ifdef __cplusplus
2310 class Q6Vect32C {
2311 public:
2312 // Constructors
2313 Q6Vect32C(int w = 0) : data(w) {};
2314 Q6Vect32C(short h1, short h0) : data(Q6V32_CREATE_H(h1, h0)) {};
2315 Q6Vect32C(signed char b3, signed char b2, signed char b1, signed char b0)
2316 : data(Q6V32_CREATE_B(b3, b2, b1, b0)) {};
2317 Q6Vect32C(const Q6Vect32C &v) : data(v.data) {};
2319 Q6Vect32C &operator=(const Q6Vect32C &v) {
2320 data = v.data;
2321 return *this;
2324 operator int() {
2325 return data;
2328 // Extract word methods
2329 int W(void) {
2330 return Q6V32_GET_W(data);
2332 unsigned int UW(void) {
2333 return Q6V32_GET_UW(data);
2336 // Extract half word methods
2337 short H0(void) {
2338 return Q6V32_GET_H0(data);
2340 short H1(void) {
2341 return Q6V32_GET_H1(data);
2343 unsigned short UH0(void) {
2344 return Q6V32_GET_UH0(data);
2346 unsigned short UH1(void) {
2347 return Q6V32_GET_UH1(data);
2350 // Extract byte methods
2351 signed char B0(void) {
2352 return Q6V32_GET_B0(data);
2354 signed char B1(void) {
2355 return Q6V32_GET_B1(data);
2357 signed char B2(void) {
2358 return Q6V32_GET_B2(data);
2360 signed char B3(void) {
2361 return Q6V32_GET_B3(data);
2363 unsigned char UB0(void) {
2364 return Q6V32_GET_UB0(data);
2366 unsigned char UB1(void) {
2367 return Q6V32_GET_UB1(data);
2369 unsigned char UB2(void) {
2370 return Q6V32_GET_UB2(data);
2372 unsigned char UB3(void) {
2373 return Q6V32_GET_UB3(data);
2376 // NOTE: All set methods return a Q6Vect32C type
2378 // Set word method
2379 Q6Vect32C W(int w) {
2380 return Q6Vect32C(Q6V32_PUT_W(data, w));
2383 // Set half word methods
2384 Q6Vect32C H0(short h) {
2385 return Q6Vect32C(Q6V32_PUT_H0(data, h));
2387 Q6Vect32C H1(short h) {
2388 return Q6Vect32C(Q6V32_PUT_H1(data, h));
2391 // Set byte methods
2392 Q6Vect32C B0(signed char b) {
2393 return Q6Vect32C(Q6V32_PUT_B0(data, b));
2395 Q6Vect32C B1(signed char b) {
2396 return Q6Vect32C(Q6V32_PUT_B1(data, b));
2398 Q6Vect32C B2(signed char b) {
2399 return Q6Vect32C(Q6V32_PUT_B2(data, b));
2401 Q6Vect32C B3(signed char b) {
2402 return Q6Vect32C(Q6V32_PUT_B3(data, b));
2405 private:
2406 int data;
2409 #endif /* __cplusplus */
2411 // V65 Vector types
2412 #if __HVX_ARCH__ >= 65
2413 #if defined __HVX__ && (__HVX_LENGTH__ == 128)
2414 typedef long Q6VecPred128 __attribute__((__vector_size__(128)))
2415 __attribute__((aligned(128)));
2417 typedef long Q6Vect1024 __attribute__((__vector_size__(128)))
2418 __attribute__((aligned(128)));
2420 typedef long Q6Vect2048 __attribute__((__vector_size__(256)))
2421 __attribute__((aligned(256)));
2423 #else /* defined __HVX__ && (__HVX_LENGTH__ == 128) */
2424 #if defined __HVX__ && (__HVX_LENGTH__ == 64)
2425 typedef long Q6VecPred64 __attribute__((__vector_size__(64)))
2426 __attribute__((aligned(64)));
2428 typedef long Q6Vect512 __attribute__((__vector_size__(64)))
2429 __attribute__((aligned(64)));
2431 typedef long Q6Vect1024 __attribute__((__vector_size__(128)))
2432 __attribute__((aligned(128)));
2434 #endif /* defined __HVX__ && (__HVX_LENGTH__ == 64) */
2435 #endif /* defined __HVX__ && (__HVX_LENGTH__ == 128) */
2436 #endif /* __HVX_ARCH__ >= 65 */
2438 /* Predicates */
2440 typedef int Q6Pred;
2443 #ifdef __HVX__
2445 // Extract HVX VectorPair macro.
2446 #define HEXAGON_HVX_GET_W(v) (v)
2448 // Extract HVX Vector macros.
2449 #define HEXAGON_HVX_GET_V0(v) \
2450 __extension__({ \
2451 union { \
2452 HVX_VectorPair W; \
2453 HVX_Vector V[2]; \
2454 } _HEXAGON_HVX_internal_union; \
2455 _HEXAGON_HVX_internal_union.W = (v); \
2456 _HEXAGON_HVX_internal_union.V[0]; \
2458 #define HEXAGON_HVX_GET_V1(v) \
2459 __extension__({ \
2460 union { \
2461 HVX_VectorPair W; \
2462 HVX_Vector V[2]; \
2463 } _HEXAGON_HVX_internal_union; \
2464 _HEXAGON_HVX_internal_union.W = (v); \
2465 _HEXAGON_HVX_internal_union.V[1]; \
2467 #define HEXAGON_HVX_GET_P(v) \
2468 __extension__({ \
2469 union { \
2470 HVX_VectorPair W; \
2471 HVX_VectorPred P[2]; \
2472 } _HEXAGON_HVX_internal_union; \
2473 _HEXAGON_HVX_internal_union.W = (v); \
2474 _HEXAGON_HVX_internal_union.P[0]; \
2477 // Set HVX VectorPair macro.
2478 #define HEXAGON_HVX_PUT_W(v, new) (new)
2480 // Set HVX Vector macros.
2481 #define HEXAGON_HVX_PUT_V0(v, new) \
2482 __extension__({ \
2483 union { \
2484 HVX_VectorPair W; \
2485 HVX_Vector V[2]; \
2486 } _HEXAGON_HVX_internal_union; \
2487 _HEXAGON_HVX_internal_union.W = (v); \
2488 _HEXAGON_HVX_internal_union.V[0] = (new); \
2489 _HEXAGON_HVX_internal_union.W; \
2492 #define HEXAGON_HVX_PUT_V1(v, new) \
2493 __extension__({ \
2494 union { \
2495 HVX_VectorPair W; \
2496 HVX_Vector V[2]; \
2497 } _HEXAGON_HVX_internal_union; \
2498 _HEXAGON_HVX_internal_union.W = (v); \
2499 _HEXAGON_HVX_internal_union.V[1] = (new); \
2500 _HEXAGON_HVX_internal_union.W; \
2503 #define HEXAGON_HVX_PUT_P(v, new) \
2504 __extension__({ \
2505 union { \
2506 HVX_VectorPair W; \
2507 HVX_VectorPred P[2]; \
2508 } _HEXAGON_HVX_internal_union; \
2509 _HEXAGON_HVX_internal_union.W = (v); \
2510 _HEXAGON_HVX_internal_union.P[0] = (new); \
2511 _HEXAGON_HVX_internal_union.W; \
2515 #define HEXAGON_HVX_CREATE_W(v1, v0) \
2516 __extension__({ \
2517 union { \
2518 HVX_VectorPair W; \
2519 HVX_Vector V[2]; \
2520 } _HEXAGON_HVX_internal_union; \
2521 _HEXAGON_HVX_internal_union.V[0] = (v0); \
2522 _HEXAGON_HVX_internal_union.V[1] = (v1); \
2523 _HEXAGON_HVX_internal_union.W; \
2526 #ifdef __cplusplus
2528 class HVX_Vect {
2529 public:
2530 // Constructors.
2531 // Default.
2532 HVX_Vect() : data(Q6_W_vcombine_VV(Q6_V_vzero(), Q6_V_vzero())){};
2534 // Custom constructors.
2535 HVX_Vect(HVX_VectorPair W) : data(W){};
2536 HVX_Vect(HVX_Vector v1, HVX_Vector v0) : data(HEXAGON_HVX_CREATE_W(v1, v0)){};
2538 // Copy constructor.
2539 HVX_Vect(const HVX_Vect &W) = default;
2541 // Move constructor.
2542 HVX_Vect(HVX_Vect &&W) = default;
2544 // Assignment operator.
2545 HVX_Vect &operator=(const HVX_Vect &W) = default;
2547 operator HVX_VectorPair() { return data; };
2549 // Extract VectorPair method.
2550 HVX_VectorPair W(void) { return HEXAGON_HVX_GET_W(data); };
2552 // Extract Vector methods.
2553 HVX_Vector V0(void) { return HEXAGON_HVX_GET_V0(data); };
2554 HVX_Vector V1(void) { return HEXAGON_HVX_GET_V1(data); };
2555 HVX_VectorPred P(void) { return HEXAGON_HVX_GET_P(data); };
2557 // NOTE: All set methods return a HVX_Vect type.
2558 // Set HVX VectorPair method.
2559 HVX_Vect W(HVX_VectorPair w) { return HVX_Vect(HEXAGON_HVX_PUT_W(data, w)); };
2561 // Set HVX Vector methods.
2562 HVX_Vect V0(HVX_Vector v) { return HVX_Vect(HEXAGON_HVX_PUT_V0(data, v)); };
2563 HVX_Vect V1(HVX_Vector v) { return HVX_Vect(HEXAGON_HVX_PUT_V1(data, v)); };
2564 HVX_Vect P(HVX_VectorPred p) { return HVX_Vect(HEXAGON_HVX_PUT_P(data, p)); };
2566 private:
2567 HVX_VectorPair data;
2570 #endif /* __cplusplus */
2571 #endif /* __HVX__ */
2573 #define HEXAGON_UDMA_DM0_STATUS_IDLE 0x00000000
2574 #define HEXAGON_UDMA_DM0_STATUS_RUN 0x00000001
2575 #define HEXAGON_UDMA_DM0_STATUS_ERROR 0x00000002
2576 #define HEXAGON_UDMA_DESC_DSTATE_INCOMPLETE 0
2577 #define HEXAGON_UDMA_DESC_DSTATE_COMPLETE 1
2578 #define HEXAGON_UDMA_DESC_ORDER_NOORDER 0
2579 #define HEXAGON_UDMA_DESC_ORDER_ORDER 1
2580 #define HEXAGON_UDMA_DESC_BYPASS_OFF 0
2581 #define HEXAGON_UDMA_DESC_BYPASS_ON 1
2582 #define HEXAGON_UDMA_DESC_COMP_NONE 0
2583 #define HEXAGON_UDMA_DESC_COMP_DLBC 1
2584 #define HEXAGON_UDMA_DESC_DESCTYPE_TYPE0 0
2585 #define HEXAGON_UDMA_DESC_DESCTYPE_TYPE1 1
2587 typedef struct hexagon_udma_descriptor_type0_s
2589 void *next;
2590 unsigned int length:24;
2591 unsigned int desctype:2;
2592 unsigned int dstcomp:1;
2593 unsigned int srccomp:1;
2594 unsigned int dstbypass:1;
2595 unsigned int srcbypass:1;
2596 unsigned int order:1;
2597 unsigned int dstate:1;
2598 void *src;
2599 void *dst;
2600 } hexagon_udma_descriptor_type0_t;
2602 typedef struct hexagon_udma_descriptor_type1_s
2604 void *next;
2605 unsigned int length:24;
2606 unsigned int desctype:2;
2607 unsigned int dstcomp:1;
2608 unsigned int srccomp:1;
2609 unsigned int dstbypass:1;
2610 unsigned int srcbypass:1;
2611 unsigned int order:1;
2612 unsigned int dstate:1;
2613 void *src;
2614 void *dst;
2615 unsigned int allocation:28;
2616 unsigned int padding:4;
2617 unsigned int roiwidth:16;
2618 unsigned int roiheight:16;
2619 unsigned int srcstride:16;
2620 unsigned int dststride:16;
2621 unsigned int srcwidthoffset:16;
2622 unsigned int dstwidthoffset:16;
2623 } hexagon_udma_descriptor_type1_t;
2625 #endif /* !HEXAGON_TYPES_H */