2 /* autogenerated from test.orc */
5 #include <orc-test/orctest.h>
12 #ifndef _ORC_INTEGER_TYPEDEFS_
13 #define _ORC_INTEGER_TYPEDEFS_
14 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
16 typedef int8_t orc_int8;
17 typedef int16_t orc_int16;
18 typedef int32_t orc_int32;
19 typedef int64_t orc_int64;
20 typedef uint8_t orc_uint8;
21 typedef uint16_t orc_uint16;
22 typedef uint32_t orc_uint32;
23 typedef uint64_t orc_uint64;
24 #define ORC_UINT64_C(x) UINT64_C(x)
25 #elif defined(_MSC_VER)
26 typedef signed __int8 orc_int8;
27 typedef signed __int16 orc_int16;
28 typedef signed __int32 orc_int32;
29 typedef signed __int64 orc_int64;
30 typedef unsigned __int8 orc_uint8;
31 typedef unsigned __int16 orc_uint16;
32 typedef unsigned __int32 orc_uint32;
33 typedef unsigned __int64 orc_uint64;
34 #define ORC_UINT64_C(x) (x##Ui64)
37 typedef signed char orc_int8;
38 typedef short orc_int16;
39 typedef int orc_int32;
40 typedef unsigned char orc_uint8;
41 typedef unsigned short orc_uint16;
42 typedef unsigned int orc_uint32;
43 #if INT_MAX == LONG_MAX
44 typedef long long orc_int64;
45 typedef unsigned long long orc_uint64;
46 #define ORC_UINT64_C(x) (x##ULL)
48 typedef long orc_int64;
49 typedef unsigned long orc_uint64;
50 #define ORC_UINT64_C(x) (x##UL)
53 typedef union { orc_int16 i; orc_int8 x2[2]; } orc_union16;
54 typedef union { orc_int32 i; float f; orc_int16 x2[2]; orc_int8 x4[4]; } orc_union32;
55 typedef union { orc_int64 i; double f; orc_int32 x2[2]; float x2f[2]; orc_int16 x4[4]; } orc_union64;
58 /* begin Orc C target preamble */
59 #define ORC_CLAMP(x,a,b) ((x)<(a) ? (a) : ((x)>(b) ? (b) : (x)))
60 #define ORC_ABS(a) ((a)<0 ? -(a) : (a))
61 #define ORC_MIN(a,b) ((a)<(b) ? (a) : (b))
62 #define ORC_MAX(a,b) ((a)>(b) ? (a) : (b))
63 #define ORC_SB_MAX 127
64 #define ORC_SB_MIN (-1-ORC_SB_MAX)
65 #define ORC_UB_MAX 255
67 #define ORC_SW_MAX 32767
68 #define ORC_SW_MIN (-1-ORC_SW_MAX)
69 #define ORC_UW_MAX 65535
71 #define ORC_SL_MAX 2147483647
72 #define ORC_SL_MIN (-1-ORC_SL_MAX)
73 #define ORC_UL_MAX 4294967295U
75 #define ORC_CLAMP_SB(x) ORC_CLAMP(x,ORC_SB_MIN,ORC_SB_MAX)
76 #define ORC_CLAMP_UB(x) ORC_CLAMP(x,ORC_UB_MIN,ORC_UB_MAX)
77 #define ORC_CLAMP_SW(x) ORC_CLAMP(x,ORC_SW_MIN,ORC_SW_MAX)
78 #define ORC_CLAMP_UW(x) ORC_CLAMP(x,ORC_UW_MIN,ORC_UW_MAX)
79 #define ORC_CLAMP_SL(x) ORC_CLAMP(x,ORC_SL_MIN,ORC_SL_MAX)
80 #define ORC_CLAMP_UL(x) ORC_CLAMP(x,ORC_UL_MIN,ORC_UL_MAX)
81 #define ORC_SWAP_W(x) ((((x)&0xff)<<8) | (((x)&0xff00)>>8))
82 #define ORC_SWAP_L(x) ((((x)&0xff)<<24) | (((x)&0xff00)<<8) | (((x)&0xff0000)>>8) | (((x)&0xff000000)>>24))
83 #define ORC_SWAP_Q(x) ((((x)&ORC_UINT64_C(0xff))<<56) | (((x)&ORC_UINT64_C(0xff00))<<40) | (((x)&ORC_UINT64_C(0xff0000))<<24) | (((x)&ORC_UINT64_C(0xff000000))<<8) | (((x)&ORC_UINT64_C(0xff00000000))>>8) | (((x)&ORC_UINT64_C(0xff0000000000))>>24) | (((x)&ORC_UINT64_C(0xff000000000000))>>40) | (((x)&ORC_UINT64_C(0xff00000000000000))>>56))
84 #define ORC_PTR_OFFSET(ptr,offset) ((void *)(((unsigned char *)(ptr)) + (offset)))
85 #define ORC_DENORMAL(x) ((x) & ((((x)&0x7f800000) == 0) ? 0xff800000 : 0xffffffff))
86 #define ORC_ISNAN(x) ((((x)&0x7f800000) == 0x7f800000) && (((x)&0x007fffff) != 0))
87 #define ORC_DENORMAL_DOUBLE(x) ((x) & ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == 0) ? ORC_UINT64_C(0xfff0000000000000) : ORC_UINT64_C(0xffffffffffffffff)))
88 #define ORC_ISNAN_DOUBLE(x) ((((x)&ORC_UINT64_C(0x7ff0000000000000)) == ORC_UINT64_C(0x7ff0000000000000)) && (((x)&ORC_UINT64_C(0x000fffffffffffff)) != 0))
89 #if defined(__STDC_VERSION__) && __STDC_VERSION__ >= 199901L
90 #define ORC_RESTRICT restrict
91 #elif defined(__GNUC__) && __GNUC__ >= 4
92 #define ORC_RESTRICT __restrict__
96 /* end Orc C target preamble */
99 /* orc_add2_rshift_add_s16_22_op */
101 _backup_orc_add2_rshift_add_s16_22_op (OrcExecutor * ORC_RESTRICT ex)
105 orc_union16 * ORC_RESTRICT ptr0;
106 const orc_union16 * ORC_RESTRICT ptr4;
107 const orc_union16 * ORC_RESTRICT ptr5;
108 const orc_union16 * ORC_RESTRICT ptr6;
118 ptr0 = (orc_union16 *)ex->arrays[0];
119 ptr4 = (orc_union16 *)ex->arrays[4];
120 ptr5 = (orc_union16 *)ex->arrays[5];
121 ptr6 = (orc_union16 *)ex->arrays[6];
124 var35.i = 0x00000002; /* 2 or 9.88131e-324f */
126 for (i = 0; i < n; i++) {
132 var38.i = var33.i + var34.i;
134 var39.i = var38.i + var35.i;
136 var40.i = var39.i >> 2;
140 var37.i = var36.i + var40.i;
147 /* orc_add2_rshift_add_s16_22 */
149 _backup_orc_add2_rshift_add_s16_22 (OrcExecutor * ORC_RESTRICT ex)
153 orc_union16 * ORC_RESTRICT ptr0;
154 const orc_union16 * ORC_RESTRICT ptr4;
155 const orc_union16 * ORC_RESTRICT ptr5;
165 ptr0 = (orc_union16 *)ex->arrays[0];
166 ptr4 = (orc_union16 *)ex->arrays[4];
167 ptr5 = (orc_union16 *)ex->arrays[5];
170 var35.i = 0x00000002; /* 2 or 9.88131e-324f */
172 for (i = 0; i < n; i++) {
178 var38.i = var33.i + var34.i;
180 var39.i = var38.i + var35.i;
182 var40.i = var39.i >> 2;
186 var37.i = var36.i + var40.i;
193 /* orc_add2_rshift_sub_s16_22_op */
195 _backup_orc_add2_rshift_sub_s16_22_op (OrcExecutor * ORC_RESTRICT ex)
199 orc_union16 * ORC_RESTRICT ptr0;
200 const orc_union16 * ORC_RESTRICT ptr4;
201 const orc_union16 * ORC_RESTRICT ptr5;
202 const orc_union16 * ORC_RESTRICT ptr6;
212 ptr0 = (orc_union16 *)ex->arrays[0];
213 ptr4 = (orc_union16 *)ex->arrays[4];
214 ptr5 = (orc_union16 *)ex->arrays[5];
215 ptr6 = (orc_union16 *)ex->arrays[6];
218 var35.i = 0x00000002; /* 2 or 9.88131e-324f */
220 for (i = 0; i < n; i++) {
226 var38.i = var33.i + var34.i;
228 var39.i = var38.i + var35.i;
230 var40.i = var39.i >> 2;
234 var37.i = var36.i - var40.i;
241 /* orc_add2_rshift_sub_s16_22 */
243 _backup_orc_add2_rshift_sub_s16_22 (OrcExecutor * ORC_RESTRICT ex)
247 orc_union16 * ORC_RESTRICT ptr0;
248 const orc_union16 * ORC_RESTRICT ptr4;
249 const orc_union16 * ORC_RESTRICT ptr5;
259 ptr0 = (orc_union16 *)ex->arrays[0];
260 ptr4 = (orc_union16 *)ex->arrays[4];
261 ptr5 = (orc_union16 *)ex->arrays[5];
264 var35.i = 0x00000002; /* 2 or 9.88131e-324f */
266 for (i = 0; i < n; i++) {
272 var38.i = var33.i + var34.i;
274 var39.i = var38.i + var35.i;
276 var40.i = var39.i >> 2;
280 var37.i = var36.i - var40.i;
287 /* orc_add2_rshift_add_s16_11_op */
289 _backup_orc_add2_rshift_add_s16_11_op (OrcExecutor * ORC_RESTRICT ex)
293 orc_union16 * ORC_RESTRICT ptr0;
294 const orc_union16 * ORC_RESTRICT ptr4;
295 const orc_union16 * ORC_RESTRICT ptr5;
296 const orc_union16 * ORC_RESTRICT ptr6;
303 ptr0 = (orc_union16 *)ex->arrays[0];
304 ptr4 = (orc_union16 *)ex->arrays[4];
305 ptr5 = (orc_union16 *)ex->arrays[5];
306 ptr6 = (orc_union16 *)ex->arrays[6];
309 for (i = 0; i < n; i++) {
315 var37.i = (var33.i + var34.i + 1)>>1;
319 var36.i = var35.i + var37.i;
326 /* orc_add2_rshift_add_s16_11 */
328 _backup_orc_add2_rshift_add_s16_11 (OrcExecutor * ORC_RESTRICT ex)
332 orc_union16 * ORC_RESTRICT ptr0;
333 const orc_union16 * ORC_RESTRICT ptr4;
334 const orc_union16 * ORC_RESTRICT ptr5;
341 ptr0 = (orc_union16 *)ex->arrays[0];
342 ptr4 = (orc_union16 *)ex->arrays[4];
343 ptr5 = (orc_union16 *)ex->arrays[5];
346 for (i = 0; i < n; i++) {
352 var37.i = (var33.i + var34.i + 1)>>1;
356 var36.i = var35.i + var37.i;
363 /* orc_add2_rshift_sub_s16_11_op */
365 _backup_orc_add2_rshift_sub_s16_11_op (OrcExecutor * ORC_RESTRICT ex)
369 orc_union16 * ORC_RESTRICT ptr0;
370 const orc_union16 * ORC_RESTRICT ptr4;
371 const orc_union16 * ORC_RESTRICT ptr5;
372 const orc_union16 * ORC_RESTRICT ptr6;
379 ptr0 = (orc_union16 *)ex->arrays[0];
380 ptr4 = (orc_union16 *)ex->arrays[4];
381 ptr5 = (orc_union16 *)ex->arrays[5];
382 ptr6 = (orc_union16 *)ex->arrays[6];
385 for (i = 0; i < n; i++) {
391 var37.i = (var33.i + var34.i + 1)>>1;
395 var36.i = var35.i - var37.i;
402 /* orc_add2_rshift_sub_s16_11 */
404 _backup_orc_add2_rshift_sub_s16_11 (OrcExecutor * ORC_RESTRICT ex)
408 orc_union16 * ORC_RESTRICT ptr0;
409 const orc_union16 * ORC_RESTRICT ptr4;
410 const orc_union16 * ORC_RESTRICT ptr5;
417 ptr0 = (orc_union16 *)ex->arrays[0];
418 ptr4 = (orc_union16 *)ex->arrays[4];
419 ptr5 = (orc_union16 *)ex->arrays[5];
422 for (i = 0; i < n; i++) {
428 var37.i = (var33.i + var34.i + 1)>>1;
432 var36.i = var35.i - var37.i;
439 /* orc_add_const_rshift_s16_11 */
441 _backup_orc_add_const_rshift_s16_11 (OrcExecutor * ORC_RESTRICT ex)
445 orc_union16 * ORC_RESTRICT ptr0;
446 const orc_union16 * ORC_RESTRICT ptr4;
452 ptr0 = (orc_union16 *)ex->arrays[0];
453 ptr4 = (orc_union16 *)ex->arrays[4];
456 var34.i = 0x00000001; /* 1 or 4.94066e-324f */
458 for (i = 0; i < n; i++) {
462 var36.i = var33.i + var34.i;
464 var35.i = var36.i >> 1;
471 /* orc_add_const_rshift_s16 */
473 _backup_orc_add_const_rshift_s16 (OrcExecutor * ORC_RESTRICT ex)
477 orc_union16 * ORC_RESTRICT ptr0;
483 ptr0 = (orc_union16 *)ex->arrays[0];
486 var34.i = ex->params[24];
488 for (i = 0; i < n; i++) {
492 var36.i = var33.i + var34.i;
494 var35.i = var36.i >> ex->params[25];
503 _backup_orc_add_s16 (OrcExecutor * ORC_RESTRICT ex)
507 orc_union16 * ORC_RESTRICT ptr0;
508 const orc_union16 * ORC_RESTRICT ptr4;
509 const orc_union16 * ORC_RESTRICT ptr5;
514 ptr0 = (orc_union16 *)ex->arrays[0];
515 ptr4 = (orc_union16 *)ex->arrays[4];
516 ptr5 = (orc_union16 *)ex->arrays[5];
519 for (i = 0; i < n; i++) {
525 var34.i = var32.i + var33.i;
534 _backup_orc_add_s16_2d (OrcExecutor * ORC_RESTRICT ex)
539 int m = ex->params[ORC_VAR_A1];
540 orc_union16 * ORC_RESTRICT ptr0;
541 const orc_union16 * ORC_RESTRICT ptr4;
546 for (j = 0; j < m; j++) {
547 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
548 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
551 for (i = 0; i < n; i++) {
557 var34.i = var32.i + var33.i;
565 /* orc_addc_rshift_s16 */
567 _backup_orc_addc_rshift_s16 (OrcExecutor * ORC_RESTRICT ex)
571 orc_union16 * ORC_RESTRICT ptr0;
572 const orc_union16 * ORC_RESTRICT ptr4;
573 const orc_union16 * ORC_RESTRICT ptr5;
579 ptr0 = (orc_union16 *)ex->arrays[0];
580 ptr4 = (orc_union16 *)ex->arrays[4];
581 ptr5 = (orc_union16 *)ex->arrays[5];
584 for (i = 0; i < n; i++) {
590 var36.i = var33.i + var34.i;
592 var35.i = var36.i >> ex->params[24];
599 /* orc_lshift1_s16 */
601 _backup_orc_lshift1_s16 (OrcExecutor * ORC_RESTRICT ex)
605 orc_union16 * ORC_RESTRICT ptr0;
606 const orc_union16 * ORC_RESTRICT ptr4;
610 ptr0 = (orc_union16 *)ex->arrays[0];
611 ptr4 = (orc_union16 *)ex->arrays[4];
614 for (i = 0; i < n; i++) {
618 var33.i = var32.i << 1;
625 /* orc_lshift2_s16 */
627 _backup_orc_lshift2_s16 (OrcExecutor * ORC_RESTRICT ex)
631 orc_union16 * ORC_RESTRICT ptr0;
632 const orc_union16 * ORC_RESTRICT ptr4;
636 ptr0 = (orc_union16 *)ex->arrays[0];
637 ptr4 = (orc_union16 *)ex->arrays[4];
640 for (i = 0; i < n; i++) {
644 var33.i = var32.i << 2;
651 /* orc_lshift_s16_ip */
653 _backup_orc_lshift_s16_ip (OrcExecutor * ORC_RESTRICT ex)
657 orc_union16 * ORC_RESTRICT ptr0;
661 ptr0 = (orc_union16 *)ex->arrays[0];
664 for (i = 0; i < n; i++) {
668 var33.i = var32.i << ex->params[24];
675 /* orc_mas2_add_s16_op */
677 _backup_orc_mas2_add_s16_op (OrcExecutor * ORC_RESTRICT ex)
681 orc_union16 * ORC_RESTRICT ptr0;
682 const orc_union16 * ORC_RESTRICT ptr4;
683 const orc_union16 * ORC_RESTRICT ptr5;
684 const orc_union16 * ORC_RESTRICT ptr6;
697 ptr0 = (orc_union16 *)ex->arrays[0];
698 ptr4 = (orc_union16 *)ex->arrays[4];
699 ptr5 = (orc_union16 *)ex->arrays[5];
700 ptr6 = (orc_union16 *)ex->arrays[6];
703 var36.i = ex->params[24];
705 var37.i = ex->params[25];
707 for (i = 0; i < n; i++) {
713 var40.i = var34.i + var35.i;
715 var41.i = var40.i * var36.i;
717 var42.i = var41.i + var37.i;
719 var43.i = var42.i >> ex->params[26];
725 var39.i = var38.i + var44.i;
732 /* orc_mas2_add_s16_ip */
734 _backup_orc_mas2_add_s16_ip (OrcExecutor * ORC_RESTRICT ex)
738 orc_union16 * ORC_RESTRICT ptr0;
739 const orc_union16 * ORC_RESTRICT ptr4;
740 const orc_union16 * ORC_RESTRICT ptr5;
753 ptr0 = (orc_union16 *)ex->arrays[0];
754 ptr4 = (orc_union16 *)ex->arrays[4];
755 ptr5 = (orc_union16 *)ex->arrays[5];
758 var36.i = ex->params[24];
760 var37.i = ex->params[25];
762 for (i = 0; i < n; i++) {
768 var40.i = var34.i + var35.i;
770 var41.i = var40.i * var36.i;
772 var42.i = var41.i + var37.i;
774 var43.i = var42.i >> ex->params[26];
780 var39.i = var38.i + var44.i;
787 /* orc_mas2_sub_s16_op */
789 _backup_orc_mas2_sub_s16_op (OrcExecutor * ORC_RESTRICT ex)
793 orc_union16 * ORC_RESTRICT ptr0;
794 const orc_union16 * ORC_RESTRICT ptr4;
795 const orc_union16 * ORC_RESTRICT ptr5;
796 const orc_union16 * ORC_RESTRICT ptr6;
809 ptr0 = (orc_union16 *)ex->arrays[0];
810 ptr4 = (orc_union16 *)ex->arrays[4];
811 ptr5 = (orc_union16 *)ex->arrays[5];
812 ptr6 = (orc_union16 *)ex->arrays[6];
815 var36.i = ex->params[24];
817 var37.i = ex->params[25];
819 for (i = 0; i < n; i++) {
825 var40.i = var34.i + var35.i;
827 var41.i = var40.i * var36.i;
829 var42.i = var41.i + var37.i;
831 var43.i = var42.i >> ex->params[26];
837 var39.i = var38.i - var44.i;
844 /* orc_mas2_sub_s16_ip */
846 _backup_orc_mas2_sub_s16_ip (OrcExecutor * ORC_RESTRICT ex)
850 orc_union16 * ORC_RESTRICT ptr0;
851 const orc_union16 * ORC_RESTRICT ptr4;
852 const orc_union16 * ORC_RESTRICT ptr5;
865 ptr0 = (orc_union16 *)ex->arrays[0];
866 ptr4 = (orc_union16 *)ex->arrays[4];
867 ptr5 = (orc_union16 *)ex->arrays[5];
870 var36.i = ex->params[24];
872 var37.i = ex->params[25];
874 for (i = 0; i < n; i++) {
880 var40.i = var34.i + var35.i;
882 var41.i = var40.i * var36.i;
884 var42.i = var41.i + var37.i;
886 var43.i = var42.i >> ex->params[26];
892 var39.i = var38.i - var44.i;
899 /* orc_mas4_across_add_s16_1991_op */
901 _backup_orc_mas4_across_add_s16_1991_op (OrcExecutor * ORC_RESTRICT ex)
905 orc_union16 * ORC_RESTRICT ptr0;
906 const orc_union16 * ORC_RESTRICT ptr4;
907 const orc_union16 * ORC_RESTRICT ptr5;
908 const orc_union16 * ORC_RESTRICT ptr6;
909 const orc_union16 * ORC_RESTRICT ptr7;
910 const orc_union16 * ORC_RESTRICT ptr8;
928 ptr0 = (orc_union16 *)ex->arrays[0];
929 ptr4 = (orc_union16 *)ex->arrays[4];
930 ptr5 = (orc_union16 *)ex->arrays[5];
931 ptr6 = (orc_union16 *)ex->arrays[6];
932 ptr7 = (orc_union16 *)ex->arrays[7];
933 ptr8 = (orc_union16 *)ex->arrays[8];
936 var38.i = 0x00000009; /* 9 or 4.44659e-323f */
938 var41.i = ex->params[24];
940 for (i = 0; i < n; i++) {
946 var44.i = var36.i + var37.i;
948 var45.i = var44.i * var38.i;
954 var46.i = var39.i + var40.i;
958 var48.i = var45.i - var47.i;
960 var49.i = var48.i + var41.i;
962 var50.i = var49.i >> ex->params[25];
968 var43.i = var42.i + var51.i;
975 /* orc_mas4_across_add_s16_1991_ip */
977 _backup_orc_mas4_across_add_s16_1991_ip (OrcExecutor * ORC_RESTRICT ex)
981 orc_union16 * ORC_RESTRICT ptr0;
982 const orc_union16 * ORC_RESTRICT ptr4;
983 const orc_union16 * ORC_RESTRICT ptr5;
984 const orc_union16 * ORC_RESTRICT ptr6;
985 const orc_union16 * ORC_RESTRICT ptr7;
1003 ptr0 = (orc_union16 *)ex->arrays[0];
1004 ptr4 = (orc_union16 *)ex->arrays[4];
1005 ptr5 = (orc_union16 *)ex->arrays[5];
1006 ptr6 = (orc_union16 *)ex->arrays[6];
1007 ptr7 = (orc_union16 *)ex->arrays[7];
1010 var38.i = 0x00000009; /* 9 or 4.44659e-323f */
1012 var41.i = ex->params[24];
1014 for (i = 0; i < n; i++) {
1020 var44.i = var36.i + var37.i;
1022 var45.i = var44.i * var38.i;
1028 var46.i = var39.i + var40.i;
1032 var48.i = var45.i - var47.i;
1034 var49.i = var48.i + var41.i;
1036 var50.i = var49.i >> ex->params[25];
1042 var43.i = var42.i + var51.i;
1049 /* orc_mas4_across_sub_s16_1991_op */
1051 _backup_orc_mas4_across_sub_s16_1991_op (OrcExecutor * ORC_RESTRICT ex)
1055 orc_union16 * ORC_RESTRICT ptr0;
1056 const orc_union16 * ORC_RESTRICT ptr4;
1057 const orc_union16 * ORC_RESTRICT ptr5;
1058 const orc_union16 * ORC_RESTRICT ptr6;
1059 const orc_union16 * ORC_RESTRICT ptr7;
1060 const orc_union16 * ORC_RESTRICT ptr8;
1078 ptr0 = (orc_union16 *)ex->arrays[0];
1079 ptr4 = (orc_union16 *)ex->arrays[4];
1080 ptr5 = (orc_union16 *)ex->arrays[5];
1081 ptr6 = (orc_union16 *)ex->arrays[6];
1082 ptr7 = (orc_union16 *)ex->arrays[7];
1083 ptr8 = (orc_union16 *)ex->arrays[8];
1086 var38.i = 0x00000009; /* 9 or 4.44659e-323f */
1088 var41.i = ex->params[24];
1090 for (i = 0; i < n; i++) {
1096 var44.i = var36.i + var37.i;
1098 var45.i = var44.i * var38.i;
1104 var46.i = var39.i + var40.i;
1108 var48.i = var45.i - var47.i;
1110 var49.i = var48.i + var41.i;
1112 var50.i = var49.i >> ex->params[25];
1118 var43.i = var42.i - var51.i;
1125 /* orc_mas4_across_sub_s16_1991_ip */
1127 _backup_orc_mas4_across_sub_s16_1991_ip (OrcExecutor * ORC_RESTRICT ex)
1131 orc_union16 * ORC_RESTRICT ptr0;
1132 const orc_union16 * ORC_RESTRICT ptr4;
1133 const orc_union16 * ORC_RESTRICT ptr5;
1134 const orc_union16 * ORC_RESTRICT ptr6;
1135 const orc_union16 * ORC_RESTRICT ptr7;
1153 ptr0 = (orc_union16 *)ex->arrays[0];
1154 ptr4 = (orc_union16 *)ex->arrays[4];
1155 ptr5 = (orc_union16 *)ex->arrays[5];
1156 ptr6 = (orc_union16 *)ex->arrays[6];
1157 ptr7 = (orc_union16 *)ex->arrays[7];
1160 var38.i = 0x00000009; /* 9 or 4.44659e-323f */
1162 var41.i = ex->params[24];
1164 for (i = 0; i < n; i++) {
1170 var44.i = var36.i + var37.i;
1172 var45.i = var44.i * var38.i;
1178 var46.i = var39.i + var40.i;
1182 var48.i = var45.i - var47.i;
1184 var49.i = var48.i + var41.i;
1186 var50.i = var49.i >> ex->params[25];
1192 var43.i = var42.i - var51.i;
1199 /* orc_subtract_s16 */
1201 _backup_orc_subtract_s16 (OrcExecutor * ORC_RESTRICT ex)
1205 orc_union16 * ORC_RESTRICT ptr0;
1206 const orc_union16 * ORC_RESTRICT ptr4;
1207 const orc_union16 * ORC_RESTRICT ptr5;
1212 ptr0 = (orc_union16 *)ex->arrays[0];
1213 ptr4 = (orc_union16 *)ex->arrays[4];
1214 ptr5 = (orc_union16 *)ex->arrays[5];
1217 for (i = 0; i < n; i++) {
1223 var34.i = var32.i - var33.i;
1230 /* orc_add_s16_u8 */
1232 _backup_orc_add_s16_u8 (OrcExecutor * ORC_RESTRICT ex)
1236 orc_union16 * ORC_RESTRICT ptr0;
1237 const orc_union16 * ORC_RESTRICT ptr4;
1238 const orc_int8 * ORC_RESTRICT ptr5;
1244 ptr0 = (orc_union16 *)ex->arrays[0];
1245 ptr4 = (orc_union16 *)ex->arrays[4];
1246 ptr5 = (orc_int8 *)ex->arrays[5];
1249 for (i = 0; i < n; i++) {
1253 var36.i = (orc_uint8)var33;
1257 var35.i = var36.i + var34.i;
1264 /* orc_add_s16_u8_2d */
1266 _backup_orc_add_s16_u8_2d (OrcExecutor * ORC_RESTRICT ex)
1271 int m = ex->params[ORC_VAR_A1];
1272 orc_union16 * ORC_RESTRICT ptr0;
1273 const orc_int8 * ORC_RESTRICT ptr4;
1279 for (j = 0; j < m; j++) {
1280 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
1281 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
1284 for (i = 0; i < n; i++) {
1288 var36.i = (orc_uint8)var33;
1292 var35.i = var34.i + var36.i;
1300 /* orc_convert_s16_u8 */
1302 _backup_orc_convert_s16_u8 (OrcExecutor * ORC_RESTRICT ex)
1306 orc_union16 * ORC_RESTRICT ptr0;
1307 const orc_int8 * ORC_RESTRICT ptr4;
1311 ptr0 = (orc_union16 *)ex->arrays[0];
1312 ptr4 = (orc_int8 *)ex->arrays[4];
1315 for (i = 0; i < n; i++) {
1319 var33.i = (orc_uint8)var32;
1326 /* orc_convert_u8_s16 */
1328 _backup_orc_convert_u8_s16 (OrcExecutor * ORC_RESTRICT ex)
1332 orc_int8 * ORC_RESTRICT ptr0;
1333 const orc_union16 * ORC_RESTRICT ptr4;
1337 ptr0 = (orc_int8 *)ex->arrays[0];
1338 ptr4 = (orc_union16 *)ex->arrays[4];
1341 for (i = 0; i < n; i++) {
1345 var33 = ORC_CLAMP_UB(var32.i);
1352 /* orc_offsetconvert_u8_s16 */
1354 _backup_orc_offsetconvert_u8_s16 (OrcExecutor * ORC_RESTRICT ex)
1358 orc_int8 * ORC_RESTRICT ptr0;
1359 const orc_union16 * ORC_RESTRICT ptr4;
1365 ptr0 = (orc_int8 *)ex->arrays[0];
1366 ptr4 = (orc_union16 *)ex->arrays[4];
1369 var34.i = 0x00000080; /* 128 or 6.32404e-322f */
1371 for (i = 0; i < n; i++) {
1375 var36.i = var33.i + var34.i;
1377 var35 = ORC_CLAMP_UB(var36.i);
1384 /* orc_offsetconvert_s16_u8 */
1386 _backup_orc_offsetconvert_s16_u8 (OrcExecutor * ORC_RESTRICT ex)
1390 orc_union16 * ORC_RESTRICT ptr0;
1391 const orc_int8 * ORC_RESTRICT ptr4;
1397 ptr0 = (orc_union16 *)ex->arrays[0];
1398 ptr4 = (orc_int8 *)ex->arrays[4];
1401 var34.i = 0x00000080; /* 128 or 6.32404e-322f */
1403 for (i = 0; i < n; i++) {
1407 var36.i = (orc_uint8)var33;
1409 var35.i = var36.i - var34.i;
1416 /* orc_subtract_s16_u8 */
1418 _backup_orc_subtract_s16_u8 (OrcExecutor * ORC_RESTRICT ex)
1422 orc_union16 * ORC_RESTRICT ptr0;
1423 const orc_union16 * ORC_RESTRICT ptr4;
1424 const orc_int8 * ORC_RESTRICT ptr5;
1430 ptr0 = (orc_union16 *)ex->arrays[0];
1431 ptr4 = (orc_union16 *)ex->arrays[4];
1432 ptr5 = (orc_int8 *)ex->arrays[5];
1435 for (i = 0; i < n; i++) {
1439 var36.i = (orc_uint8)var33;
1443 var35.i = var34.i - var36.i;
1450 /* orc_multiply_and_add_s16_u8 */
1452 _backup_orc_multiply_and_add_s16_u8 (OrcExecutor * ORC_RESTRICT ex)
1456 orc_union16 * ORC_RESTRICT ptr0;
1457 const orc_union16 * ORC_RESTRICT ptr4;
1458 const orc_int8 * ORC_RESTRICT ptr5;
1466 ptr0 = (orc_union16 *)ex->arrays[0];
1467 ptr4 = (orc_union16 *)ex->arrays[4];
1468 ptr5 = (orc_int8 *)ex->arrays[5];
1471 for (i = 0; i < n; i++) {
1475 var37.i = (orc_uint8)var33;
1479 var38.i = (var37.i * var34.i) & 0xffff;
1483 var36.i = var35.i + var38.i;
1490 /* orc_splat_s16_ns */
1492 _backup_orc_splat_s16_ns (OrcExecutor * ORC_RESTRICT ex)
1496 orc_union16 * ORC_RESTRICT ptr0;
1500 ptr0 = (orc_union16 *)ex->arrays[0];
1503 var32.i = ex->params[24];
1505 for (i = 0; i < n; i++) {
1514 /* orc_splat_s16_2d_4xn */
1516 _backup_orc_splat_s16_2d_4xn (OrcExecutor * ORC_RESTRICT ex)
1521 int m = ex->params[ORC_VAR_A1];
1522 orc_union16 * ORC_RESTRICT ptr0;
1526 for (j = 0; j < m; j++) {
1527 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
1530 var32.i = ex->params[24];
1532 for (i = 0; i < n; i++) {
1542 /* orc_splat_s16_2d_8xn */
1544 _backup_orc_splat_s16_2d_8xn (OrcExecutor * ORC_RESTRICT ex)
1549 int m = ex->params[ORC_VAR_A1];
1550 orc_union16 * ORC_RESTRICT ptr0;
1554 for (j = 0; j < m; j++) {
1555 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
1558 var32.i = ex->params[24];
1560 for (i = 0; i < n; i++) {
1570 /* orc_splat_s16_2d */
1572 _backup_orc_splat_s16_2d (OrcExecutor * ORC_RESTRICT ex)
1577 int m = ex->params[ORC_VAR_A1];
1578 orc_union16 * ORC_RESTRICT ptr0;
1582 for (j = 0; j < m; j++) {
1583 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
1586 var32.i = ex->params[24];
1588 for (i = 0; i < n; i++) {
1598 /* orc_splat_u8_ns */
1600 _backup_orc_splat_u8_ns (OrcExecutor * ORC_RESTRICT ex)
1604 orc_int8 * ORC_RESTRICT ptr0;
1608 ptr0 = (orc_int8 *)ex->arrays[0];
1611 var32 = ex->params[24];
1613 for (i = 0; i < n; i++) {
1622 /* orc_splat_u8_2d */
1624 _backup_orc_splat_u8_2d (OrcExecutor * ORC_RESTRICT ex)
1629 int m = ex->params[ORC_VAR_A1];
1630 orc_int8 * ORC_RESTRICT ptr0;
1634 for (j = 0; j < m; j++) {
1635 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
1638 var32 = ex->params[24];
1640 for (i = 0; i < n; i++) {
1650 /* orc_average_u8 */
1652 _backup_orc_average_u8 (OrcExecutor * ORC_RESTRICT ex)
1656 orc_int8 * ORC_RESTRICT ptr0;
1657 const orc_int8 * ORC_RESTRICT ptr4;
1658 const orc_int8 * ORC_RESTRICT ptr5;
1663 ptr0 = (orc_int8 *)ex->arrays[0];
1664 ptr4 = (orc_int8 *)ex->arrays[4];
1665 ptr5 = (orc_int8 *)ex->arrays[5];
1668 for (i = 0; i < n; i++) {
1674 var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1;
1681 /* orc_rrshift6_add_s16_2d */
1683 _backup_orc_rrshift6_add_s16_2d (OrcExecutor * ORC_RESTRICT ex)
1688 int m = ex->params[ORC_VAR_A1];
1689 orc_int8 * ORC_RESTRICT ptr0;
1690 const orc_union16 * ORC_RESTRICT ptr4;
1691 const orc_union16 * ORC_RESTRICT ptr5;
1700 for (j = 0; j < m; j++) {
1701 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
1702 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
1703 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
1706 var34.i = 0x00000020; /* 32 or 1.58101e-322f */
1708 for (i = 0; i < n; i++) {
1712 var37.i = var33.i + var34.i;
1714 var38.i = var37.i >> 6;
1718 var39.i = var35.i + var38.i;
1720 var36 = ORC_CLAMP_UB(var39.i);
1728 /* orc_rrshift6_sub_s16_2d */
1730 _backup_orc_rrshift6_sub_s16_2d (OrcExecutor * ORC_RESTRICT ex)
1735 int m = ex->params[ORC_VAR_A1];
1736 orc_union16 * ORC_RESTRICT ptr0;
1737 orc_union16 * ORC_RESTRICT ptr1;
1746 for (j = 0; j < m; j++) {
1747 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
1748 ptr1 = ORC_PTR_OFFSET(ex->arrays[1], ex->params[1] * j);
1751 var34.i = 0x00001fe0; /* 8160 or 4.03158e-320f */
1753 for (i = 0; i < n; i++) {
1757 var38.i = var33.i - var34.i;
1759 var39.i = var38.i >> 6;
1767 var37.i = var36.i - var39.i;
1775 /* orc_rrshift6_s16_ip_2d */
1777 _backup_orc_rrshift6_s16_ip_2d (OrcExecutor * ORC_RESTRICT ex)
1782 int m = ex->params[ORC_VAR_A1];
1783 orc_union16 * ORC_RESTRICT ptr0;
1789 for (j = 0; j < m; j++) {
1790 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
1793 var34.i = 0x00001fe0; /* 8160 or 4.03158e-320f */
1795 for (i = 0; i < n; i++) {
1799 var36.i = var33.i - var34.i;
1801 var35.i = var36.i >> 6;
1809 /* orc_rrshift6_s16_ip */
1811 _backup_orc_rrshift6_s16_ip (OrcExecutor * ORC_RESTRICT ex)
1815 orc_union16 * ORC_RESTRICT ptr0;
1821 ptr0 = (orc_union16 *)ex->arrays[0];
1824 var34.i = 0x00001fe0; /* 8160 or 4.03158e-320f */
1826 for (i = 0; i < n; i++) {
1830 var36.i = var33.i - var34.i;
1832 var35.i = var36.i >> 6;
1839 /* orc_unpack_yuyv_y */
1841 _backup_orc_unpack_yuyv_y (OrcExecutor * ORC_RESTRICT ex)
1845 orc_int8 * ORC_RESTRICT ptr0;
1846 const orc_union16 * ORC_RESTRICT ptr4;
1850 ptr0 = (orc_int8 *)ex->arrays[0];
1851 ptr4 = (orc_union16 *)ex->arrays[4];
1854 for (i = 0; i < n; i++) {
1858 var33 = (orc_uint16)var32.i & 0xff;
1865 /* orc_unpack_yuyv_u */
1867 _backup_orc_unpack_yuyv_u (OrcExecutor * ORC_RESTRICT ex)
1871 orc_int8 * ORC_RESTRICT ptr0;
1872 const orc_union32 * ORC_RESTRICT ptr4;
1877 ptr0 = (orc_int8 *)ex->arrays[0];
1878 ptr4 = (orc_union32 *)ex->arrays[4];
1881 for (i = 0; i < n; i++) {
1885 var35.i = (orc_uint32)var33.i & 0xffff;
1887 var34 = ((orc_uint16)var35.i >> 8)&0xff;
1894 /* orc_unpack_yuyv_v */
1896 _backup_orc_unpack_yuyv_v (OrcExecutor * ORC_RESTRICT ex)
1900 orc_int8 * ORC_RESTRICT ptr0;
1901 const orc_union32 * ORC_RESTRICT ptr4;
1906 ptr0 = (orc_int8 *)ex->arrays[0];
1907 ptr4 = (orc_union32 *)ex->arrays[4];
1910 for (i = 0; i < n; i++) {
1914 var35.i = ((orc_uint32)var33.i >> 16)&0xffff;
1916 var34 = ((orc_uint16)var35.i >> 8)&0xff;
1925 _backup_orc_packyuyv (OrcExecutor * ORC_RESTRICT ex)
1929 orc_union32 * ORC_RESTRICT ptr0;
1930 const orc_union16 * ORC_RESTRICT ptr4;
1931 const orc_int8 * ORC_RESTRICT ptr5;
1932 const orc_int8 * ORC_RESTRICT ptr6;
1943 ptr0 = (orc_union32 *)ex->arrays[0];
1944 ptr4 = (orc_union16 *)ex->arrays[4];
1945 ptr5 = (orc_int8 *)ex->arrays[5];
1946 ptr6 = (orc_int8 *)ex->arrays[6];
1949 for (i = 0; i < n; i++) {
1955 var42 = (orc_uint16)var41.i & 0xff;
1957 var43 = ((orc_uint16)var41.i >> 8)&0xff;
1961 var44.i = ((orc_uint8)var42 & 0x00ff) | ((orc_uint8)var38 << 8);
1965 var45.i = ((orc_uint8)var43 & 0x00ff) | ((orc_uint8)var39 << 8);
1967 var40.i = ((orc_uint16)var44.i & 0x0000ffff) | ((orc_uint16)var45.i << 16);
1974 /* orc_unpack_uyvy_y */
1976 _backup_orc_unpack_uyvy_y (OrcExecutor * ORC_RESTRICT ex)
1980 orc_int8 * ORC_RESTRICT ptr0;
1981 const orc_union16 * ORC_RESTRICT ptr4;
1985 ptr0 = (orc_int8 *)ex->arrays[0];
1986 ptr4 = (orc_union16 *)ex->arrays[4];
1989 for (i = 0; i < n; i++) {
1993 var33 = ((orc_uint16)var32.i >> 8)&0xff;
2000 /* orc_unpack_uyvy_u */
2002 _backup_orc_unpack_uyvy_u (OrcExecutor * ORC_RESTRICT ex)
2006 orc_int8 * ORC_RESTRICT ptr0;
2007 const orc_union32 * ORC_RESTRICT ptr4;
2012 ptr0 = (orc_int8 *)ex->arrays[0];
2013 ptr4 = (orc_union32 *)ex->arrays[4];
2016 for (i = 0; i < n; i++) {
2020 var35.i = (orc_uint32)var33.i & 0xffff;
2022 var34 = (orc_uint16)var35.i & 0xff;
2029 /* orc_unpack_uyvy_v */
2031 _backup_orc_unpack_uyvy_v (OrcExecutor * ORC_RESTRICT ex)
2035 orc_int8 * ORC_RESTRICT ptr0;
2036 const orc_union32 * ORC_RESTRICT ptr4;
2041 ptr0 = (orc_int8 *)ex->arrays[0];
2042 ptr4 = (orc_union32 *)ex->arrays[4];
2045 for (i = 0; i < n; i++) {
2049 var35.i = ((orc_uint32)var33.i >> 16)&0xffff;
2051 var34 = (orc_uint16)var35.i & 0xff;
2058 /* orc_interleave2_s16 */
2060 _backup_orc_interleave2_s16 (OrcExecutor * ORC_RESTRICT ex)
2064 orc_union32 * ORC_RESTRICT ptr0;
2065 const orc_union16 * ORC_RESTRICT ptr4;
2066 const orc_union16 * ORC_RESTRICT ptr5;
2071 ptr0 = (orc_union32 *)ex->arrays[0];
2072 ptr4 = (orc_union16 *)ex->arrays[4];
2073 ptr5 = (orc_union16 *)ex->arrays[5];
2076 for (i = 0; i < n; i++) {
2082 var34.i = ((orc_uint16)var32.i & 0x0000ffff) | ((orc_uint16)var33.i << 16);
2089 /* orc_interleave2_rrshift1_s16 */
2091 _backup_orc_interleave2_rrshift1_s16 (OrcExecutor * ORC_RESTRICT ex)
2095 orc_union32 * ORC_RESTRICT ptr0;
2096 const orc_union16 * ORC_RESTRICT ptr4;
2097 const orc_union16 * ORC_RESTRICT ptr5;
2108 ptr0 = (orc_union32 *)ex->arrays[0];
2109 ptr4 = (orc_union16 *)ex->arrays[4];
2110 ptr5 = (orc_union16 *)ex->arrays[5];
2113 var35.i = 0x00000001; /* 1 or 4.94066e-324f */
2115 var37.i = 0x00000001; /* 1 or 4.94066e-324f */
2117 for (i = 0; i < n; i++) {
2121 var39.i = var34.i + var35.i;
2123 var40.i = var39.i >> 1;
2127 var41.i = var36.i + var37.i;
2129 var42.i = var41.i >> 1;
2131 var38.i = ((orc_uint16)var40.i & 0x0000ffff) | ((orc_uint16)var42.i << 16);
2138 /* orc_deinterleave2_s16 */
2140 _backup_orc_deinterleave2_s16 (OrcExecutor * ORC_RESTRICT ex)
2144 orc_union16 * ORC_RESTRICT ptr0;
2145 orc_union16 * ORC_RESTRICT ptr1;
2146 const orc_union32 * ORC_RESTRICT ptr4;
2152 ptr0 = (orc_union16 *)ex->arrays[0];
2153 ptr1 = (orc_union16 *)ex->arrays[1];
2154 ptr4 = (orc_union32 *)ex->arrays[4];
2157 for (i = 0; i < n; i++) {
2163 var34.i = (orc_uint32)var36.i & 0xffff;
2167 var35.i = ((orc_uint32)var36.i >> 16)&0xffff;
2174 /* orc_deinterleave2_lshift1_s16 */
2176 _backup_orc_deinterleave2_lshift1_s16 (OrcExecutor * ORC_RESTRICT ex)
2180 orc_union16 * ORC_RESTRICT ptr0;
2181 orc_union16 * ORC_RESTRICT ptr1;
2182 const orc_union32 * ORC_RESTRICT ptr4;
2190 ptr0 = (orc_union16 *)ex->arrays[0];
2191 ptr1 = (orc_union16 *)ex->arrays[1];
2192 ptr4 = (orc_union32 *)ex->arrays[4];
2195 for (i = 0; i < n; i++) {
2201 var39.i = (orc_uint32)var38.i & 0xffff;
2203 var36.i = var39.i << 1;
2207 var40.i = ((orc_uint32)var38.i >> 16)&0xffff;
2209 var37.i = var40.i << 1;
2216 /* orc_haar_deint_lshift1_split_s16 */
2218 _backup_orc_haar_deint_lshift1_split_s16 (OrcExecutor * ORC_RESTRICT ex)
2222 orc_union16 * ORC_RESTRICT ptr0;
2223 orc_union16 * ORC_RESTRICT ptr1;
2224 const orc_union32 * ORC_RESTRICT ptr4;
2237 ptr0 = (orc_union16 *)ex->arrays[0];
2238 ptr1 = (orc_union16 *)ex->arrays[1];
2239 ptr4 = (orc_union32 *)ex->arrays[4];
2242 var37.i = 0x00000000; /* 0 or 0f */
2244 for (i = 0; i < n; i++) {
2250 var40.i = (orc_uint32)var39.i & 0xffff;
2252 var41.i = ((orc_uint32)var39.i >> 16)&0xffff;
2254 var42.i = var40.i << 1;
2256 var43.i = var41.i << 1;
2258 var44.i = var43.i - var42.i;
2264 var45.i = (var44.i + var37.i + 1)>>1;
2266 var38.i = var42.i + var45.i;
2273 /* orc_haar_deint_split_s16 */
2275 _backup_orc_haar_deint_split_s16 (OrcExecutor * ORC_RESTRICT ex)
2279 orc_union16 * ORC_RESTRICT ptr0;
2280 orc_union16 * ORC_RESTRICT ptr1;
2281 const orc_union32 * ORC_RESTRICT ptr4;
2292 ptr0 = (orc_union16 *)ex->arrays[0];
2293 ptr1 = (orc_union16 *)ex->arrays[1];
2294 ptr4 = (orc_union32 *)ex->arrays[4];
2297 var37.i = 0x00000000; /* 0 or 0f */
2299 for (i = 0; i < n; i++) {
2305 var40.i = (orc_uint32)var39.i & 0xffff;
2307 var41.i = ((orc_uint32)var39.i >> 16)&0xffff;
2309 var42.i = var41.i - var40.i;
2315 var43.i = (var42.i + var37.i + 1)>>1;
2317 var38.i = var40.i + var43.i;
2324 /* orc_haar_split_s16_lo */
2326 _backup_orc_haar_split_s16_lo (OrcExecutor * ORC_RESTRICT ex)
2330 orc_union16 * ORC_RESTRICT ptr0;
2331 const orc_union16 * ORC_RESTRICT ptr4;
2332 const orc_union16 * ORC_RESTRICT ptr5;
2341 ptr0 = (orc_union16 *)ex->arrays[0];
2342 ptr4 = (orc_union16 *)ex->arrays[4];
2343 ptr5 = (orc_union16 *)ex->arrays[5];
2346 var36.i = 0x00000000; /* 0 or 0f */
2348 for (i = 0; i < n; i++) {
2356 var39.i = var35.i - var38.i;
2358 var40.i = (var39.i + var36.i + 1)>>1;
2360 var37.i = var38.i + var40.i;
2367 /* orc_haar_split_s16_hi */
2369 _backup_orc_haar_split_s16_hi (OrcExecutor * ORC_RESTRICT ex)
2373 orc_union16 * ORC_RESTRICT ptr0;
2374 const orc_union16 * ORC_RESTRICT ptr4;
2375 const orc_union16 * ORC_RESTRICT ptr5;
2380 ptr0 = (orc_union16 *)ex->arrays[0];
2381 ptr4 = (orc_union16 *)ex->arrays[4];
2382 ptr5 = (orc_union16 *)ex->arrays[5];
2385 for (i = 0; i < n; i++) {
2391 var34.i = var32.i - var33.i;
2398 /* orc_haar_split_s16_op */
2400 _backup_orc_haar_split_s16_op (OrcExecutor * ORC_RESTRICT ex)
2404 orc_union16 * ORC_RESTRICT ptr0;
2405 orc_union16 * ORC_RESTRICT ptr1;
2406 const orc_union16 * ORC_RESTRICT ptr4;
2407 const orc_union16 * ORC_RESTRICT ptr5;
2417 ptr0 = (orc_union16 *)ex->arrays[0];
2418 ptr1 = (orc_union16 *)ex->arrays[1];
2419 ptr4 = (orc_union16 *)ex->arrays[4];
2420 ptr5 = (orc_union16 *)ex->arrays[5];
2423 var37.i = 0x00000000; /* 0 or 0f */
2425 for (i = 0; i < n; i++) {
2433 var40.i = var35.i - var39.i;
2439 var41.i = (var40.i + var37.i + 1)>>1;
2441 var38.i = var39.i + var41.i;
2448 /* orc_haar_split_s16 */
2450 _backup_orc_haar_split_s16 (OrcExecutor * ORC_RESTRICT ex)
2454 orc_union16 * ORC_RESTRICT ptr0;
2455 orc_union16 * ORC_RESTRICT ptr1;
2466 ptr0 = (orc_union16 *)ex->arrays[0];
2467 ptr1 = (orc_union16 *)ex->arrays[1];
2470 var37.i = 0x00000000; /* 0 or 0f */
2472 for (i = 0; i < n; i++) {
2482 var41.i = var40.i - var39.i;
2488 var42.i = (var41.i + var37.i + 1)>>1;
2490 var38.i = var39.i + var42.i;
2497 /* orc_haar_synth_s16_lo */
2499 _backup_orc_haar_synth_s16_lo (OrcExecutor * ORC_RESTRICT ex)
2503 orc_union16 * ORC_RESTRICT ptr0;
2504 const orc_union16 * ORC_RESTRICT ptr4;
2505 const orc_union16 * ORC_RESTRICT ptr5;
2512 ptr0 = (orc_union16 *)ex->arrays[0];
2513 ptr4 = (orc_union16 *)ex->arrays[4];
2514 ptr5 = (orc_union16 *)ex->arrays[5];
2517 var34.i = 0x00000000; /* 0 or 0f */
2519 for (i = 0; i < n; i++) {
2523 var37.i = (var33.i + var34.i + 1)>>1;
2527 var36.i = var35.i - var37.i;
2534 /* orc_haar_synth_s16_hi */
2536 _backup_orc_haar_synth_s16_hi (OrcExecutor * ORC_RESTRICT ex)
2540 orc_union16 * ORC_RESTRICT ptr0;
2541 const orc_union16 * ORC_RESTRICT ptr4;
2542 const orc_union16 * ORC_RESTRICT ptr5;
2551 ptr0 = (orc_union16 *)ex->arrays[0];
2552 ptr4 = (orc_union16 *)ex->arrays[4];
2553 ptr5 = (orc_union16 *)ex->arrays[5];
2556 var36.i = 0x00000000; /* 0 or 0f */
2558 for (i = 0; i < n; i++) {
2564 var40.i = (var39.i + var36.i + 1)>>1;
2568 var41.i = var37.i - var40.i;
2570 var38.i = var39.i + var41.i;
2577 /* orc_haar_synth_s16_op */
2579 _backup_orc_haar_synth_s16_op (OrcExecutor * ORC_RESTRICT ex)
2583 orc_union16 * ORC_RESTRICT ptr0;
2584 orc_union16 * ORC_RESTRICT ptr1;
2585 const orc_union16 * ORC_RESTRICT ptr4;
2586 const orc_union16 * ORC_RESTRICT ptr5;
2596 ptr0 = (orc_union16 *)ex->arrays[0];
2597 ptr1 = (orc_union16 *)ex->arrays[1];
2598 ptr4 = (orc_union16 *)ex->arrays[4];
2599 ptr5 = (orc_union16 *)ex->arrays[5];
2602 var36.i = 0x00000000; /* 0 or 0f */
2604 for (i = 0; i < n; i++) {
2610 var41.i = (var40.i + var36.i + 1)>>1;
2614 var42.i = var37.i - var41.i;
2620 var39.i = var40.i + var42.i;
2627 /* orc_haar_synth_s16 */
2629 _backup_orc_haar_synth_s16 (OrcExecutor * ORC_RESTRICT ex)
2633 orc_union16 * ORC_RESTRICT ptr0;
2634 orc_union16 * ORC_RESTRICT ptr1;
2645 ptr0 = (orc_union16 *)ex->arrays[0];
2646 ptr1 = (orc_union16 *)ex->arrays[1];
2649 var37.i = 0x00000000; /* 0 or 0f */
2651 for (i = 0; i < n; i++) {
2661 var42.i = (var41.i + var37.i + 1)>>1;
2663 var43.i = var40.i - var42.i;
2669 var39.i = var41.i + var43.i;
2676 /* orc_haar_synth_rrshift1_int_s16 */
2678 _backup_orc_haar_synth_rrshift1_int_s16 (OrcExecutor * ORC_RESTRICT ex)
2682 orc_union32 * ORC_RESTRICT ptr0;
2683 const orc_union16 * ORC_RESTRICT ptr4;
2684 const orc_union16 * ORC_RESTRICT ptr5;
2698 ptr0 = (orc_union32 *)ex->arrays[0];
2699 ptr4 = (orc_union16 *)ex->arrays[4];
2700 ptr5 = (orc_union16 *)ex->arrays[5];
2703 var35.i = 0x00000000; /* 0 or 0f */
2705 var37.i = 0x00000000; /* 0 or 0f */
2707 var38.i = 0x00000000; /* 0 or 0f */
2709 for (i = 0; i < n; i++) {
2715 var41.i = (var40.i + var35.i + 1)>>1;
2719 var42.i = var36.i - var41.i;
2721 var43.i = var40.i + var42.i;
2723 var44.i = (var42.i + var37.i + 1)>>1;
2725 var45.i = (var43.i + var38.i + 1)>>1;
2727 var39.i = ((orc_uint16)var44.i & 0x0000ffff) | ((orc_uint16)var45.i << 16);
2734 /* orc_haar_synth_int_s16 */
2736 _backup_orc_haar_synth_int_s16 (OrcExecutor * ORC_RESTRICT ex)
2740 orc_union32 * ORC_RESTRICT ptr0;
2741 const orc_union16 * ORC_RESTRICT ptr4;
2742 const orc_union16 * ORC_RESTRICT ptr5;
2752 ptr0 = (orc_union32 *)ex->arrays[0];
2753 ptr4 = (orc_union16 *)ex->arrays[4];
2754 ptr5 = (orc_union16 *)ex->arrays[5];
2757 var35.i = 0x00000000; /* 0 or 0f */
2759 for (i = 0; i < n; i++) {
2765 var39.i = (var38.i + var35.i + 1)>>1;
2769 var40.i = var36.i - var39.i;
2771 var41.i = var38.i + var40.i;
2773 var37.i = ((orc_uint16)var40.i & 0x0000ffff) | ((orc_uint16)var41.i << 16);
2780 /* orc_haar_sub_s16 */
2782 _backup_orc_haar_sub_s16 (OrcExecutor * ORC_RESTRICT ex)
2786 orc_union16 * ORC_RESTRICT ptr0;
2787 const orc_union16 * ORC_RESTRICT ptr4;
2792 ptr0 = (orc_union16 *)ex->arrays[0];
2793 ptr4 = (orc_union16 *)ex->arrays[4];
2796 for (i = 0; i < n; i++) {
2802 var34.i = var32.i - var33.i;
2809 /* orc_haar_add_half_s16 */
2811 _backup_orc_haar_add_half_s16 (OrcExecutor * ORC_RESTRICT ex)
2815 orc_union16 * ORC_RESTRICT ptr0;
2816 const orc_union16 * ORC_RESTRICT ptr4;
2823 ptr0 = (orc_union16 *)ex->arrays[0];
2824 ptr4 = (orc_union16 *)ex->arrays[4];
2827 var34.i = 0x00000000; /* 0 or 0f */
2829 for (i = 0; i < n; i++) {
2833 var37.i = (var33.i + var34.i + 1)>>1;
2837 var36.i = var35.i + var37.i;
2844 /* orc_haar_add_s16 */
2846 _backup_orc_haar_add_s16 (OrcExecutor * ORC_RESTRICT ex)
2850 orc_union16 * ORC_RESTRICT ptr0;
2851 const orc_union16 * ORC_RESTRICT ptr4;
2856 ptr0 = (orc_union16 *)ex->arrays[0];
2857 ptr4 = (orc_union16 *)ex->arrays[4];
2860 for (i = 0; i < n; i++) {
2866 var34.i = var32.i + var33.i;
2873 /* orc_haar_sub_half_s16 */
2875 _backup_orc_haar_sub_half_s16 (OrcExecutor * ORC_RESTRICT ex)
2879 orc_union16 * ORC_RESTRICT ptr0;
2880 const orc_union16 * ORC_RESTRICT ptr4;
2887 ptr0 = (orc_union16 *)ex->arrays[0];
2888 ptr4 = (orc_union16 *)ex->arrays[4];
2891 var34.i = 0x00000000; /* 0 or 0f */
2893 for (i = 0; i < n; i++) {
2897 var37.i = (var33.i + var34.i + 1)>>1;
2901 var36.i = var35.i - var37.i;
2910 _backup_orc_sum_u8 (OrcExecutor * ORC_RESTRICT ex)
2914 const orc_int8 * ORC_RESTRICT ptr4;
2915 orc_union32 var12 = { 0 };
2920 ptr4 = (orc_int8 *)ex->arrays[4];
2923 for (i = 0; i < n; i++) {
2927 var35.i = (orc_uint8)var34;
2929 var36.i = (orc_uint16)var35.i;
2931 var12.i = var12.i + var36.i;
2933 ex->accumulators[0] = var12.i;
2939 _backup_orc_sum_s16 (OrcExecutor * ORC_RESTRICT ex)
2943 const orc_union16 * ORC_RESTRICT ptr4;
2944 orc_union32 var12 = { 0 };
2948 ptr4 = (orc_union16 *)ex->arrays[4];
2951 for (i = 0; i < n; i++) {
2957 var12.i = var12.i + var34.i;
2959 ex->accumulators[0] = var12.i;
2963 /* orc_sum_square_diff_u8 */
2965 _backup_orc_sum_square_diff_u8 (OrcExecutor * ORC_RESTRICT ex)
2969 const orc_int8 * ORC_RESTRICT ptr4;
2970 const orc_int8 * ORC_RESTRICT ptr5;
2971 orc_union32 var12 = { 0 };
2980 ptr4 = (orc_int8 *)ex->arrays[4];
2981 ptr5 = (orc_int8 *)ex->arrays[5];
2984 for (i = 0; i < n; i++) {
2988 var37.i = (orc_uint8)var35;
2992 var38.i = (orc_uint8)var36;
2994 var39.i = var37.i - var38.i;
2996 var40.i = (var39.i * var39.i) & 0xffff;
2998 var41.i = (orc_uint16)var40.i;
3000 var12.i = var12.i + var41.i;
3002 ex->accumulators[0] = var12.i;
3006 /* orc_dequantise_s16_2d_4xn */
3008 _backup_orc_dequantise_s16_2d_4xn (OrcExecutor * ORC_RESTRICT ex)
3013 int m = ex->params[ORC_VAR_A1];
3014 orc_union16 * ORC_RESTRICT ptr0;
3015 const orc_union16 * ORC_RESTRICT ptr4;
3027 for (j = 0; j < m; j++) {
3028 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
3029 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
3032 var35.i = ex->params[24];
3034 var36.i = ex->params[25];
3036 for (i = 0; i < n; i++) {
3042 var39.i = ORC_CLAMP(var38.i,-1,1);
3044 var40.i = ORC_ABS(var38.i);
3046 var41.i = (var40.i * var35.i) & 0xffff;
3048 var42.i = var41.i + var36.i;
3050 var43.i = var42.i >> 2;
3052 var37.i = (var43.i * var39.i) & 0xffff;
3060 /* orc_dequantise_s16_2d_8xn */
3062 _backup_orc_dequantise_s16_2d_8xn (OrcExecutor * ORC_RESTRICT ex)
3067 int m = ex->params[ORC_VAR_A1];
3068 orc_union16 * ORC_RESTRICT ptr0;
3069 const orc_union16 * ORC_RESTRICT ptr4;
3081 for (j = 0; j < m; j++) {
3082 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
3083 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
3086 var35.i = ex->params[24];
3088 var36.i = ex->params[25];
3090 for (i = 0; i < n; i++) {
3096 var39.i = ORC_CLAMP(var38.i,-1,1);
3098 var40.i = ORC_ABS(var38.i);
3100 var41.i = (var40.i * var35.i) & 0xffff;
3102 var42.i = var41.i + var36.i;
3104 var43.i = var42.i >> 2;
3106 var37.i = (var43.i * var39.i) & 0xffff;
3114 /* orc_dequantise_s16_ip_2d_8xn */
3116 _backup_orc_dequantise_s16_ip_2d_8xn (OrcExecutor * ORC_RESTRICT ex)
3121 int m = ex->params[ORC_VAR_A1];
3122 orc_union16 * ORC_RESTRICT ptr0;
3134 for (j = 0; j < m; j++) {
3135 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
3138 var35.i = ex->params[24];
3140 var36.i = ex->params[25];
3142 for (i = 0; i < n; i++) {
3148 var39.i = ORC_CLAMP(var38.i,-1,1);
3150 var40.i = ORC_ABS(var38.i);
3152 var41.i = (var40.i * var35.i) & 0xffff;
3154 var42.i = var41.i + var36.i;
3156 var43.i = var42.i >> 2;
3158 var37.i = (var43.i * var39.i) & 0xffff;
3166 /* orc_dequantise_s16_ip_2d */
3168 _backup_orc_dequantise_s16_ip_2d (OrcExecutor * ORC_RESTRICT ex)
3173 int m = ex->params[ORC_VAR_A1];
3174 orc_union16 * ORC_RESTRICT ptr0;
3186 for (j = 0; j < m; j++) {
3187 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
3190 var35.i = ex->params[24];
3192 var36.i = ex->params[25];
3194 for (i = 0; i < n; i++) {
3200 var39.i = ORC_CLAMP(var38.i,-1,1);
3202 var40.i = ORC_ABS(var38.i);
3204 var41.i = (var40.i * var35.i) & 0xffff;
3206 var42.i = var41.i + var36.i;
3208 var43.i = var42.i >> 2;
3210 var37.i = (var43.i * var39.i) & 0xffff;
3218 /* orc_dequantise_s16_ip */
3220 _backup_orc_dequantise_s16_ip (OrcExecutor * ORC_RESTRICT ex)
3224 orc_union16 * ORC_RESTRICT ptr0;
3236 ptr0 = (orc_union16 *)ex->arrays[0];
3239 var35.i = ex->params[24];
3241 var36.i = ex->params[25];
3243 for (i = 0; i < n; i++) {
3249 var39.i = ORC_CLAMP(var38.i,-1,1);
3251 var40.i = ORC_ABS(var38.i);
3253 var41.i = (var40.i * var35.i) & 0xffff;
3255 var42.i = var41.i + var36.i;
3257 var43.i = var42.i >> 2;
3259 var37.i = (var43.i * var39.i) & 0xffff;
3266 /* orc_dequantise_s16 */
3268 _backup_orc_dequantise_s16 (OrcExecutor * ORC_RESTRICT ex)
3272 orc_union16 * ORC_RESTRICT ptr0;
3273 const orc_union16 * ORC_RESTRICT ptr4;
3285 ptr0 = (orc_union16 *)ex->arrays[0];
3286 ptr4 = (orc_union16 *)ex->arrays[4];
3289 var35.i = ex->params[24];
3291 var36.i = ex->params[25];
3293 for (i = 0; i < n; i++) {
3299 var39.i = ORC_CLAMP(var38.i,-1,1);
3301 var40.i = ORC_ABS(var38.i);
3303 var41.i = (var40.i * var35.i) & 0xffff;
3305 var42.i = var41.i + var36.i;
3307 var43.i = var42.i >> 2;
3309 var37.i = (var43.i * var39.i) & 0xffff;
3316 /* orc_dequantise_var_s16_ip */
3318 _backup_orc_dequantise_var_s16_ip (OrcExecutor * ORC_RESTRICT ex)
3322 orc_union16 * ORC_RESTRICT ptr0;
3323 const orc_union16 * ORC_RESTRICT ptr4;
3324 const orc_union16 * ORC_RESTRICT ptr5;
3336 ptr0 = (orc_union16 *)ex->arrays[0];
3337 ptr4 = (orc_union16 *)ex->arrays[4];
3338 ptr5 = (orc_union16 *)ex->arrays[5];
3341 for (i = 0; i < n; i++) {
3347 var39.i = ORC_CLAMP(var38.i,-1,1);
3349 var40.i = ORC_ABS(var38.i);
3353 var41.i = (var40.i * var35.i) & 0xffff;
3357 var42.i = var41.i + var36.i;
3359 var43.i = var42.i >> 2;
3361 var37.i = (var43.i * var39.i) & 0xffff;
3368 /* orc_quantise1_s16 */
3370 _backup_orc_quantise1_s16 (OrcExecutor * ORC_RESTRICT ex)
3374 orc_union16 * ORC_RESTRICT ptr0;
3375 const orc_union16 * ORC_RESTRICT ptr4;
3388 ptr0 = (orc_union16 *)ex->arrays[0];
3389 ptr4 = (orc_union16 *)ex->arrays[4];
3392 var35.i = ex->params[25];
3394 var36.i = ex->params[24];
3396 for (i = 0; i < n; i++) {
3402 var39.i = ORC_CLAMP(var38.i,-1,1);
3404 var40.i = ORC_ABS(var38.i);
3406 var41.i = var40.i << 2;
3408 var42.i = var41.i - var35.i;
3410 var43.i = ((orc_uint32)((orc_uint16)var42.i) * (orc_uint32)((orc_uint16)var36.i)) >> 16;
3412 var44.i = ((orc_uint16)var43.i) >> ex->params[26];
3414 var37.i = (var44.i * var39.i) & 0xffff;
3421 /* orc_quantise2_s16 */
3423 _backup_orc_quantise2_s16 (OrcExecutor * ORC_RESTRICT ex)
3427 orc_union16 * ORC_RESTRICT ptr0;
3428 const orc_union16 * ORC_RESTRICT ptr4;
3439 ptr0 = (orc_union16 *)ex->arrays[0];
3440 ptr4 = (orc_union16 *)ex->arrays[4];
3443 var35.i = ex->params[25];
3445 for (i = 0; i < n; i++) {
3451 var38.i = ORC_CLAMP(var37.i,-1,1);
3453 var39.i = ORC_ABS(var37.i);
3455 var40.i = var39.i << 2;
3457 var41.i = var40.i - var35.i;
3459 var42.i = ((orc_uint16)var41.i) >> ex->params[24];
3461 var36.i = (var42.i * var38.i) & 0xffff;
3468 /* orc_quantdequant1_s16 */
3470 _backup_orc_quantdequant1_s16 (OrcExecutor * ORC_RESTRICT ex)
3474 orc_union16 * ORC_RESTRICT ptr0;
3475 orc_union16 * ORC_RESTRICT ptr1;
3496 ptr0 = (orc_union16 *)ex->arrays[0];
3497 ptr1 = (orc_union16 *)ex->arrays[1];
3500 var35.i = ex->params[25];
3502 var36.i = ex->params[24];
3504 var38.i = ex->params[27];
3506 var39.i = ex->params[28];
3508 for (i = 0; i < n; i++) {
3514 var42.i = ORC_CLAMP(var41.i,-1,1);
3516 var43.i = ORC_ABS(var41.i);
3518 var44.i = var43.i << 2;
3520 var45.i = var44.i - var35.i;
3522 var46.i = ((orc_uint32)((orc_uint16)var45.i) * (orc_uint32)((orc_uint16)var36.i)) >> 16;
3524 var47.i = ((orc_uint16)var46.i) >> ex->params[26];
3526 var48.i = (var47.i * var42.i) & 0xffff;
3532 var49.i = ORC_CLAMP(var48.i,-1,1);
3534 var50.i = (var47.i * var38.i) & 0xffff;
3536 var51.i = var50.i + var39.i;
3538 var52.i = var51.i >> 2;
3540 var40.i = (var52.i * var49.i) & 0xffff;
3547 /* orc_quantdequant3_s16 */
3549 _backup_orc_quantdequant3_s16 (OrcExecutor * ORC_RESTRICT ex)
3553 orc_union16 * ORC_RESTRICT ptr0;
3554 orc_union16 * ORC_RESTRICT ptr1;
3578 ptr0 = (orc_union16 *)ex->arrays[0];
3579 ptr1 = (orc_union16 *)ex->arrays[1];
3582 var36.i = ex->params[25];
3584 var37.i = ex->params[24];
3586 var38.i = ex->params[29];
3588 var40.i = ex->params[27];
3590 var41.i = ex->params[28];
3592 for (i = 0; i < n; i++) {
3598 var44.i = ORC_CLAMP(var43.i,-1,1);
3600 var45.i = ORC_ABS(var43.i);
3602 var46.i = var45.i << 2;
3604 var47.i = var46.i - var36.i;
3606 var48.i = ((orc_uint16)var47.i) * ((orc_uint16)var37.i);
3608 var49.i = var48.i + var38.i;
3610 var50.i = ((orc_uint32)var49.i) >> ex->params[26];
3614 var52.i = (var51.i * var44.i) & 0xffff;
3620 var53.i = ORC_CLAMP(var52.i,-1,1);
3622 var54.i = (var51.i * var40.i) & 0xffff;
3624 var55.i = var54.i + var41.i;
3626 var56.i = var55.i >> 2;
3628 var42.i = (var56.i * var53.i) & 0xffff;
3635 /* orc_quantdequant2_s16 */
3637 _backup_orc_quantdequant2_s16 (OrcExecutor * ORC_RESTRICT ex)
3641 orc_union16 * ORC_RESTRICT ptr0;
3642 orc_union16 * ORC_RESTRICT ptr1;
3661 ptr0 = (orc_union16 *)ex->arrays[0];
3662 ptr1 = (orc_union16 *)ex->arrays[1];
3665 var35.i = ex->params[25];
3667 var37.i = ex->params[26];
3669 var38.i = ex->params[27];
3671 for (i = 0; i < n; i++) {
3677 var41.i = ORC_CLAMP(var40.i,-1,1);
3679 var42.i = ORC_ABS(var40.i);
3681 var43.i = var42.i << 2;
3683 var44.i = var43.i - var35.i;
3685 var45.i = ((orc_uint16)var44.i) >> ex->params[24];
3687 var46.i = (var45.i * var41.i) & 0xffff;
3693 var47.i = ORC_CLAMP(var46.i,-1,1);
3695 var48.i = (var45.i * var37.i) & 0xffff;
3697 var49.i = var48.i + var38.i;
3699 var50.i = var49.i >> 2;
3701 var39.i = (var50.i * var47.i) & 0xffff;
3708 /* orc_downsample_vert_u8 */
3710 _backup_orc_downsample_vert_u8 (OrcExecutor * ORC_RESTRICT ex)
3714 orc_int8 * ORC_RESTRICT ptr0;
3715 const orc_int8 * ORC_RESTRICT ptr4;
3716 const orc_int8 * ORC_RESTRICT ptr5;
3717 const orc_int8 * ORC_RESTRICT ptr6;
3718 const orc_int8 * ORC_RESTRICT ptr7;
3739 ptr0 = (orc_int8 *)ex->arrays[0];
3740 ptr4 = (orc_int8 *)ex->arrays[4];
3741 ptr5 = (orc_int8 *)ex->arrays[5];
3742 ptr6 = (orc_int8 *)ex->arrays[6];
3743 ptr7 = (orc_int8 *)ex->arrays[7];
3746 var37.i = 0x00000006; /* 6 or 2.96439e-323f */
3748 var40.i = 0x0000001a; /* 26 or 1.28457e-322f */
3750 var41.i = 0x00000020; /* 32 or 1.58101e-322f */
3752 for (i = 0; i < n; i++) {
3756 var43.i = (orc_uint8)var35;
3760 var44.i = (orc_uint8)var36;
3762 var45.i = var43.i + var44.i;
3764 var46.i = (var45.i * var37.i) & 0xffff;
3768 var47.i = (orc_uint8)var38;
3772 var48.i = (orc_uint8)var39;
3774 var49.i = var47.i + var48.i;
3776 var50.i = (var49.i * var40.i) & 0xffff;
3778 var51.i = var50.i + var46.i;
3780 var52.i = var51.i + var41.i;
3782 var53.i = ((orc_uint16)var52.i) >> 6;
3791 /* orc_downsample_horiz_u8 */
3793 _backup_orc_downsample_horiz_u8 (OrcExecutor * ORC_RESTRICT ex)
3797 orc_int8 * ORC_RESTRICT ptr0;
3798 const orc_union16 * ORC_RESTRICT ptr4;
3799 const orc_union16 * ORC_RESTRICT ptr5;
3824 ptr0 = (orc_int8 *)ex->arrays[0];
3825 ptr4 = (orc_union16 *)ex->arrays[4];
3826 ptr5 = (orc_union16 *)ex->arrays[5];
3829 var40.i = 0x00000006; /* 6 or 2.96439e-323f */
3831 var41.i = 0x0000001a; /* 26 or 1.28457e-322f */
3833 var42.i = 0x00000020; /* 32 or 1.58101e-322f */
3835 for (i = 0; i < n; i++) {
3845 var46 = (orc_uint16)var44.i & 0xff;
3847 var47.i = (orc_uint8)var46;
3849 var48 = ((orc_uint16)var45.i >> 8)&0xff;
3851 var49.i = (orc_uint8)var48;
3853 var50.i = var47.i + var49.i;
3855 var51.i = (var50.i * var40.i) & 0xffff;
3857 var52 = ((orc_uint16)var44.i >> 8)&0xff;
3859 var53.i = (orc_uint8)var52;
3861 var54 = (orc_uint16)var45.i & 0xff;
3863 var55.i = (orc_uint8)var54;
3865 var56.i = var53.i + var55.i;
3867 var57.i = (var56.i * var41.i) & 0xffff;
3869 var58.i = var51.i + var57.i;
3871 var59.i = var58.i + var42.i;
3873 var60.i = ((orc_uint16)var59.i) >> 6;
3882 /* orc_stats_moment_s16 */
3884 _backup_orc_stats_moment_s16 (OrcExecutor * ORC_RESTRICT ex)
3888 const orc_union16 * ORC_RESTRICT ptr4;
3889 orc_union32 var12 = { 0 };
3898 ptr4 = (orc_union16 *)ex->arrays[4];
3901 var35.i = 0x00000002; /* 2 or 9.88131e-324f */
3903 var36.i = 0x00000000; /* 0 or 0f */
3905 for (i = 0; i < n; i++) {
3909 var37.i = ORC_ABS(var34.i);
3911 var38.i = var37.i - var35.i;
3913 var39.i = ORC_MAX(var38.i, var36.i);
3915 var40.i = (orc_uint16)var39.i;
3917 var12.i = var12.i + var40.i;
3919 ex->accumulators[0] = var12.i;
3923 /* orc_stats_above_s16 */
3925 _backup_orc_stats_above_s16 (OrcExecutor * ORC_RESTRICT ex)
3929 const orc_union16 * ORC_RESTRICT ptr4;
3930 orc_union32 var12 = { 0 };
3941 ptr4 = (orc_union16 *)ex->arrays[4];
3944 var35.i = 0x00000001; /* 1 or 4.94066e-324f */
3946 var36.i = 0x00000000; /* 0 or 0f */
3948 var37.i = 0x00000001; /* 1 or 4.94066e-324f */
3950 for (i = 0; i < n; i++) {
3954 var38.i = ORC_ABS(var34.i);
3956 var39.i = var38.i - var35.i;
3958 var40.i = ORC_MAX(var39.i, var36.i);
3960 var41.i = ORC_MIN(var40.i, var37.i);
3962 var42.i = (orc_uint16)var41.i;
3964 var12.i = var12.i + var42.i;
3966 ex->accumulators[0] = var12.i;
3972 _backup_orc_accw (OrcExecutor * ORC_RESTRICT ex)
3976 const orc_union16 * ORC_RESTRICT ptr4;
3977 orc_union16 var12 = { 0 };
3981 ptr4 = (orc_union16 *)ex->arrays[4];
3984 for (i = 0; i < n; i++) {
3988 var34.i = ORC_ABS(var33.i);
3990 var12.i = var12.i + var34.i;
3992 ex->accumulators[0] = (var12.i & 0xffff);
3996 /* orc_avg2_8xn_u8 */
3998 _backup_orc_avg2_8xn_u8 (OrcExecutor * ORC_RESTRICT ex)
4003 int m = ex->params[ORC_VAR_A1];
4004 orc_int8 * ORC_RESTRICT ptr0;
4005 const orc_int8 * ORC_RESTRICT ptr4;
4006 const orc_int8 * ORC_RESTRICT ptr5;
4011 for (j = 0; j < m; j++) {
4012 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
4013 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
4014 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
4017 for (i = 0; i < n; i++) {
4023 var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1;
4031 /* orc_avg2_12xn_u8 */
4033 _backup_orc_avg2_12xn_u8 (OrcExecutor * ORC_RESTRICT ex)
4038 int m = ex->params[ORC_VAR_A1];
4039 orc_int8 * ORC_RESTRICT ptr0;
4040 const orc_int8 * ORC_RESTRICT ptr4;
4041 const orc_int8 * ORC_RESTRICT ptr5;
4046 for (j = 0; j < m; j++) {
4047 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
4048 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
4049 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
4052 for (i = 0; i < n; i++) {
4058 var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1;
4066 /* orc_avg2_16xn_u8 */
4068 _backup_orc_avg2_16xn_u8 (OrcExecutor * ORC_RESTRICT ex)
4073 int m = ex->params[ORC_VAR_A1];
4074 orc_int8 * ORC_RESTRICT ptr0;
4075 const orc_int8 * ORC_RESTRICT ptr4;
4076 const orc_int8 * ORC_RESTRICT ptr5;
4081 for (j = 0; j < m; j++) {
4082 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
4083 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
4084 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
4087 for (i = 0; i < n; i++) {
4093 var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1;
4101 /* orc_avg2_32xn_u8 */
4103 _backup_orc_avg2_32xn_u8 (OrcExecutor * ORC_RESTRICT ex)
4108 int m = ex->params[ORC_VAR_A1];
4109 orc_int8 * ORC_RESTRICT ptr0;
4110 const orc_int8 * ORC_RESTRICT ptr4;
4111 const orc_int8 * ORC_RESTRICT ptr5;
4116 for (j = 0; j < m; j++) {
4117 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
4118 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
4119 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
4122 for (i = 0; i < n; i++) {
4128 var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1;
4136 /* orc_avg2_nxm_u8 */
4138 _backup_orc_avg2_nxm_u8 (OrcExecutor * ORC_RESTRICT ex)
4143 int m = ex->params[ORC_VAR_A1];
4144 orc_int8 * ORC_RESTRICT ptr0;
4145 const orc_int8 * ORC_RESTRICT ptr4;
4146 const orc_int8 * ORC_RESTRICT ptr5;
4151 for (j = 0; j < m; j++) {
4152 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
4153 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
4154 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
4157 for (i = 0; i < n; i++) {
4163 var34 = ((orc_uint8)var32 + (orc_uint8)var33 + 1)>>1;
4171 /* orc_combine4_8xn_u8 */
4173 _backup_orc_combine4_8xn_u8 (OrcExecutor * ORC_RESTRICT ex)
4178 int m = ex->params[ORC_VAR_A1];
4179 orc_int8 * ORC_RESTRICT ptr0;
4180 const orc_int8 * ORC_RESTRICT ptr4;
4181 const orc_int8 * ORC_RESTRICT ptr5;
4182 const orc_int8 * ORC_RESTRICT ptr6;
4183 const orc_int8 * ORC_RESTRICT ptr7;
4207 for (j = 0; j < m; j++) {
4208 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
4209 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
4210 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
4211 ptr6 = ORC_PTR_OFFSET(ex->arrays[6], ex->params[6] * j);
4212 ptr7 = ORC_PTR_OFFSET(ex->arrays[7], ex->params[7] * j);
4215 var35.i = ex->params[24];
4217 var37.i = ex->params[25];
4219 var39.i = ex->params[26];
4221 var41.i = ex->params[27];
4223 var42.i = 0x00000008; /* 8 or 3.95253e-323f */
4225 for (i = 0; i < n; i++) {
4229 var44.i = (orc_uint8)var34;
4231 var45.i = (var44.i * var35.i) & 0xffff;
4235 var46.i = (orc_uint8)var36;
4237 var47.i = (var46.i * var37.i) & 0xffff;
4239 var48.i = var45.i + var47.i;
4243 var49.i = (orc_uint8)var38;
4245 var50.i = (var49.i * var39.i) & 0xffff;
4247 var51.i = var48.i + var50.i;
4251 var52.i = (orc_uint8)var40;
4253 var53.i = (var52.i * var41.i) & 0xffff;
4255 var54.i = var51.i + var53.i;
4257 var55.i = var54.i + var42.i;
4259 var43 = ORC_CLAMP_UB(var55.i);
4267 /* orc_combine4_12xn_u8 */
4269 _backup_orc_combine4_12xn_u8 (OrcExecutor * ORC_RESTRICT ex)
4274 int m = ex->params[ORC_VAR_A1];
4275 orc_int8 * ORC_RESTRICT ptr0;
4276 const orc_int8 * ORC_RESTRICT ptr4;
4277 const orc_int8 * ORC_RESTRICT ptr5;
4278 const orc_int8 * ORC_RESTRICT ptr6;
4279 const orc_int8 * ORC_RESTRICT ptr7;
4303 for (j = 0; j < m; j++) {
4304 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
4305 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
4306 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
4307 ptr6 = ORC_PTR_OFFSET(ex->arrays[6], ex->params[6] * j);
4308 ptr7 = ORC_PTR_OFFSET(ex->arrays[7], ex->params[7] * j);
4311 var35.i = ex->params[24];
4313 var37.i = ex->params[25];
4315 var39.i = ex->params[26];
4317 var41.i = ex->params[27];
4319 var42.i = 0x00000008; /* 8 or 3.95253e-323f */
4321 for (i = 0; i < n; i++) {
4325 var44.i = (orc_uint8)var34;
4327 var45.i = (var44.i * var35.i) & 0xffff;
4331 var46.i = (orc_uint8)var36;
4333 var47.i = (var46.i * var37.i) & 0xffff;
4335 var48.i = var45.i + var47.i;
4339 var49.i = (orc_uint8)var38;
4341 var50.i = (var49.i * var39.i) & 0xffff;
4343 var51.i = var48.i + var50.i;
4347 var52.i = (orc_uint8)var40;
4349 var53.i = (var52.i * var41.i) & 0xffff;
4351 var54.i = var51.i + var53.i;
4353 var55.i = var54.i + var42.i;
4355 var43 = ORC_CLAMP_UB(var55.i);
4363 /* orc_combine4_16xn_u8 */
4365 _backup_orc_combine4_16xn_u8 (OrcExecutor * ORC_RESTRICT ex)
4370 int m = ex->params[ORC_VAR_A1];
4371 orc_int8 * ORC_RESTRICT ptr0;
4372 const orc_int8 * ORC_RESTRICT ptr4;
4373 const orc_int8 * ORC_RESTRICT ptr5;
4374 const orc_int8 * ORC_RESTRICT ptr6;
4375 const orc_int8 * ORC_RESTRICT ptr7;
4399 for (j = 0; j < m; j++) {
4400 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
4401 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
4402 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
4403 ptr6 = ORC_PTR_OFFSET(ex->arrays[6], ex->params[6] * j);
4404 ptr7 = ORC_PTR_OFFSET(ex->arrays[7], ex->params[7] * j);
4407 var35.i = ex->params[24];
4409 var37.i = ex->params[25];
4411 var39.i = ex->params[26];
4413 var41.i = ex->params[27];
4415 var42.i = 0x00000008; /* 8 or 3.95253e-323f */
4417 for (i = 0; i < n; i++) {
4421 var44.i = (orc_uint8)var34;
4423 var45.i = (var44.i * var35.i) & 0xffff;
4427 var46.i = (orc_uint8)var36;
4429 var47.i = (var46.i * var37.i) & 0xffff;
4431 var48.i = var45.i + var47.i;
4435 var49.i = (orc_uint8)var38;
4437 var50.i = (var49.i * var39.i) & 0xffff;
4439 var51.i = var48.i + var50.i;
4443 var52.i = (orc_uint8)var40;
4445 var53.i = (var52.i * var41.i) & 0xffff;
4447 var54.i = var51.i + var53.i;
4449 var55.i = var54.i + var42.i;
4451 var43 = ORC_CLAMP_UB(var55.i);
4459 /* orc_combine4_24xn_u8 */
4461 _backup_orc_combine4_24xn_u8 (OrcExecutor * ORC_RESTRICT ex)
4466 int m = ex->params[ORC_VAR_A1];
4467 orc_int8 * ORC_RESTRICT ptr0;
4468 const orc_int8 * ORC_RESTRICT ptr4;
4469 const orc_int8 * ORC_RESTRICT ptr5;
4470 const orc_int8 * ORC_RESTRICT ptr6;
4471 const orc_int8 * ORC_RESTRICT ptr7;
4495 for (j = 0; j < m; j++) {
4496 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
4497 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
4498 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
4499 ptr6 = ORC_PTR_OFFSET(ex->arrays[6], ex->params[6] * j);
4500 ptr7 = ORC_PTR_OFFSET(ex->arrays[7], ex->params[7] * j);
4503 var35.i = ex->params[24];
4505 var37.i = ex->params[25];
4507 var39.i = ex->params[26];
4509 var41.i = ex->params[27];
4511 var42.i = 0x00000008; /* 8 or 3.95253e-323f */
4513 for (i = 0; i < n; i++) {
4517 var44.i = (orc_uint8)var34;
4519 var45.i = (var44.i * var35.i) & 0xffff;
4523 var46.i = (orc_uint8)var36;
4525 var47.i = (var46.i * var37.i) & 0xffff;
4527 var48.i = var45.i + var47.i;
4531 var49.i = (orc_uint8)var38;
4533 var50.i = (var49.i * var39.i) & 0xffff;
4535 var51.i = var48.i + var50.i;
4539 var52.i = (orc_uint8)var40;
4541 var53.i = (var52.i * var41.i) & 0xffff;
4543 var54.i = var51.i + var53.i;
4545 var55.i = var54.i + var42.i;
4547 var43 = ORC_CLAMP_UB(var55.i);
4555 /* orc_combine4_32xn_u8 */
4557 _backup_orc_combine4_32xn_u8 (OrcExecutor * ORC_RESTRICT ex)
4562 int m = ex->params[ORC_VAR_A1];
4563 orc_int8 * ORC_RESTRICT ptr0;
4564 const orc_int8 * ORC_RESTRICT ptr4;
4565 const orc_int8 * ORC_RESTRICT ptr5;
4566 const orc_int8 * ORC_RESTRICT ptr6;
4567 const orc_int8 * ORC_RESTRICT ptr7;
4591 for (j = 0; j < m; j++) {
4592 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
4593 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
4594 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
4595 ptr6 = ORC_PTR_OFFSET(ex->arrays[6], ex->params[6] * j);
4596 ptr7 = ORC_PTR_OFFSET(ex->arrays[7], ex->params[7] * j);
4599 var35.i = ex->params[24];
4601 var37.i = ex->params[25];
4603 var39.i = ex->params[26];
4605 var41.i = ex->params[27];
4607 var42.i = 0x00000008; /* 8 or 3.95253e-323f */
4609 for (i = 0; i < n; i++) {
4613 var44.i = (orc_uint8)var34;
4615 var45.i = (var44.i * var35.i) & 0xffff;
4619 var46.i = (orc_uint8)var36;
4621 var47.i = (var46.i * var37.i) & 0xffff;
4623 var48.i = var45.i + var47.i;
4627 var49.i = (orc_uint8)var38;
4629 var50.i = (var49.i * var39.i) & 0xffff;
4631 var51.i = var48.i + var50.i;
4635 var52.i = (orc_uint8)var40;
4637 var53.i = (var52.i * var41.i) & 0xffff;
4639 var54.i = var51.i + var53.i;
4641 var55.i = var54.i + var42.i;
4643 var43 = ORC_CLAMP_UB(var55.i);
4651 /* orc_combine4_nxm_u8 */
4653 _backup_orc_combine4_nxm_u8 (OrcExecutor * ORC_RESTRICT ex)
4658 int m = ex->params[ORC_VAR_A1];
4659 orc_int8 * ORC_RESTRICT ptr0;
4660 const orc_int8 * ORC_RESTRICT ptr4;
4661 const orc_int8 * ORC_RESTRICT ptr5;
4662 const orc_int8 * ORC_RESTRICT ptr6;
4663 const orc_int8 * ORC_RESTRICT ptr7;
4688 for (j = 0; j < m; j++) {
4689 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
4690 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
4691 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
4692 ptr6 = ORC_PTR_OFFSET(ex->arrays[6], ex->params[6] * j);
4693 ptr7 = ORC_PTR_OFFSET(ex->arrays[7], ex->params[7] * j);
4696 var35.i = ex->params[24];
4698 var37.i = ex->params[25];
4700 var39.i = ex->params[26];
4702 var41.i = ex->params[27];
4704 var42.i = 0x00000008; /* 8 or 3.95253e-323f */
4706 for (i = 0; i < n; i++) {
4710 var44.i = (orc_uint8)var34;
4712 var45.i = (var44.i * var35.i) & 0xffff;
4716 var46.i = (orc_uint8)var36;
4718 var47.i = (var46.i * var37.i) & 0xffff;
4720 var48.i = var45.i + var47.i;
4724 var49.i = (orc_uint8)var38;
4726 var50.i = (var49.i * var39.i) & 0xffff;
4728 var51.i = var48.i + var50.i;
4732 var52.i = (orc_uint8)var40;
4734 var53.i = (var52.i * var41.i) & 0xffff;
4736 var54.i = var51.i + var53.i;
4738 var55.i = var54.i + var42.i;
4740 var56.i = var55.i >> 4;
4742 var43 = ORC_CLAMP_UB(var56.i);
4750 /* orc_combine2_8xn_u8 */
4752 _backup_orc_combine2_8xn_u8 (OrcExecutor * ORC_RESTRICT ex)
4757 int m = ex->params[ORC_VAR_A1];
4758 orc_int8 * ORC_RESTRICT ptr0;
4759 const orc_int8 * ORC_RESTRICT ptr4;
4760 const orc_int8 * ORC_RESTRICT ptr5;
4775 for (j = 0; j < m; j++) {
4776 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
4777 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
4778 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
4781 var36.i = ex->params[24];
4783 var37.i = ex->params[25];
4785 var38.i = ex->params[26];
4787 for (i = 0; i < n; i++) {
4791 var40.i = (orc_uint8)var34;
4795 var41.i = (orc_uint8)var35;
4797 var42.i = (var40.i * var36.i) & 0xffff;
4799 var43.i = (var41.i * var37.i) & 0xffff;
4801 var44.i = var42.i + var43.i;
4803 var45.i = var44.i + var38.i;
4805 var46.i = var45.i >> ex->params[27];
4807 var39 = ORC_CLAMP_UB(var46.i);
4815 /* orc_combine2_12xn_u8 */
4817 _backup_orc_combine2_12xn_u8 (OrcExecutor * ORC_RESTRICT ex)
4822 int m = ex->params[ORC_VAR_A1];
4823 orc_int8 * ORC_RESTRICT ptr0;
4824 const orc_int8 * ORC_RESTRICT ptr4;
4825 const orc_int8 * ORC_RESTRICT ptr5;
4840 for (j = 0; j < m; j++) {
4841 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
4842 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
4843 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
4846 var36.i = ex->params[24];
4848 var37.i = ex->params[25];
4850 var38.i = ex->params[26];
4852 for (i = 0; i < n; i++) {
4856 var40.i = (orc_uint8)var34;
4860 var41.i = (orc_uint8)var35;
4862 var42.i = (var40.i * var36.i) & 0xffff;
4864 var43.i = (var41.i * var37.i) & 0xffff;
4866 var44.i = var42.i + var43.i;
4868 var45.i = var44.i + var38.i;
4870 var46.i = var45.i >> ex->params[27];
4872 var39 = ORC_CLAMP_UB(var46.i);
4880 /* orc_combine2_16xn_u8 */
4882 _backup_orc_combine2_16xn_u8 (OrcExecutor * ORC_RESTRICT ex)
4887 int m = ex->params[ORC_VAR_A1];
4888 orc_int8 * ORC_RESTRICT ptr0;
4889 const orc_int8 * ORC_RESTRICT ptr4;
4890 const orc_int8 * ORC_RESTRICT ptr5;
4905 for (j = 0; j < m; j++) {
4906 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
4907 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
4908 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
4911 var36.i = ex->params[24];
4913 var37.i = ex->params[25];
4915 var38.i = ex->params[26];
4917 for (i = 0; i < n; i++) {
4921 var40.i = (orc_uint8)var34;
4925 var41.i = (orc_uint8)var35;
4927 var42.i = (var40.i * var36.i) & 0xffff;
4929 var43.i = (var41.i * var37.i) & 0xffff;
4931 var44.i = var42.i + var43.i;
4933 var45.i = var44.i + var38.i;
4935 var46.i = var45.i >> ex->params[27];
4937 var39 = ORC_CLAMP_UB(var46.i);
4945 /* orc_combine2_nxm_u8 */
4947 _backup_orc_combine2_nxm_u8 (OrcExecutor * ORC_RESTRICT ex)
4952 int m = ex->params[ORC_VAR_A1];
4953 orc_int8 * ORC_RESTRICT ptr0;
4954 const orc_int8 * ORC_RESTRICT ptr4;
4955 const orc_int8 * ORC_RESTRICT ptr5;
4970 for (j = 0; j < m; j++) {
4971 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
4972 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
4973 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
4976 var36.i = ex->params[24];
4978 var37.i = ex->params[25];
4980 var38.i = ex->params[26];
4982 for (i = 0; i < n; i++) {
4986 var40.i = (orc_uint8)var34;
4990 var41.i = (orc_uint8)var35;
4992 var42.i = (var40.i * var36.i) & 0xffff;
4994 var43.i = (var41.i * var37.i) & 0xffff;
4996 var44.i = var42.i + var43.i;
4998 var45.i = var44.i + var38.i;
5000 var46.i = var45.i >> ex->params[27];
5002 var39 = ORC_CLAMP_UB(var46.i);
5010 /* orc_sad_nxm_u8 */
5012 _backup_orc_sad_nxm_u8 (OrcExecutor * ORC_RESTRICT ex)
5017 int m = ex->params[ORC_VAR_A1];
5018 const orc_int8 * ORC_RESTRICT ptr4;
5019 const orc_int8 * ORC_RESTRICT ptr5;
5020 orc_union32 var12 = { 0 };
5024 for (j = 0; j < m; j++) {
5025 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
5026 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
5029 for (i = 0; i < n; i++) {
5035 var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33);
5038 ex->accumulators[0] = var12.i;
5042 /* orc_sad_8x8_u8 */
5044 _backup_orc_sad_8x8_u8 (OrcExecutor * ORC_RESTRICT ex)
5050 const orc_int8 * ORC_RESTRICT ptr4;
5051 const orc_int8 * ORC_RESTRICT ptr5;
5052 orc_union32 var12 = { 0 };
5056 for (j = 0; j < m; j++) {
5057 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
5058 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
5061 for (i = 0; i < n; i++) {
5067 var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33);
5070 ex->accumulators[0] = var12.i;
5074 /* orc_sad_12x12_u8 */
5076 _backup_orc_sad_12x12_u8 (OrcExecutor * ORC_RESTRICT ex)
5082 const orc_int8 * ORC_RESTRICT ptr4;
5083 const orc_int8 * ORC_RESTRICT ptr5;
5084 orc_union32 var12 = { 0 };
5088 for (j = 0; j < m; j++) {
5089 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
5090 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
5093 for (i = 0; i < n; i++) {
5099 var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33);
5102 ex->accumulators[0] = var12.i;
5106 /* orc_sad_16xn_u8 */
5108 _backup_orc_sad_16xn_u8 (OrcExecutor * ORC_RESTRICT ex)
5113 int m = ex->params[ORC_VAR_A1];
5114 const orc_int8 * ORC_RESTRICT ptr4;
5115 const orc_int8 * ORC_RESTRICT ptr5;
5116 orc_union32 var12 = { 0 };
5120 for (j = 0; j < m; j++) {
5121 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
5122 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
5125 for (i = 0; i < n; i++) {
5131 var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33);
5134 ex->accumulators[0] = var12.i;
5138 /* orc_sad_32xn_u8 */
5140 _backup_orc_sad_32xn_u8 (OrcExecutor * ORC_RESTRICT ex)
5145 int m = ex->params[ORC_VAR_A1];
5146 const orc_int8 * ORC_RESTRICT ptr4;
5147 const orc_int8 * ORC_RESTRICT ptr5;
5148 orc_union32 var12 = { 0 };
5152 for (j = 0; j < m; j++) {
5153 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
5154 ptr5 = ORC_PTR_OFFSET(ex->arrays[5], ex->params[5] * j);
5157 for (i = 0; i < n; i++) {
5163 var12.i = var12.i + ORC_ABS((orc_int32)(orc_uint8)var32 - (orc_int32)(orc_uint8)var33);
5166 ex->accumulators[0] = var12.i;
5170 /* convert_rgb_to_gray */
5172 _backup_convert_rgb_to_gray (OrcExecutor * ORC_RESTRICT ex)
5176 orc_int8 * ORC_RESTRICT ptr0;
5177 const orc_union32 * ORC_RESTRICT ptr4;
5205 ptr0 = (orc_int8 *)ex->arrays[0];
5206 ptr4 = (orc_union32 *)ex->arrays[4];
5209 var36.i = 0x00004c8b; /* 19595 or 9.68122e-320f */
5211 var38.i = 0x00009646; /* 38470 or 1.90067e-319f */
5213 var40.i = 0x00001d2f; /* 7471 or 3.69116e-320f */
5215 var41.i = 0x00000080; /* 128 or 6.32404e-322f */
5217 for (i = 0; i < n; i++) {
5221 var43.i = (orc_uint32)var35.i & 0xffff;
5223 var44 = (orc_uint16)var43.i & 0xff;
5225 var45.i = (orc_uint8)var44;
5227 var46.i = ORC_SWAP_W(var45.i);
5229 var47.i = ((orc_uint32)((orc_uint16)var46.i) * (orc_uint32)((orc_uint16)var36.i)) >> 16;
5233 var48.i = (orc_uint32)var37.i & 0xffff;
5235 var49 = ((orc_uint16)var48.i >> 8)&0xff;
5237 var50.i = (orc_uint8)var49;
5239 var51.i = ORC_SWAP_W(var50.i);
5241 var52.i = ((orc_uint32)((orc_uint16)var51.i) * (orc_uint32)((orc_uint16)var38.i)) >> 16;
5243 var53.i = ORC_CLAMP_UW((orc_uint16)var47.i + (orc_uint16)var52.i);
5247 var54.i = ((orc_uint32)var39.i >> 16)&0xffff;
5249 var55 = (orc_uint16)var54.i & 0xff;
5251 var56.i = (orc_uint8)var55;
5253 var57.i = ORC_SWAP_W(var56.i);
5255 var58.i = ((orc_uint32)((orc_uint16)var57.i) * (orc_uint32)((orc_uint16)var40.i)) >> 16;
5257 var59.i = ORC_CLAMP_UW((orc_uint16)var53.i + (orc_uint16)var58.i);
5259 var60.i = ORC_CLAMP_UW((orc_uint16)var59.i + (orc_uint16)var41.i);
5261 var42 = ((orc_uint16)var60.i >> 8)&0xff;
5268 /* canny_calc_delta_x */
5270 _backup_canny_calc_delta_x (OrcExecutor * ORC_RESTRICT ex)
5274 orc_union32 * ORC_RESTRICT ptr0;
5275 const orc_union32 * ORC_RESTRICT ptr4;
5276 const orc_union32 * ORC_RESTRICT ptr5;
5313 ptr0 = (orc_union32 *)ex->arrays[0];
5314 ptr4 = (orc_union32 *)ex->arrays[4];
5315 ptr5 = (orc_union32 *)ex->arrays[5];
5318 for (i = 0; i < n; i++) {
5322 var47.i = (orc_uint32)var40.i & 0xffff;
5324 var48 = ((orc_uint16)var47.i >> 8)&0xff;
5328 var49.i = (orc_uint32)var41.i & 0xffff;
5330 var50 = ((orc_uint16)var49.i >> 8)&0xff;
5332 var51.i = (orc_uint8)var48;
5334 var52.i = (orc_uint8)var50;
5336 var53.i = var51.i - var52.i;
5340 var55.i = (var54.i * var54.i) & 0xffffffff;
5344 var56.i = ((orc_uint32)var42.i >> 16)&0xffff;
5346 var57 = (orc_uint16)var56.i & 0xff;
5350 var58.i = ((orc_uint32)var43.i >> 16)&0xffff;
5352 var59 = (orc_uint16)var58.i & 0xff;
5354 var60.i = (orc_uint8)var57;
5356 var61.i = (orc_uint8)var59;
5358 var62.i = var60.i - var61.i;
5362 var64.i = (var63.i * var63.i) & 0xffffffff;
5364 var65.i = var55.i + var64.i;
5368 var66.i = ((orc_uint32)var44.i >> 16)&0xffff;
5370 var67 = ((orc_uint16)var66.i >> 8)&0xff;
5374 var68.i = ((orc_uint32)var45.i >> 16)&0xffff;
5376 var69 = ((orc_uint16)var68.i >> 8)&0xff;
5378 var70.i = (orc_uint8)var67;
5380 var71.i = (orc_uint8)var69;
5382 var72.i = var70.i - var71.i;
5386 var74.i = (var73.i * var73.i) & 0xffffffff;
5388 var46.i = var65.i + var74.i;
5397 _backup_i420_to_ayuv (OrcExecutor * ORC_RESTRICT ex)
5401 orc_union32 * ORC_RESTRICT ptr0;
5402 const orc_int8 * ORC_RESTRICT ptr4;
5403 const orc_int8 * ORC_RESTRICT ptr5;
5404 const orc_int8 * ORC_RESTRICT ptr6;
5413 ptr0 = (orc_union32 *)ex->arrays[0];
5414 ptr4 = (orc_int8 *)ex->arrays[4];
5415 ptr5 = (orc_int8 *)ex->arrays[5];
5416 ptr6 = (orc_int8 *)ex->arrays[6];
5419 var37 = ex->params[24];
5421 for (i = 0; i < n; i++) {
5429 var42.i = ((orc_uint8)var37 & 0x00ff) | ((orc_uint8)var41 << 8);
5431 var43.i = ((orc_uint8)var39 & 0x00ff) | ((orc_uint8)var40 << 8);
5433 var38.i = ((orc_uint16)var42.i & 0x0000ffff) | ((orc_uint16)var43.i << 16);
5442 _backup_test_4x (OrcExecutor * ORC_RESTRICT ex)
5446 orc_union32 * ORC_RESTRICT ptr0;
5447 const orc_union32 * ORC_RESTRICT ptr4;
5448 const orc_union32 * ORC_RESTRICT ptr5;
5453 ptr0 = (orc_union32 *)ex->arrays[0];
5454 ptr4 = (orc_union32 *)ex->arrays[4];
5455 ptr5 = (orc_union32 *)ex->arrays[5];
5458 for (i = 0; i < n; i++) {
5464 var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]);
5465 var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]);
5466 var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]);
5467 var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]);
5476 _backup_test_4x_2 (OrcExecutor * ORC_RESTRICT ex)
5480 orc_union32 * ORC_RESTRICT ptr0;
5481 const orc_union32 * ORC_RESTRICT ptr4;
5486 ptr0 = (orc_union32 *)ex->arrays[0];
5487 ptr4 = (orc_union32 *)ex->arrays[4];
5490 var33.x4[0] = ex->params[24];
5491 var33.x4[1] = ex->params[24];
5492 var33.x4[2] = ex->params[24];
5493 var33.x4[3] = ex->params[24];
5495 for (i = 0; i < n; i++) {
5499 var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]);
5500 var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]);
5501 var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]);
5502 var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]);
5511 _backup_orc_splat_u16 (OrcExecutor * ORC_RESTRICT ex)
5515 orc_union16 * ORC_RESTRICT ptr0;
5519 ptr0 = (orc_union16 *)ex->arrays[0];
5522 var32.i = ex->params[24];
5524 for (i = 0; i < n; i++) {
5535 _backup_orc_splat_u32 (OrcExecutor * ORC_RESTRICT ex)
5539 orc_union32 * ORC_RESTRICT ptr0;
5543 ptr0 = (orc_union32 *)ex->arrays[0];
5546 var32.i = ex->params[24];
5548 for (i = 0; i < n; i++) {
5557 /* orc_splat_u16_2d */
5559 _backup_orc_splat_u16_2d (OrcExecutor * ORC_RESTRICT ex)
5564 int m = ex->params[ORC_VAR_A1];
5565 orc_union16 * ORC_RESTRICT ptr0;
5569 for (j = 0; j < m; j++) {
5570 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
5573 var32.i = ex->params[24];
5575 for (i = 0; i < n; i++) {
5585 /* orc_splat_u32_2d */
5587 _backup_orc_splat_u32_2d (OrcExecutor * ORC_RESTRICT ex)
5592 int m = ex->params[ORC_VAR_A1];
5593 orc_union32 * ORC_RESTRICT ptr0;
5597 for (j = 0; j < m; j++) {
5598 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
5601 var32.i = ex->params[24];
5603 for (i = 0; i < n; i++) {
5613 /* orc_copy_u16_2d */
5615 _backup_orc_copy_u16_2d (OrcExecutor * ORC_RESTRICT ex)
5620 int m = ex->params[ORC_VAR_A1];
5621 orc_union16 * ORC_RESTRICT ptr0;
5622 const orc_union16 * ORC_RESTRICT ptr4;
5626 for (j = 0; j < m; j++) {
5627 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
5628 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
5631 for (i = 0; i < n; i++) {
5643 /* orc_copy_u32_2d */
5645 _backup_orc_copy_u32_2d (OrcExecutor * ORC_RESTRICT ex)
5650 int m = ex->params[ORC_VAR_A1];
5651 orc_union32 * ORC_RESTRICT ptr0;
5652 const orc_union32 * ORC_RESTRICT ptr4;
5656 for (j = 0; j < m; j++) {
5657 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
5658 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
5661 for (i = 0; i < n; i++) {
5673 /* orc_composite_add_8888_8888_2d */
5675 _backup_orc_composite_add_8888_8888_2d (OrcExecutor * ORC_RESTRICT ex)
5680 int m = ex->params[ORC_VAR_A1];
5681 orc_union32 * ORC_RESTRICT ptr0;
5682 const orc_union32 * ORC_RESTRICT ptr4;
5687 for (j = 0; j < m; j++) {
5688 ptr0 = ORC_PTR_OFFSET(ex->arrays[0], ex->params[0] * j);
5689 ptr4 = ORC_PTR_OFFSET(ex->arrays[4], ex->params[4] * j);
5692 for (i = 0; i < n; i++) {
5698 var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]);
5699 var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]);
5700 var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]);
5701 var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]);
5709 /* orc_composite_add_8_8_line */
5711 _backup_orc_composite_add_8_8_line (OrcExecutor * ORC_RESTRICT ex)
5715 orc_int8 * ORC_RESTRICT ptr0;
5716 const orc_int8 * ORC_RESTRICT ptr4;
5721 ptr0 = (orc_int8 *)ex->arrays[0];
5722 ptr4 = (orc_int8 *)ex->arrays[4];
5725 for (i = 0; i < n; i++) {
5731 var34 = ORC_CLAMP_UB((orc_uint8)var32 + (orc_uint8)var33);
5738 /* orc_composite_add_n_8_8_line */
5740 _backup_orc_composite_add_n_8_8_line (OrcExecutor * ORC_RESTRICT ex)
5744 orc_int8 * ORC_RESTRICT ptr0;
5745 const orc_int8 * ORC_RESTRICT ptr4;
5755 ptr0 = (orc_int8 *)ex->arrays[0];
5756 ptr4 = (orc_int8 *)ex->arrays[4];
5759 var35.i = ex->params[24];
5761 for (i = 0; i < n; i++) {
5765 var38.i = (orc_uint8)var34;
5767 var39.i = (var38.i * var35.i) & 0xffff;
5769 var40.i = ((uint16_t)(((orc_uint16)(var39.i+128)) + (((orc_uint16)(var39.i+128))>>8)))>>8;
5775 var37 = ORC_CLAMP_UB((orc_uint8)var36 + (orc_uint8)var41);
5782 /* orc_code_combine_add_u */
5784 _backup_orc_code_combine_add_u (OrcExecutor * ORC_RESTRICT ex)
5788 orc_union32 * ORC_RESTRICT ptr0;
5789 const orc_union32 * ORC_RESTRICT ptr4;
5790 const orc_union32 * ORC_RESTRICT ptr5;
5802 ptr0 = (orc_union32 *)ex->arrays[0];
5803 ptr4 = (orc_union32 *)ex->arrays[4];
5804 ptr5 = (orc_union32 *)ex->arrays[5];
5807 for (i = 0; i < n; i++) {
5811 var39.x4[0] = (orc_uint8)var35.x4[0];
5812 var39.x4[1] = (orc_uint8)var35.x4[1];
5813 var39.x4[2] = (orc_uint8)var35.x4[2];
5814 var39.x4[3] = (orc_uint8)var35.x4[3];
5818 var40.x4[0] = (orc_uint8)var36.x4[0];
5819 var40.x4[1] = (orc_uint8)var36.x4[1];
5820 var40.x4[2] = (orc_uint8)var36.x4[2];
5821 var40.x4[3] = (orc_uint8)var36.x4[3];
5823 var41.i = ((((orc_uint64)var40.i)>>48) << 48) | ((((orc_uint64)var40.i)>>48)<<32) | ((((orc_uint64)var40.i)>>48) << 16) | ((((orc_uint64)var40.i)>>48));
5825 var42.x4[0] = (var39.x4[0] * var41.x4[0]) & 0xffff;
5826 var42.x4[1] = (var39.x4[1] * var41.x4[1]) & 0xffff;
5827 var42.x4[2] = (var39.x4[2] * var41.x4[2]) & 0xffff;
5828 var42.x4[3] = (var39.x4[3] * var41.x4[3]) & 0xffff;
5830 var43.x4[0] = ((uint16_t)(((orc_uint16)(var42.x4[0]+128)) + (((orc_uint16)(var42.x4[0]+128))>>8)))>>8;
5831 var43.x4[1] = ((uint16_t)(((orc_uint16)(var42.x4[1]+128)) + (((orc_uint16)(var42.x4[1]+128))>>8)))>>8;
5832 var43.x4[2] = ((uint16_t)(((orc_uint16)(var42.x4[2]+128)) + (((orc_uint16)(var42.x4[2]+128))>>8)))>>8;
5833 var43.x4[3] = ((uint16_t)(((orc_uint16)(var42.x4[3]+128)) + (((orc_uint16)(var42.x4[3]+128))>>8)))>>8;
5835 var44.x4[0] = var43.x4[0];
5836 var44.x4[1] = var43.x4[1];
5837 var44.x4[2] = var43.x4[2];
5838 var44.x4[3] = var43.x4[3];
5842 var38.x4[0] = ORC_CLAMP_UB((orc_uint8)var37.x4[0] + (orc_uint8)var44.x4[0]);
5843 var38.x4[1] = ORC_CLAMP_UB((orc_uint8)var37.x4[1] + (orc_uint8)var44.x4[1]);
5844 var38.x4[2] = ORC_CLAMP_UB((orc_uint8)var37.x4[2] + (orc_uint8)var44.x4[2]);
5845 var38.x4[3] = ORC_CLAMP_UB((orc_uint8)var37.x4[3] + (orc_uint8)var44.x4[3]);
5852 /* orc_code_combine_add_u_n */
5854 _backup_orc_code_combine_add_u_n (OrcExecutor * ORC_RESTRICT ex)
5858 orc_union32 * ORC_RESTRICT ptr0;
5859 const orc_union32 * ORC_RESTRICT ptr4;
5864 ptr0 = (orc_union32 *)ex->arrays[0];
5865 ptr4 = (orc_union32 *)ex->arrays[4];
5868 for (i = 0; i < n; i++) {
5874 var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]);
5875 var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]);
5876 var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]);
5877 var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]);
5884 /* orc_code_combine_over_u */
5886 _backup_orc_code_combine_over_u (OrcExecutor * ORC_RESTRICT ex)
5890 orc_union32 * ORC_RESTRICT ptr0;
5891 const orc_union32 * ORC_RESTRICT ptr4;
5892 const orc_union32 * ORC_RESTRICT ptr5;
5911 ptr0 = (orc_union32 *)ex->arrays[0];
5912 ptr4 = (orc_union32 *)ex->arrays[4];
5913 ptr5 = (orc_union32 *)ex->arrays[5];
5916 var39.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */
5917 var39.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */
5918 var39.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */
5919 var39.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */
5921 for (i = 0; i < n; i++) {
5925 var41.x4[0] = (orc_uint8)var37.x4[0];
5926 var41.x4[1] = (orc_uint8)var37.x4[1];
5927 var41.x4[2] = (orc_uint8)var37.x4[2];
5928 var41.x4[3] = (orc_uint8)var37.x4[3];
5932 var42.x4[0] = (orc_uint8)var38.x4[0];
5933 var42.x4[1] = (orc_uint8)var38.x4[1];
5934 var42.x4[2] = (orc_uint8)var38.x4[2];
5935 var42.x4[3] = (orc_uint8)var38.x4[3];
5937 var43.i = ((((orc_uint64)var42.i)>>48) << 48) | ((((orc_uint64)var42.i)>>48)<<32) | ((((orc_uint64)var42.i)>>48) << 16) | ((((orc_uint64)var42.i)>>48));
5939 var44.x4[0] = (var41.x4[0] * var43.x4[0]) & 0xffff;
5940 var44.x4[1] = (var41.x4[1] * var43.x4[1]) & 0xffff;
5941 var44.x4[2] = (var41.x4[2] * var43.x4[2]) & 0xffff;
5942 var44.x4[3] = (var41.x4[3] * var43.x4[3]) & 0xffff;
5944 var45.x4[0] = ((uint16_t)(((orc_uint16)(var44.x4[0]+128)) + (((orc_uint16)(var44.x4[0]+128))>>8)))>>8;
5945 var45.x4[1] = ((uint16_t)(((orc_uint16)(var44.x4[1]+128)) + (((orc_uint16)(var44.x4[1]+128))>>8)))>>8;
5946 var45.x4[2] = ((uint16_t)(((orc_uint16)(var44.x4[2]+128)) + (((orc_uint16)(var44.x4[2]+128))>>8)))>>8;
5947 var45.x4[3] = ((uint16_t)(((orc_uint16)(var44.x4[3]+128)) + (((orc_uint16)(var44.x4[3]+128))>>8)))>>8;
5949 var46.x4[0] = var45.x4[0];
5950 var46.x4[1] = var45.x4[1];
5951 var46.x4[2] = var45.x4[2];
5952 var46.x4[3] = var45.x4[3];
5956 var48.x4[0] = (orc_uint8)var47.x4[0];
5957 var48.x4[1] = (orc_uint8)var47.x4[1];
5958 var48.x4[2] = (orc_uint8)var47.x4[2];
5959 var48.x4[3] = (orc_uint8)var47.x4[3];
5961 var49.x4[0] = var45.x4[0] ^ var39.x4[0];
5962 var49.x4[1] = var45.x4[1] ^ var39.x4[1];
5963 var49.x4[2] = var45.x4[2] ^ var39.x4[2];
5964 var49.x4[3] = var45.x4[3] ^ var39.x4[3];
5966 var50.i = ((((orc_uint64)var49.i)>>48) << 48) | ((((orc_uint64)var49.i)>>48)<<32) | ((((orc_uint64)var49.i)>>48) << 16) | ((((orc_uint64)var49.i)>>48));
5968 var51.x4[0] = (var48.x4[0] * var50.x4[0]) & 0xffff;
5969 var51.x4[1] = (var48.x4[1] * var50.x4[1]) & 0xffff;
5970 var51.x4[2] = (var48.x4[2] * var50.x4[2]) & 0xffff;
5971 var51.x4[3] = (var48.x4[3] * var50.x4[3]) & 0xffff;
5973 var52.x4[0] = ((uint16_t)(((orc_uint16)(var51.x4[0]+128)) + (((orc_uint16)(var51.x4[0]+128))>>8)))>>8;
5974 var52.x4[1] = ((uint16_t)(((orc_uint16)(var51.x4[1]+128)) + (((orc_uint16)(var51.x4[1]+128))>>8)))>>8;
5975 var52.x4[2] = ((uint16_t)(((orc_uint16)(var51.x4[2]+128)) + (((orc_uint16)(var51.x4[2]+128))>>8)))>>8;
5976 var52.x4[3] = ((uint16_t)(((orc_uint16)(var51.x4[3]+128)) + (((orc_uint16)(var51.x4[3]+128))>>8)))>>8;
5978 var53.x4[0] = var52.x4[0];
5979 var53.x4[1] = var52.x4[1];
5980 var53.x4[2] = var52.x4[2];
5981 var53.x4[3] = var52.x4[3];
5983 var40.x4[0] = ORC_CLAMP_UB((orc_uint8)var53.x4[0] + (orc_uint8)var46.x4[0]);
5984 var40.x4[1] = ORC_CLAMP_UB((orc_uint8)var53.x4[1] + (orc_uint8)var46.x4[1]);
5985 var40.x4[2] = ORC_CLAMP_UB((orc_uint8)var53.x4[2] + (orc_uint8)var46.x4[2]);
5986 var40.x4[3] = ORC_CLAMP_UB((orc_uint8)var53.x4[3] + (orc_uint8)var46.x4[3]);
5993 /* orc_code_combine_over_u_n */
5995 _backup_orc_code_combine_over_u_n (OrcExecutor * ORC_RESTRICT ex)
5999 orc_union32 * ORC_RESTRICT ptr0;
6000 const orc_union32 * ORC_RESTRICT ptr4;
6013 ptr0 = (orc_union32 *)ex->arrays[0];
6014 ptr4 = (orc_union32 *)ex->arrays[4];
6017 var37.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */
6018 var37.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */
6019 var37.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */
6020 var37.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */
6022 for (i = 0; i < n; i++) {
6026 var40.x4[0] = (orc_uint8)var39.x4[0];
6027 var40.x4[1] = (orc_uint8)var39.x4[1];
6028 var40.x4[2] = (orc_uint8)var39.x4[2];
6029 var40.x4[3] = (orc_uint8)var39.x4[3];
6033 var42.x4[0] = (orc_uint8)var41.x4[0];
6034 var42.x4[1] = (orc_uint8)var41.x4[1];
6035 var42.x4[2] = (orc_uint8)var41.x4[2];
6036 var42.x4[3] = (orc_uint8)var41.x4[3];
6038 var43.x4[0] = var40.x4[0] ^ var37.x4[0];
6039 var43.x4[1] = var40.x4[1] ^ var37.x4[1];
6040 var43.x4[2] = var40.x4[2] ^ var37.x4[2];
6041 var43.x4[3] = var40.x4[3] ^ var37.x4[3];
6043 var44.i = ((((orc_uint64)var43.i)>>48) << 48) | ((((orc_uint64)var43.i)>>48)<<32) | ((((orc_uint64)var43.i)>>48) << 16) | ((((orc_uint64)var43.i)>>48));
6045 var45.x4[0] = (var42.x4[0] * var44.x4[0]) & 0xffff;
6046 var45.x4[1] = (var42.x4[1] * var44.x4[1]) & 0xffff;
6047 var45.x4[2] = (var42.x4[2] * var44.x4[2]) & 0xffff;
6048 var45.x4[3] = (var42.x4[3] * var44.x4[3]) & 0xffff;
6050 var46.x4[0] = ((uint16_t)(((orc_uint16)(var45.x4[0]+128)) + (((orc_uint16)(var45.x4[0]+128))>>8)))>>8;
6051 var46.x4[1] = ((uint16_t)(((orc_uint16)(var45.x4[1]+128)) + (((orc_uint16)(var45.x4[1]+128))>>8)))>>8;
6052 var46.x4[2] = ((uint16_t)(((orc_uint16)(var45.x4[2]+128)) + (((orc_uint16)(var45.x4[2]+128))>>8)))>>8;
6053 var46.x4[3] = ((uint16_t)(((orc_uint16)(var45.x4[3]+128)) + (((orc_uint16)(var45.x4[3]+128))>>8)))>>8;
6055 var47.x4[0] = var46.x4[0];
6056 var47.x4[1] = var46.x4[1];
6057 var47.x4[2] = var46.x4[2];
6058 var47.x4[3] = var46.x4[3];
6060 var38.x4[0] = ORC_CLAMP_UB((orc_uint8)var47.x4[0] + (orc_uint8)var39.x4[0]);
6061 var38.x4[1] = ORC_CLAMP_UB((orc_uint8)var47.x4[1] + (orc_uint8)var39.x4[1]);
6062 var38.x4[2] = ORC_CLAMP_UB((orc_uint8)var47.x4[2] + (orc_uint8)var39.x4[2]);
6063 var38.x4[3] = ORC_CLAMP_UB((orc_uint8)var47.x4[3] + (orc_uint8)var39.x4[3]);
6070 /* orc_code_combine_in_u */
6072 _backup_orc_code_combine_in_u (OrcExecutor * ORC_RESTRICT ex)
6076 orc_union32 * ORC_RESTRICT ptr0;
6077 const orc_union32 * ORC_RESTRICT ptr4;
6078 const orc_union32 * ORC_RESTRICT ptr5;
6093 ptr0 = (orc_union32 *)ex->arrays[0];
6094 ptr4 = (orc_union32 *)ex->arrays[4];
6095 ptr5 = (orc_union32 *)ex->arrays[5];
6098 for (i = 0; i < n; i++) {
6102 var41.x4[0] = (orc_uint8)var37.x4[0];
6103 var41.x4[1] = (orc_uint8)var37.x4[1];
6104 var41.x4[2] = (orc_uint8)var37.x4[2];
6105 var41.x4[3] = (orc_uint8)var37.x4[3];
6109 var42.x4[0] = (orc_uint8)var38.x4[0];
6110 var42.x4[1] = (orc_uint8)var38.x4[1];
6111 var42.x4[2] = (orc_uint8)var38.x4[2];
6112 var42.x4[3] = (orc_uint8)var38.x4[3];
6114 var43.i = ((((orc_uint64)var42.i)>>48) << 48) | ((((orc_uint64)var42.i)>>48)<<32) | ((((orc_uint64)var42.i)>>48) << 16) | ((((orc_uint64)var42.i)>>48));
6116 var44.x4[0] = (var41.x4[0] * var43.x4[0]) & 0xffff;
6117 var44.x4[1] = (var41.x4[1] * var43.x4[1]) & 0xffff;
6118 var44.x4[2] = (var41.x4[2] * var43.x4[2]) & 0xffff;
6119 var44.x4[3] = (var41.x4[3] * var43.x4[3]) & 0xffff;
6121 var45.x4[0] = ((uint16_t)(((orc_uint16)(var44.x4[0]+128)) + (((orc_uint16)(var44.x4[0]+128))>>8)))>>8;
6122 var45.x4[1] = ((uint16_t)(((orc_uint16)(var44.x4[1]+128)) + (((orc_uint16)(var44.x4[1]+128))>>8)))>>8;
6123 var45.x4[2] = ((uint16_t)(((orc_uint16)(var44.x4[2]+128)) + (((orc_uint16)(var44.x4[2]+128))>>8)))>>8;
6124 var45.x4[3] = ((uint16_t)(((orc_uint16)(var44.x4[3]+128)) + (((orc_uint16)(var44.x4[3]+128))>>8)))>>8;
6128 var46.x4[0] = (orc_uint8)var39.x4[0];
6129 var46.x4[1] = (orc_uint8)var39.x4[1];
6130 var46.x4[2] = (orc_uint8)var39.x4[2];
6131 var46.x4[3] = (orc_uint8)var39.x4[3];
6133 var47.i = ((((orc_uint64)var46.i)>>48) << 48) | ((((orc_uint64)var46.i)>>48)<<32) | ((((orc_uint64)var46.i)>>48) << 16) | ((((orc_uint64)var46.i)>>48));
6135 var48.x4[0] = (var45.x4[0] * var47.x4[0]) & 0xffff;
6136 var48.x4[1] = (var45.x4[1] * var47.x4[1]) & 0xffff;
6137 var48.x4[2] = (var45.x4[2] * var47.x4[2]) & 0xffff;
6138 var48.x4[3] = (var45.x4[3] * var47.x4[3]) & 0xffff;
6140 var49.x4[0] = ((uint16_t)(((orc_uint16)(var48.x4[0]+128)) + (((orc_uint16)(var48.x4[0]+128))>>8)))>>8;
6141 var49.x4[1] = ((uint16_t)(((orc_uint16)(var48.x4[1]+128)) + (((orc_uint16)(var48.x4[1]+128))>>8)))>>8;
6142 var49.x4[2] = ((uint16_t)(((orc_uint16)(var48.x4[2]+128)) + (((orc_uint16)(var48.x4[2]+128))>>8)))>>8;
6143 var49.x4[3] = ((uint16_t)(((orc_uint16)(var48.x4[3]+128)) + (((orc_uint16)(var48.x4[3]+128))>>8)))>>8;
6145 var40.x4[0] = var49.x4[0];
6146 var40.x4[1] = var49.x4[1];
6147 var40.x4[2] = var49.x4[2];
6148 var40.x4[3] = var49.x4[3];
6155 /* orc_code_combine_in_u_n */
6157 _backup_orc_code_combine_in_u_n (OrcExecutor * ORC_RESTRICT ex)
6161 orc_union32 * ORC_RESTRICT ptr0;
6162 const orc_union32 * ORC_RESTRICT ptr4;
6172 ptr0 = (orc_union32 *)ex->arrays[0];
6173 ptr4 = (orc_union32 *)ex->arrays[4];
6176 for (i = 0; i < n; i++) {
6180 var40.x4[0] = (orc_uint8)var37.x4[0];
6181 var40.x4[1] = (orc_uint8)var37.x4[1];
6182 var40.x4[2] = (orc_uint8)var37.x4[2];
6183 var40.x4[3] = (orc_uint8)var37.x4[3];
6187 var41.x4[0] = (orc_uint8)var38.x4[0];
6188 var41.x4[1] = (orc_uint8)var38.x4[1];
6189 var41.x4[2] = (orc_uint8)var38.x4[2];
6190 var41.x4[3] = (orc_uint8)var38.x4[3];
6192 var42.i = ((((orc_uint64)var41.i)>>48) << 48) | ((((orc_uint64)var41.i)>>48)<<32) | ((((orc_uint64)var41.i)>>48) << 16) | ((((orc_uint64)var41.i)>>48));
6194 var43.x4[0] = (var40.x4[0] * var42.x4[0]) & 0xffff;
6195 var43.x4[1] = (var40.x4[1] * var42.x4[1]) & 0xffff;
6196 var43.x4[2] = (var40.x4[2] * var42.x4[2]) & 0xffff;
6197 var43.x4[3] = (var40.x4[3] * var42.x4[3]) & 0xffff;
6199 var44.x4[0] = ((uint16_t)(((orc_uint16)(var43.x4[0]+128)) + (((orc_uint16)(var43.x4[0]+128))>>8)))>>8;
6200 var44.x4[1] = ((uint16_t)(((orc_uint16)(var43.x4[1]+128)) + (((orc_uint16)(var43.x4[1]+128))>>8)))>>8;
6201 var44.x4[2] = ((uint16_t)(((orc_uint16)(var43.x4[2]+128)) + (((orc_uint16)(var43.x4[2]+128))>>8)))>>8;
6202 var44.x4[3] = ((uint16_t)(((orc_uint16)(var43.x4[3]+128)) + (((orc_uint16)(var43.x4[3]+128))>>8)))>>8;
6204 var39.x4[0] = var44.x4[0];
6205 var39.x4[1] = var44.x4[1];
6206 var39.x4[2] = var44.x4[2];
6207 var39.x4[3] = var44.x4[3];
6214 /* orc_code_combine_out_u */
6216 _backup_orc_code_combine_out_u (OrcExecutor * ORC_RESTRICT ex)
6220 orc_union32 * ORC_RESTRICT ptr0;
6221 const orc_union32 * ORC_RESTRICT ptr4;
6222 const orc_union32 * ORC_RESTRICT ptr5;
6239 ptr0 = (orc_union32 *)ex->arrays[0];
6240 ptr4 = (orc_union32 *)ex->arrays[4];
6241 ptr5 = (orc_union32 *)ex->arrays[5];
6244 var40.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */
6245 var40.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */
6246 var40.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */
6247 var40.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */
6249 for (i = 0; i < n; i++) {
6253 var42.x4[0] = (orc_uint8)var37.x4[0];
6254 var42.x4[1] = (orc_uint8)var37.x4[1];
6255 var42.x4[2] = (orc_uint8)var37.x4[2];
6256 var42.x4[3] = (orc_uint8)var37.x4[3];
6260 var43.x4[0] = (orc_uint8)var38.x4[0];
6261 var43.x4[1] = (orc_uint8)var38.x4[1];
6262 var43.x4[2] = (orc_uint8)var38.x4[2];
6263 var43.x4[3] = (orc_uint8)var38.x4[3];
6265 var44.i = ((((orc_uint64)var43.i)>>48) << 48) | ((((orc_uint64)var43.i)>>48)<<32) | ((((orc_uint64)var43.i)>>48) << 16) | ((((orc_uint64)var43.i)>>48));
6267 var45.x4[0] = (var42.x4[0] * var44.x4[0]) & 0xffff;
6268 var45.x4[1] = (var42.x4[1] * var44.x4[1]) & 0xffff;
6269 var45.x4[2] = (var42.x4[2] * var44.x4[2]) & 0xffff;
6270 var45.x4[3] = (var42.x4[3] * var44.x4[3]) & 0xffff;
6272 var46.x4[0] = ((uint16_t)(((orc_uint16)(var45.x4[0]+128)) + (((orc_uint16)(var45.x4[0]+128))>>8)))>>8;
6273 var46.x4[1] = ((uint16_t)(((orc_uint16)(var45.x4[1]+128)) + (((orc_uint16)(var45.x4[1]+128))>>8)))>>8;
6274 var46.x4[2] = ((uint16_t)(((orc_uint16)(var45.x4[2]+128)) + (((orc_uint16)(var45.x4[2]+128))>>8)))>>8;
6275 var46.x4[3] = ((uint16_t)(((orc_uint16)(var45.x4[3]+128)) + (((orc_uint16)(var45.x4[3]+128))>>8)))>>8;
6279 var47.x4[0] = (orc_uint8)var39.x4[0];
6280 var47.x4[1] = (orc_uint8)var39.x4[1];
6281 var47.x4[2] = (orc_uint8)var39.x4[2];
6282 var47.x4[3] = (orc_uint8)var39.x4[3];
6284 var48.i = ((((orc_uint64)var47.i)>>48) << 48) | ((((orc_uint64)var47.i)>>48)<<32) | ((((orc_uint64)var47.i)>>48) << 16) | ((((orc_uint64)var47.i)>>48));
6286 var49.x4[0] = var48.x4[0] ^ var40.x4[0];
6287 var49.x4[1] = var48.x4[1] ^ var40.x4[1];
6288 var49.x4[2] = var48.x4[2] ^ var40.x4[2];
6289 var49.x4[3] = var48.x4[3] ^ var40.x4[3];
6291 var50.x4[0] = (var46.x4[0] * var49.x4[0]) & 0xffff;
6292 var50.x4[1] = (var46.x4[1] * var49.x4[1]) & 0xffff;
6293 var50.x4[2] = (var46.x4[2] * var49.x4[2]) & 0xffff;
6294 var50.x4[3] = (var46.x4[3] * var49.x4[3]) & 0xffff;
6296 var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8;
6297 var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8;
6298 var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8;
6299 var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8;
6301 var41.x4[0] = var51.x4[0];
6302 var41.x4[1] = var51.x4[1];
6303 var41.x4[2] = var51.x4[2];
6304 var41.x4[3] = var51.x4[3];
6311 /* orc_code_combine_out_u_n */
6313 _backup_orc_code_combine_out_u_n (OrcExecutor * ORC_RESTRICT ex)
6317 orc_union32 * ORC_RESTRICT ptr0;
6318 const orc_union32 * ORC_RESTRICT ptr4;
6330 ptr0 = (orc_union32 *)ex->arrays[0];
6331 ptr4 = (orc_union32 *)ex->arrays[4];
6334 var39.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */
6335 var39.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */
6336 var39.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */
6337 var39.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */
6339 for (i = 0; i < n; i++) {
6343 var41.x4[0] = (orc_uint8)var37.x4[0];
6344 var41.x4[1] = (orc_uint8)var37.x4[1];
6345 var41.x4[2] = (orc_uint8)var37.x4[2];
6346 var41.x4[3] = (orc_uint8)var37.x4[3];
6350 var42.x4[0] = (orc_uint8)var38.x4[0];
6351 var42.x4[1] = (orc_uint8)var38.x4[1];
6352 var42.x4[2] = (orc_uint8)var38.x4[2];
6353 var42.x4[3] = (orc_uint8)var38.x4[3];
6355 var43.i = ((((orc_uint64)var42.i)>>48) << 48) | ((((orc_uint64)var42.i)>>48)<<32) | ((((orc_uint64)var42.i)>>48) << 16) | ((((orc_uint64)var42.i)>>48));
6357 var44.x4[0] = var43.x4[0] ^ var39.x4[0];
6358 var44.x4[1] = var43.x4[1] ^ var39.x4[1];
6359 var44.x4[2] = var43.x4[2] ^ var39.x4[2];
6360 var44.x4[3] = var43.x4[3] ^ var39.x4[3];
6362 var45.x4[0] = (var41.x4[0] * var44.x4[0]) & 0xffff;
6363 var45.x4[1] = (var41.x4[1] * var44.x4[1]) & 0xffff;
6364 var45.x4[2] = (var41.x4[2] * var44.x4[2]) & 0xffff;
6365 var45.x4[3] = (var41.x4[3] * var44.x4[3]) & 0xffff;
6367 var46.x4[0] = ((uint16_t)(((orc_uint16)(var45.x4[0]+128)) + (((orc_uint16)(var45.x4[0]+128))>>8)))>>8;
6368 var46.x4[1] = ((uint16_t)(((orc_uint16)(var45.x4[1]+128)) + (((orc_uint16)(var45.x4[1]+128))>>8)))>>8;
6369 var46.x4[2] = ((uint16_t)(((orc_uint16)(var45.x4[2]+128)) + (((orc_uint16)(var45.x4[2]+128))>>8)))>>8;
6370 var46.x4[3] = ((uint16_t)(((orc_uint16)(var45.x4[3]+128)) + (((orc_uint16)(var45.x4[3]+128))>>8)))>>8;
6372 var40.x4[0] = var46.x4[0];
6373 var40.x4[1] = var46.x4[1];
6374 var40.x4[2] = var46.x4[2];
6375 var40.x4[3] = var46.x4[3];
6382 /* orc_code_combine_atop_u */
6384 _backup_orc_code_combine_atop_u (OrcExecutor * ORC_RESTRICT ex)
6388 orc_union32 * ORC_RESTRICT ptr0;
6389 const orc_union32 * ORC_RESTRICT ptr4;
6390 const orc_union32 * ORC_RESTRICT ptr5;
6414 ptr0 = (orc_union32 *)ex->arrays[0];
6415 ptr4 = (orc_union32 *)ex->arrays[4];
6416 ptr5 = (orc_union32 *)ex->arrays[5];
6419 var44.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */
6420 var44.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */
6421 var44.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */
6422 var44.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */
6424 for (i = 0; i < n; i++) {
6428 var46.x4[0] = (orc_uint8)var40.x4[0];
6429 var46.x4[1] = (orc_uint8)var40.x4[1];
6430 var46.x4[2] = (orc_uint8)var40.x4[2];
6431 var46.x4[3] = (orc_uint8)var40.x4[3];
6435 var47.x4[0] = (orc_uint8)var41.x4[0];
6436 var47.x4[1] = (orc_uint8)var41.x4[1];
6437 var47.x4[2] = (orc_uint8)var41.x4[2];
6438 var47.x4[3] = (orc_uint8)var41.x4[3];
6440 var48.i = ((((orc_uint64)var47.i)>>48) << 48) | ((((orc_uint64)var47.i)>>48)<<32) | ((((orc_uint64)var47.i)>>48) << 16) | ((((orc_uint64)var47.i)>>48));
6442 var49.x4[0] = (var46.x4[0] * var48.x4[0]) & 0xffff;
6443 var49.x4[1] = (var46.x4[1] * var48.x4[1]) & 0xffff;
6444 var49.x4[2] = (var46.x4[2] * var48.x4[2]) & 0xffff;
6445 var49.x4[3] = (var46.x4[3] * var48.x4[3]) & 0xffff;
6447 var50.x4[0] = ((uint16_t)(((orc_uint16)(var49.x4[0]+128)) + (((orc_uint16)(var49.x4[0]+128))>>8)))>>8;
6448 var50.x4[1] = ((uint16_t)(((orc_uint16)(var49.x4[1]+128)) + (((orc_uint16)(var49.x4[1]+128))>>8)))>>8;
6449 var50.x4[2] = ((uint16_t)(((orc_uint16)(var49.x4[2]+128)) + (((orc_uint16)(var49.x4[2]+128))>>8)))>>8;
6450 var50.x4[3] = ((uint16_t)(((orc_uint16)(var49.x4[3]+128)) + (((orc_uint16)(var49.x4[3]+128))>>8)))>>8;
6454 var51.x4[0] = (orc_uint8)var42.x4[0];
6455 var51.x4[1] = (orc_uint8)var42.x4[1];
6456 var51.x4[2] = (orc_uint8)var42.x4[2];
6457 var51.x4[3] = (orc_uint8)var42.x4[3];
6459 var52.i = ((((orc_uint64)var51.i)>>48) << 48) | ((((orc_uint64)var51.i)>>48)<<32) | ((((orc_uint64)var51.i)>>48) << 16) | ((((orc_uint64)var51.i)>>48));
6461 var53.x4[0] = (var50.x4[0] * var52.x4[0]) & 0xffff;
6462 var53.x4[1] = (var50.x4[1] * var52.x4[1]) & 0xffff;
6463 var53.x4[2] = (var50.x4[2] * var52.x4[2]) & 0xffff;
6464 var53.x4[3] = (var50.x4[3] * var52.x4[3]) & 0xffff;
6466 var54.x4[0] = ((uint16_t)(((orc_uint16)(var53.x4[0]+128)) + (((orc_uint16)(var53.x4[0]+128))>>8)))>>8;
6467 var54.x4[1] = ((uint16_t)(((orc_uint16)(var53.x4[1]+128)) + (((orc_uint16)(var53.x4[1]+128))>>8)))>>8;
6468 var54.x4[2] = ((uint16_t)(((orc_uint16)(var53.x4[2]+128)) + (((orc_uint16)(var53.x4[2]+128))>>8)))>>8;
6469 var54.x4[3] = ((uint16_t)(((orc_uint16)(var53.x4[3]+128)) + (((orc_uint16)(var53.x4[3]+128))>>8)))>>8;
6471 var55.x4[0] = var54.x4[0];
6472 var55.x4[1] = var54.x4[1];
6473 var55.x4[2] = var54.x4[2];
6474 var55.x4[3] = var54.x4[3];
6478 var56.x4[0] = (orc_uint8)var43.x4[0];
6479 var56.x4[1] = (orc_uint8)var43.x4[1];
6480 var56.x4[2] = (orc_uint8)var43.x4[2];
6481 var56.x4[3] = (orc_uint8)var43.x4[3];
6483 var57.i = ((((orc_uint64)var50.i)>>48) << 48) | ((((orc_uint64)var50.i)>>48)<<32) | ((((orc_uint64)var50.i)>>48) << 16) | ((((orc_uint64)var50.i)>>48));
6485 var58.x4[0] = var57.x4[0] ^ var44.x4[0];
6486 var58.x4[1] = var57.x4[1] ^ var44.x4[1];
6487 var58.x4[2] = var57.x4[2] ^ var44.x4[2];
6488 var58.x4[3] = var57.x4[3] ^ var44.x4[3];
6490 var59.x4[0] = (var56.x4[0] * var58.x4[0]) & 0xffff;
6491 var59.x4[1] = (var56.x4[1] * var58.x4[1]) & 0xffff;
6492 var59.x4[2] = (var56.x4[2] * var58.x4[2]) & 0xffff;
6493 var59.x4[3] = (var56.x4[3] * var58.x4[3]) & 0xffff;
6495 var60.x4[0] = ((uint16_t)(((orc_uint16)(var59.x4[0]+128)) + (((orc_uint16)(var59.x4[0]+128))>>8)))>>8;
6496 var60.x4[1] = ((uint16_t)(((orc_uint16)(var59.x4[1]+128)) + (((orc_uint16)(var59.x4[1]+128))>>8)))>>8;
6497 var60.x4[2] = ((uint16_t)(((orc_uint16)(var59.x4[2]+128)) + (((orc_uint16)(var59.x4[2]+128))>>8)))>>8;
6498 var60.x4[3] = ((uint16_t)(((orc_uint16)(var59.x4[3]+128)) + (((orc_uint16)(var59.x4[3]+128))>>8)))>>8;
6500 var61.x4[0] = var60.x4[0];
6501 var61.x4[1] = var60.x4[1];
6502 var61.x4[2] = var60.x4[2];
6503 var61.x4[3] = var60.x4[3];
6505 var45.x4[0] = ORC_CLAMP_UB((orc_uint8)var55.x4[0] + (orc_uint8)var61.x4[0]);
6506 var45.x4[1] = ORC_CLAMP_UB((orc_uint8)var55.x4[1] + (orc_uint8)var61.x4[1]);
6507 var45.x4[2] = ORC_CLAMP_UB((orc_uint8)var55.x4[2] + (orc_uint8)var61.x4[2]);
6508 var45.x4[3] = ORC_CLAMP_UB((orc_uint8)var55.x4[3] + (orc_uint8)var61.x4[3]);
6515 /* orc_code_combine_atop_u_n */
6517 _backup_orc_code_combine_atop_u_n (OrcExecutor * ORC_RESTRICT ex)
6521 orc_union32 * ORC_RESTRICT ptr0;
6522 const orc_union32 * ORC_RESTRICT ptr4;
6541 ptr0 = (orc_union32 *)ex->arrays[0];
6542 ptr4 = (orc_union32 *)ex->arrays[4];
6545 var43.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */
6546 var43.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */
6547 var43.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */
6548 var43.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */
6550 for (i = 0; i < n; i++) {
6554 var45.x4[0] = (orc_uint8)var40.x4[0];
6555 var45.x4[1] = (orc_uint8)var40.x4[1];
6556 var45.x4[2] = (orc_uint8)var40.x4[2];
6557 var45.x4[3] = (orc_uint8)var40.x4[3];
6561 var46.x4[0] = (orc_uint8)var41.x4[0];
6562 var46.x4[1] = (orc_uint8)var41.x4[1];
6563 var46.x4[2] = (orc_uint8)var41.x4[2];
6564 var46.x4[3] = (orc_uint8)var41.x4[3];
6566 var47.i = ((((orc_uint64)var46.i)>>48) << 48) | ((((orc_uint64)var46.i)>>48)<<32) | ((((orc_uint64)var46.i)>>48) << 16) | ((((orc_uint64)var46.i)>>48));
6568 var48.x4[0] = (var45.x4[0] * var47.x4[0]) & 0xffff;
6569 var48.x4[1] = (var45.x4[1] * var47.x4[1]) & 0xffff;
6570 var48.x4[2] = (var45.x4[2] * var47.x4[2]) & 0xffff;
6571 var48.x4[3] = (var45.x4[3] * var47.x4[3]) & 0xffff;
6573 var49.x4[0] = ((uint16_t)(((orc_uint16)(var48.x4[0]+128)) + (((orc_uint16)(var48.x4[0]+128))>>8)))>>8;
6574 var49.x4[1] = ((uint16_t)(((orc_uint16)(var48.x4[1]+128)) + (((orc_uint16)(var48.x4[1]+128))>>8)))>>8;
6575 var49.x4[2] = ((uint16_t)(((orc_uint16)(var48.x4[2]+128)) + (((orc_uint16)(var48.x4[2]+128))>>8)))>>8;
6576 var49.x4[3] = ((uint16_t)(((orc_uint16)(var48.x4[3]+128)) + (((orc_uint16)(var48.x4[3]+128))>>8)))>>8;
6578 var50.x4[0] = var49.x4[0];
6579 var50.x4[1] = var49.x4[1];
6580 var50.x4[2] = var49.x4[2];
6581 var50.x4[3] = var49.x4[3];
6585 var51.x4[0] = (orc_uint8)var42.x4[0];
6586 var51.x4[1] = (orc_uint8)var42.x4[1];
6587 var51.x4[2] = (orc_uint8)var42.x4[2];
6588 var51.x4[3] = (orc_uint8)var42.x4[3];
6590 var52.i = ((((orc_uint64)var45.i)>>48) << 48) | ((((orc_uint64)var45.i)>>48)<<32) | ((((orc_uint64)var45.i)>>48) << 16) | ((((orc_uint64)var45.i)>>48));
6592 var53.x4[0] = var52.x4[0] ^ var43.x4[0];
6593 var53.x4[1] = var52.x4[1] ^ var43.x4[1];
6594 var53.x4[2] = var52.x4[2] ^ var43.x4[2];
6595 var53.x4[3] = var52.x4[3] ^ var43.x4[3];
6597 var54.x4[0] = (var51.x4[0] * var53.x4[0]) & 0xffff;
6598 var54.x4[1] = (var51.x4[1] * var53.x4[1]) & 0xffff;
6599 var54.x4[2] = (var51.x4[2] * var53.x4[2]) & 0xffff;
6600 var54.x4[3] = (var51.x4[3] * var53.x4[3]) & 0xffff;
6602 var55.x4[0] = ((uint16_t)(((orc_uint16)(var54.x4[0]+128)) + (((orc_uint16)(var54.x4[0]+128))>>8)))>>8;
6603 var55.x4[1] = ((uint16_t)(((orc_uint16)(var54.x4[1]+128)) + (((orc_uint16)(var54.x4[1]+128))>>8)))>>8;
6604 var55.x4[2] = ((uint16_t)(((orc_uint16)(var54.x4[2]+128)) + (((orc_uint16)(var54.x4[2]+128))>>8)))>>8;
6605 var55.x4[3] = ((uint16_t)(((orc_uint16)(var54.x4[3]+128)) + (((orc_uint16)(var54.x4[3]+128))>>8)))>>8;
6607 var56.x4[0] = var55.x4[0];
6608 var56.x4[1] = var55.x4[1];
6609 var56.x4[2] = var55.x4[2];
6610 var56.x4[3] = var55.x4[3];
6612 var44.x4[0] = ORC_CLAMP_UB((orc_uint8)var50.x4[0] + (orc_uint8)var56.x4[0]);
6613 var44.x4[1] = ORC_CLAMP_UB((orc_uint8)var50.x4[1] + (orc_uint8)var56.x4[1]);
6614 var44.x4[2] = ORC_CLAMP_UB((orc_uint8)var50.x4[2] + (orc_uint8)var56.x4[2]);
6615 var44.x4[3] = ORC_CLAMP_UB((orc_uint8)var50.x4[3] + (orc_uint8)var56.x4[3]);
6622 /* orc_code_combine_xor_u */
6624 _backup_orc_code_combine_xor_u (OrcExecutor * ORC_RESTRICT ex)
6628 orc_union32 * ORC_RESTRICT ptr0;
6629 const orc_union32 * ORC_RESTRICT ptr4;
6630 const orc_union32 * ORC_RESTRICT ptr5;
6656 ptr0 = (orc_union32 *)ex->arrays[0];
6657 ptr4 = (orc_union32 *)ex->arrays[4];
6658 ptr5 = (orc_union32 *)ex->arrays[5];
6661 var43.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */
6662 var43.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */
6663 var43.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */
6664 var43.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */
6666 var45.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */
6667 var45.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */
6668 var45.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */
6669 var45.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */
6671 for (i = 0; i < n; i++) {
6675 var47.x4[0] = (orc_uint8)var40.x4[0];
6676 var47.x4[1] = (orc_uint8)var40.x4[1];
6677 var47.x4[2] = (orc_uint8)var40.x4[2];
6678 var47.x4[3] = (orc_uint8)var40.x4[3];
6682 var48.x4[0] = (orc_uint8)var41.x4[0];
6683 var48.x4[1] = (orc_uint8)var41.x4[1];
6684 var48.x4[2] = (orc_uint8)var41.x4[2];
6685 var48.x4[3] = (orc_uint8)var41.x4[3];
6687 var49.i = ((((orc_uint64)var48.i)>>48) << 48) | ((((orc_uint64)var48.i)>>48)<<32) | ((((orc_uint64)var48.i)>>48) << 16) | ((((orc_uint64)var48.i)>>48));
6689 var50.x4[0] = (var47.x4[0] * var49.x4[0]) & 0xffff;
6690 var50.x4[1] = (var47.x4[1] * var49.x4[1]) & 0xffff;
6691 var50.x4[2] = (var47.x4[2] * var49.x4[2]) & 0xffff;
6692 var50.x4[3] = (var47.x4[3] * var49.x4[3]) & 0xffff;
6694 var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8;
6695 var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8;
6696 var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8;
6697 var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8;
6701 var52.x4[0] = (orc_uint8)var42.x4[0];
6702 var52.x4[1] = (orc_uint8)var42.x4[1];
6703 var52.x4[2] = (orc_uint8)var42.x4[2];
6704 var52.x4[3] = (orc_uint8)var42.x4[3];
6706 var53.i = ((((orc_uint64)var52.i)>>48) << 48) | ((((orc_uint64)var52.i)>>48)<<32) | ((((orc_uint64)var52.i)>>48) << 16) | ((((orc_uint64)var52.i)>>48));
6708 var54.x4[0] = var53.x4[0] ^ var43.x4[0];
6709 var54.x4[1] = var53.x4[1] ^ var43.x4[1];
6710 var54.x4[2] = var53.x4[2] ^ var43.x4[2];
6711 var54.x4[3] = var53.x4[3] ^ var43.x4[3];
6713 var55.x4[0] = (var51.x4[0] * var54.x4[0]) & 0xffff;
6714 var55.x4[1] = (var51.x4[1] * var54.x4[1]) & 0xffff;
6715 var55.x4[2] = (var51.x4[2] * var54.x4[2]) & 0xffff;
6716 var55.x4[3] = (var51.x4[3] * var54.x4[3]) & 0xffff;
6718 var56.x4[0] = ((uint16_t)(((orc_uint16)(var55.x4[0]+128)) + (((orc_uint16)(var55.x4[0]+128))>>8)))>>8;
6719 var56.x4[1] = ((uint16_t)(((orc_uint16)(var55.x4[1]+128)) + (((orc_uint16)(var55.x4[1]+128))>>8)))>>8;
6720 var56.x4[2] = ((uint16_t)(((orc_uint16)(var55.x4[2]+128)) + (((orc_uint16)(var55.x4[2]+128))>>8)))>>8;
6721 var56.x4[3] = ((uint16_t)(((orc_uint16)(var55.x4[3]+128)) + (((orc_uint16)(var55.x4[3]+128))>>8)))>>8;
6723 var57.x4[0] = var56.x4[0];
6724 var57.x4[1] = var56.x4[1];
6725 var57.x4[2] = var56.x4[2];
6726 var57.x4[3] = var56.x4[3];
6730 var58.x4[0] = (orc_uint8)var44.x4[0];
6731 var58.x4[1] = (orc_uint8)var44.x4[1];
6732 var58.x4[2] = (orc_uint8)var44.x4[2];
6733 var58.x4[3] = (orc_uint8)var44.x4[3];
6735 var59.i = ((((orc_uint64)var51.i)>>48) << 48) | ((((orc_uint64)var51.i)>>48)<<32) | ((((orc_uint64)var51.i)>>48) << 16) | ((((orc_uint64)var51.i)>>48));
6737 var60.x4[0] = var59.x4[0] ^ var45.x4[0];
6738 var60.x4[1] = var59.x4[1] ^ var45.x4[1];
6739 var60.x4[2] = var59.x4[2] ^ var45.x4[2];
6740 var60.x4[3] = var59.x4[3] ^ var45.x4[3];
6742 var61.x4[0] = (var58.x4[0] * var60.x4[0]) & 0xffff;
6743 var61.x4[1] = (var58.x4[1] * var60.x4[1]) & 0xffff;
6744 var61.x4[2] = (var58.x4[2] * var60.x4[2]) & 0xffff;
6745 var61.x4[3] = (var58.x4[3] * var60.x4[3]) & 0xffff;
6747 var62.x4[0] = ((uint16_t)(((orc_uint16)(var61.x4[0]+128)) + (((orc_uint16)(var61.x4[0]+128))>>8)))>>8;
6748 var62.x4[1] = ((uint16_t)(((orc_uint16)(var61.x4[1]+128)) + (((orc_uint16)(var61.x4[1]+128))>>8)))>>8;
6749 var62.x4[2] = ((uint16_t)(((orc_uint16)(var61.x4[2]+128)) + (((orc_uint16)(var61.x4[2]+128))>>8)))>>8;
6750 var62.x4[3] = ((uint16_t)(((orc_uint16)(var61.x4[3]+128)) + (((orc_uint16)(var61.x4[3]+128))>>8)))>>8;
6752 var63.x4[0] = var62.x4[0];
6753 var63.x4[1] = var62.x4[1];
6754 var63.x4[2] = var62.x4[2];
6755 var63.x4[3] = var62.x4[3];
6757 var46.x4[0] = ORC_CLAMP_UB((orc_uint8)var57.x4[0] + (orc_uint8)var63.x4[0]);
6758 var46.x4[1] = ORC_CLAMP_UB((orc_uint8)var57.x4[1] + (orc_uint8)var63.x4[1]);
6759 var46.x4[2] = ORC_CLAMP_UB((orc_uint8)var57.x4[2] + (orc_uint8)var63.x4[2]);
6760 var46.x4[3] = ORC_CLAMP_UB((orc_uint8)var57.x4[3] + (orc_uint8)var63.x4[3]);
6767 /* orc_code_combine_xor_u_n */
6769 _backup_orc_code_combine_xor_u_n (OrcExecutor * ORC_RESTRICT ex)
6773 orc_union32 * ORC_RESTRICT ptr0;
6774 const orc_union32 * ORC_RESTRICT ptr4;
6795 ptr0 = (orc_union32 *)ex->arrays[0];
6796 ptr4 = (orc_union32 *)ex->arrays[4];
6799 var42.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */
6800 var42.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */
6801 var42.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */
6802 var42.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */
6804 var44.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */
6805 var44.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */
6806 var44.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */
6807 var44.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */
6809 for (i = 0; i < n; i++) {
6813 var46.x4[0] = (orc_uint8)var40.x4[0];
6814 var46.x4[1] = (orc_uint8)var40.x4[1];
6815 var46.x4[2] = (orc_uint8)var40.x4[2];
6816 var46.x4[3] = (orc_uint8)var40.x4[3];
6820 var47.x4[0] = (orc_uint8)var41.x4[0];
6821 var47.x4[1] = (orc_uint8)var41.x4[1];
6822 var47.x4[2] = (orc_uint8)var41.x4[2];
6823 var47.x4[3] = (orc_uint8)var41.x4[3];
6825 var48.i = ((((orc_uint64)var47.i)>>48) << 48) | ((((orc_uint64)var47.i)>>48)<<32) | ((((orc_uint64)var47.i)>>48) << 16) | ((((orc_uint64)var47.i)>>48));
6827 var49.x4[0] = var48.x4[0] ^ var42.x4[0];
6828 var49.x4[1] = var48.x4[1] ^ var42.x4[1];
6829 var49.x4[2] = var48.x4[2] ^ var42.x4[2];
6830 var49.x4[3] = var48.x4[3] ^ var42.x4[3];
6832 var50.x4[0] = (var46.x4[0] * var49.x4[0]) & 0xffff;
6833 var50.x4[1] = (var46.x4[1] * var49.x4[1]) & 0xffff;
6834 var50.x4[2] = (var46.x4[2] * var49.x4[2]) & 0xffff;
6835 var50.x4[3] = (var46.x4[3] * var49.x4[3]) & 0xffff;
6837 var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8;
6838 var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8;
6839 var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8;
6840 var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8;
6842 var52.x4[0] = var51.x4[0];
6843 var52.x4[1] = var51.x4[1];
6844 var52.x4[2] = var51.x4[2];
6845 var52.x4[3] = var51.x4[3];
6849 var53.x4[0] = (orc_uint8)var43.x4[0];
6850 var53.x4[1] = (orc_uint8)var43.x4[1];
6851 var53.x4[2] = (orc_uint8)var43.x4[2];
6852 var53.x4[3] = (orc_uint8)var43.x4[3];
6854 var54.i = ((((orc_uint64)var46.i)>>48) << 48) | ((((orc_uint64)var46.i)>>48)<<32) | ((((orc_uint64)var46.i)>>48) << 16) | ((((orc_uint64)var46.i)>>48));
6856 var55.x4[0] = var54.x4[0] ^ var44.x4[0];
6857 var55.x4[1] = var54.x4[1] ^ var44.x4[1];
6858 var55.x4[2] = var54.x4[2] ^ var44.x4[2];
6859 var55.x4[3] = var54.x4[3] ^ var44.x4[3];
6861 var56.x4[0] = (var53.x4[0] * var55.x4[0]) & 0xffff;
6862 var56.x4[1] = (var53.x4[1] * var55.x4[1]) & 0xffff;
6863 var56.x4[2] = (var53.x4[2] * var55.x4[2]) & 0xffff;
6864 var56.x4[3] = (var53.x4[3] * var55.x4[3]) & 0xffff;
6866 var57.x4[0] = ((uint16_t)(((orc_uint16)(var56.x4[0]+128)) + (((orc_uint16)(var56.x4[0]+128))>>8)))>>8;
6867 var57.x4[1] = ((uint16_t)(((orc_uint16)(var56.x4[1]+128)) + (((orc_uint16)(var56.x4[1]+128))>>8)))>>8;
6868 var57.x4[2] = ((uint16_t)(((orc_uint16)(var56.x4[2]+128)) + (((orc_uint16)(var56.x4[2]+128))>>8)))>>8;
6869 var57.x4[3] = ((uint16_t)(((orc_uint16)(var56.x4[3]+128)) + (((orc_uint16)(var56.x4[3]+128))>>8)))>>8;
6871 var58.x4[0] = var57.x4[0];
6872 var58.x4[1] = var57.x4[1];
6873 var58.x4[2] = var57.x4[2];
6874 var58.x4[3] = var57.x4[3];
6876 var45.x4[0] = ORC_CLAMP_UB((orc_uint8)var52.x4[0] + (orc_uint8)var58.x4[0]);
6877 var45.x4[1] = ORC_CLAMP_UB((orc_uint8)var52.x4[1] + (orc_uint8)var58.x4[1]);
6878 var45.x4[2] = ORC_CLAMP_UB((orc_uint8)var52.x4[2] + (orc_uint8)var58.x4[2]);
6879 var45.x4[3] = ORC_CLAMP_UB((orc_uint8)var52.x4[3] + (orc_uint8)var58.x4[3]);
6886 /* orc_code_combine_add_ca */
6888 _backup_orc_code_combine_add_ca (OrcExecutor * ORC_RESTRICT ex)
6892 orc_union32 * ORC_RESTRICT ptr0;
6893 const orc_union32 * ORC_RESTRICT ptr4;
6894 const orc_union32 * ORC_RESTRICT ptr5;
6905 ptr0 = (orc_union32 *)ex->arrays[0];
6906 ptr4 = (orc_union32 *)ex->arrays[4];
6907 ptr5 = (orc_union32 *)ex->arrays[5];
6910 for (i = 0; i < n; i++) {
6914 var39.x4[0] = (orc_uint8)var35.x4[0];
6915 var39.x4[1] = (orc_uint8)var35.x4[1];
6916 var39.x4[2] = (orc_uint8)var35.x4[2];
6917 var39.x4[3] = (orc_uint8)var35.x4[3];
6921 var40.x4[0] = (orc_uint8)var36.x4[0];
6922 var40.x4[1] = (orc_uint8)var36.x4[1];
6923 var40.x4[2] = (orc_uint8)var36.x4[2];
6924 var40.x4[3] = (orc_uint8)var36.x4[3];
6926 var41.x4[0] = (var39.x4[0] * var40.x4[0]) & 0xffff;
6927 var41.x4[1] = (var39.x4[1] * var40.x4[1]) & 0xffff;
6928 var41.x4[2] = (var39.x4[2] * var40.x4[2]) & 0xffff;
6929 var41.x4[3] = (var39.x4[3] * var40.x4[3]) & 0xffff;
6931 var42.x4[0] = ((uint16_t)(((orc_uint16)(var41.x4[0]+128)) + (((orc_uint16)(var41.x4[0]+128))>>8)))>>8;
6932 var42.x4[1] = ((uint16_t)(((orc_uint16)(var41.x4[1]+128)) + (((orc_uint16)(var41.x4[1]+128))>>8)))>>8;
6933 var42.x4[2] = ((uint16_t)(((orc_uint16)(var41.x4[2]+128)) + (((orc_uint16)(var41.x4[2]+128))>>8)))>>8;
6934 var42.x4[3] = ((uint16_t)(((orc_uint16)(var41.x4[3]+128)) + (((orc_uint16)(var41.x4[3]+128))>>8)))>>8;
6936 var43.x4[0] = var42.x4[0];
6937 var43.x4[1] = var42.x4[1];
6938 var43.x4[2] = var42.x4[2];
6939 var43.x4[3] = var42.x4[3];
6943 var38.x4[0] = ORC_CLAMP_UB((orc_uint8)var37.x4[0] + (orc_uint8)var43.x4[0]);
6944 var38.x4[1] = ORC_CLAMP_UB((orc_uint8)var37.x4[1] + (orc_uint8)var43.x4[1]);
6945 var38.x4[2] = ORC_CLAMP_UB((orc_uint8)var37.x4[2] + (orc_uint8)var43.x4[2]);
6946 var38.x4[3] = ORC_CLAMP_UB((orc_uint8)var37.x4[3] + (orc_uint8)var43.x4[3]);
6953 /* orc_code_combine_add_ca_n */
6955 _backup_orc_code_combine_add_ca_n (OrcExecutor * ORC_RESTRICT ex)
6959 orc_union32 * ORC_RESTRICT ptr0;
6960 const orc_union32 * ORC_RESTRICT ptr4;
6965 ptr0 = (orc_union32 *)ex->arrays[0];
6966 ptr4 = (orc_union32 *)ex->arrays[4];
6969 for (i = 0; i < n; i++) {
6975 var34.x4[0] = ORC_CLAMP_UB((orc_uint8)var32.x4[0] + (orc_uint8)var33.x4[0]);
6976 var34.x4[1] = ORC_CLAMP_UB((orc_uint8)var32.x4[1] + (orc_uint8)var33.x4[1]);
6977 var34.x4[2] = ORC_CLAMP_UB((orc_uint8)var32.x4[2] + (orc_uint8)var33.x4[2]);
6978 var34.x4[3] = ORC_CLAMP_UB((orc_uint8)var32.x4[3] + (orc_uint8)var33.x4[3]);
6985 /* orc_code_combine_over_ca */
6987 _backup_orc_code_combine_over_ca (OrcExecutor * ORC_RESTRICT ex)
6991 orc_union32 * ORC_RESTRICT ptr0;
6992 const orc_union32 * ORC_RESTRICT ptr4;
6993 const orc_union32 * ORC_RESTRICT ptr5;
7013 ptr0 = (orc_union32 *)ex->arrays[0];
7014 ptr4 = (orc_union32 *)ex->arrays[4];
7015 ptr5 = (orc_union32 *)ex->arrays[5];
7018 var42.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */
7019 var42.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */
7020 var42.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */
7021 var42.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */
7023 for (i = 0; i < n; i++) {
7027 var44.x4[0] = (orc_uint8)var40.x4[0];
7028 var44.x4[1] = (orc_uint8)var40.x4[1];
7029 var44.x4[2] = (orc_uint8)var40.x4[2];
7030 var44.x4[3] = (orc_uint8)var40.x4[3];
7034 var45.x4[0] = (orc_uint8)var41.x4[0];
7035 var45.x4[1] = (orc_uint8)var41.x4[1];
7036 var45.x4[2] = (orc_uint8)var41.x4[2];
7037 var45.x4[3] = (orc_uint8)var41.x4[3];
7039 var46.i = ((((orc_uint64)var44.i)>>48) << 48) | ((((orc_uint64)var44.i)>>48)<<32) | ((((orc_uint64)var44.i)>>48) << 16) | ((((orc_uint64)var44.i)>>48));
7041 var47.x4[0] = (var44.x4[0] * var45.x4[0]) & 0xffff;
7042 var47.x4[1] = (var44.x4[1] * var45.x4[1]) & 0xffff;
7043 var47.x4[2] = (var44.x4[2] * var45.x4[2]) & 0xffff;
7044 var47.x4[3] = (var44.x4[3] * var45.x4[3]) & 0xffff;
7046 var48.x4[0] = ((uint16_t)(((orc_uint16)(var47.x4[0]+128)) + (((orc_uint16)(var47.x4[0]+128))>>8)))>>8;
7047 var48.x4[1] = ((uint16_t)(((orc_uint16)(var47.x4[1]+128)) + (((orc_uint16)(var47.x4[1]+128))>>8)))>>8;
7048 var48.x4[2] = ((uint16_t)(((orc_uint16)(var47.x4[2]+128)) + (((orc_uint16)(var47.x4[2]+128))>>8)))>>8;
7049 var48.x4[3] = ((uint16_t)(((orc_uint16)(var47.x4[3]+128)) + (((orc_uint16)(var47.x4[3]+128))>>8)))>>8;
7051 var49.x4[0] = var48.x4[0];
7052 var49.x4[1] = var48.x4[1];
7053 var49.x4[2] = var48.x4[2];
7054 var49.x4[3] = var48.x4[3];
7056 var50.x4[0] = (var45.x4[0] * var46.x4[0]) & 0xffff;
7057 var50.x4[1] = (var45.x4[1] * var46.x4[1]) & 0xffff;
7058 var50.x4[2] = (var45.x4[2] * var46.x4[2]) & 0xffff;
7059 var50.x4[3] = (var45.x4[3] * var46.x4[3]) & 0xffff;
7061 var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8;
7062 var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8;
7063 var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8;
7064 var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8;
7068 var53.x4[0] = (orc_uint8)var52.x4[0];
7069 var53.x4[1] = (orc_uint8)var52.x4[1];
7070 var53.x4[2] = (orc_uint8)var52.x4[2];
7071 var53.x4[3] = (orc_uint8)var52.x4[3];
7073 var54.x4[0] = var51.x4[0] ^ var42.x4[0];
7074 var54.x4[1] = var51.x4[1] ^ var42.x4[1];
7075 var54.x4[2] = var51.x4[2] ^ var42.x4[2];
7076 var54.x4[3] = var51.x4[3] ^ var42.x4[3];
7078 var55.x4[0] = (var53.x4[0] * var54.x4[0]) & 0xffff;
7079 var55.x4[1] = (var53.x4[1] * var54.x4[1]) & 0xffff;
7080 var55.x4[2] = (var53.x4[2] * var54.x4[2]) & 0xffff;
7081 var55.x4[3] = (var53.x4[3] * var54.x4[3]) & 0xffff;
7083 var56.x4[0] = ((uint16_t)(((orc_uint16)(var55.x4[0]+128)) + (((orc_uint16)(var55.x4[0]+128))>>8)))>>8;
7084 var56.x4[1] = ((uint16_t)(((orc_uint16)(var55.x4[1]+128)) + (((orc_uint16)(var55.x4[1]+128))>>8)))>>8;
7085 var56.x4[2] = ((uint16_t)(((orc_uint16)(var55.x4[2]+128)) + (((orc_uint16)(var55.x4[2]+128))>>8)))>>8;
7086 var56.x4[3] = ((uint16_t)(((orc_uint16)(var55.x4[3]+128)) + (((orc_uint16)(var55.x4[3]+128))>>8)))>>8;
7088 var57.x4[0] = var56.x4[0];
7089 var57.x4[1] = var56.x4[1];
7090 var57.x4[2] = var56.x4[2];
7091 var57.x4[3] = var56.x4[3];
7093 var43.x4[0] = ORC_CLAMP_UB((orc_uint8)var57.x4[0] + (orc_uint8)var49.x4[0]);
7094 var43.x4[1] = ORC_CLAMP_UB((orc_uint8)var57.x4[1] + (orc_uint8)var49.x4[1]);
7095 var43.x4[2] = ORC_CLAMP_UB((orc_uint8)var57.x4[2] + (orc_uint8)var49.x4[2]);
7096 var43.x4[3] = ORC_CLAMP_UB((orc_uint8)var57.x4[3] + (orc_uint8)var49.x4[3]);
7103 /* orc_code_combine_over_ca_n */
7105 _backup_orc_code_combine_over_ca_n (OrcExecutor * ORC_RESTRICT ex)
7109 orc_union32 * ORC_RESTRICT ptr0;
7110 const orc_union32 * ORC_RESTRICT ptr4;
7125 ptr0 = (orc_union32 *)ex->arrays[0];
7126 ptr4 = (orc_union32 *)ex->arrays[4];
7129 var41.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */
7130 var41.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */
7131 var41.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */
7132 var41.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */
7134 for (i = 0; i < n; i++) {
7138 var43.x4[0] = (orc_uint8)var40.x4[0];
7139 var43.x4[1] = (orc_uint8)var40.x4[1];
7140 var43.x4[2] = (orc_uint8)var40.x4[2];
7141 var43.x4[3] = (orc_uint8)var40.x4[3];
7143 var44.i = ((((orc_uint64)var43.i)>>48) << 48) | ((((orc_uint64)var43.i)>>48)<<32) | ((((orc_uint64)var43.i)>>48) << 16) | ((((orc_uint64)var43.i)>>48));
7145 var45.x4[0] = var43.x4[0];
7146 var45.x4[1] = var43.x4[1];
7147 var45.x4[2] = var43.x4[2];
7148 var45.x4[3] = var43.x4[3];
7150 var46.x4[0] = var44.x4[0];
7151 var46.x4[1] = var44.x4[1];
7152 var46.x4[2] = var44.x4[2];
7153 var46.x4[3] = var44.x4[3];
7157 var48.x4[0] = (orc_uint8)var47.x4[0];
7158 var48.x4[1] = (orc_uint8)var47.x4[1];
7159 var48.x4[2] = (orc_uint8)var47.x4[2];
7160 var48.x4[3] = (orc_uint8)var47.x4[3];
7162 var49.x4[0] = var46.x4[0] ^ var41.x4[0];
7163 var49.x4[1] = var46.x4[1] ^ var41.x4[1];
7164 var49.x4[2] = var46.x4[2] ^ var41.x4[2];
7165 var49.x4[3] = var46.x4[3] ^ var41.x4[3];
7167 var50.x4[0] = (var48.x4[0] * var49.x4[0]) & 0xffff;
7168 var50.x4[1] = (var48.x4[1] * var49.x4[1]) & 0xffff;
7169 var50.x4[2] = (var48.x4[2] * var49.x4[2]) & 0xffff;
7170 var50.x4[3] = (var48.x4[3] * var49.x4[3]) & 0xffff;
7172 var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8;
7173 var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8;
7174 var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8;
7175 var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8;
7177 var52.x4[0] = var51.x4[0];
7178 var52.x4[1] = var51.x4[1];
7179 var52.x4[2] = var51.x4[2];
7180 var52.x4[3] = var51.x4[3];
7182 var42.x4[0] = ORC_CLAMP_UB((orc_uint8)var52.x4[0] + (orc_uint8)var45.x4[0]);
7183 var42.x4[1] = ORC_CLAMP_UB((orc_uint8)var52.x4[1] + (orc_uint8)var45.x4[1]);
7184 var42.x4[2] = ORC_CLAMP_UB((orc_uint8)var52.x4[2] + (orc_uint8)var45.x4[2]);
7185 var42.x4[3] = ORC_CLAMP_UB((orc_uint8)var52.x4[3] + (orc_uint8)var45.x4[3]);
7192 /* orc_composite_over_8888_8_8888_line */
7194 _backup_orc_composite_over_8888_8_8888_line (OrcExecutor * ORC_RESTRICT ex)
7198 orc_union32 * ORC_RESTRICT ptr0;
7199 const orc_union32 * ORC_RESTRICT ptr4;
7200 const orc_int8 * ORC_RESTRICT ptr5;
7219 ptr0 = (orc_union32 *)ex->arrays[0];
7220 ptr4 = (orc_union32 *)ex->arrays[4];
7221 ptr5 = (orc_int8 *)ex->arrays[5];
7224 var40.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */
7225 var40.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */
7226 var40.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */
7227 var40.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */
7229 for (i = 0; i < n; i++) {
7233 var42.x4[0] = (orc_uint8)var38.x4[0];
7234 var42.x4[1] = (orc_uint8)var38.x4[1];
7235 var42.x4[2] = (orc_uint8)var38.x4[2];
7236 var42.x4[3] = (orc_uint8)var38.x4[3];
7240 var43.i = ((var39&0xff) << 24) | ((var39&0xff)<<16) | ((var39&0xff) << 8) | (var39&0xff);
7242 var44.x4[0] = (orc_uint8)var43.x4[0];
7243 var44.x4[1] = (orc_uint8)var43.x4[1];
7244 var44.x4[2] = (orc_uint8)var43.x4[2];
7245 var44.x4[3] = (orc_uint8)var43.x4[3];
7247 var45.x4[0] = (var42.x4[0] * var44.x4[0]) & 0xffff;
7248 var45.x4[1] = (var42.x4[1] * var44.x4[1]) & 0xffff;
7249 var45.x4[2] = (var42.x4[2] * var44.x4[2]) & 0xffff;
7250 var45.x4[3] = (var42.x4[3] * var44.x4[3]) & 0xffff;
7252 var46.x4[0] = ((uint16_t)(((orc_uint16)(var45.x4[0]+128)) + (((orc_uint16)(var45.x4[0]+128))>>8)))>>8;
7253 var46.x4[1] = ((uint16_t)(((orc_uint16)(var45.x4[1]+128)) + (((orc_uint16)(var45.x4[1]+128))>>8)))>>8;
7254 var46.x4[2] = ((uint16_t)(((orc_uint16)(var45.x4[2]+128)) + (((orc_uint16)(var45.x4[2]+128))>>8)))>>8;
7255 var46.x4[3] = ((uint16_t)(((orc_uint16)(var45.x4[3]+128)) + (((orc_uint16)(var45.x4[3]+128))>>8)))>>8;
7257 var47.x4[0] = var46.x4[0];
7258 var47.x4[1] = var46.x4[1];
7259 var47.x4[2] = var46.x4[2];
7260 var47.x4[3] = var46.x4[3];
7264 var49.x4[0] = (orc_uint8)var48.x4[0];
7265 var49.x4[1] = (orc_uint8)var48.x4[1];
7266 var49.x4[2] = (orc_uint8)var48.x4[2];
7267 var49.x4[3] = (orc_uint8)var48.x4[3];
7269 var50.x4[0] = var46.x4[0] ^ var40.x4[0];
7270 var50.x4[1] = var46.x4[1] ^ var40.x4[1];
7271 var50.x4[2] = var46.x4[2] ^ var40.x4[2];
7272 var50.x4[3] = var46.x4[3] ^ var40.x4[3];
7274 var51.i = ((((orc_uint64)var50.i)>>48) << 48) | ((((orc_uint64)var50.i)>>48)<<32) | ((((orc_uint64)var50.i)>>48) << 16) | ((((orc_uint64)var50.i)>>48));
7276 var52.x4[0] = (var49.x4[0] * var51.x4[0]) & 0xffff;
7277 var52.x4[1] = (var49.x4[1] * var51.x4[1]) & 0xffff;
7278 var52.x4[2] = (var49.x4[2] * var51.x4[2]) & 0xffff;
7279 var52.x4[3] = (var49.x4[3] * var51.x4[3]) & 0xffff;
7281 var53.x4[0] = ((uint16_t)(((orc_uint16)(var52.x4[0]+128)) + (((orc_uint16)(var52.x4[0]+128))>>8)))>>8;
7282 var53.x4[1] = ((uint16_t)(((orc_uint16)(var52.x4[1]+128)) + (((orc_uint16)(var52.x4[1]+128))>>8)))>>8;
7283 var53.x4[2] = ((uint16_t)(((orc_uint16)(var52.x4[2]+128)) + (((orc_uint16)(var52.x4[2]+128))>>8)))>>8;
7284 var53.x4[3] = ((uint16_t)(((orc_uint16)(var52.x4[3]+128)) + (((orc_uint16)(var52.x4[3]+128))>>8)))>>8;
7286 var54.x4[0] = var53.x4[0];
7287 var54.x4[1] = var53.x4[1];
7288 var54.x4[2] = var53.x4[2];
7289 var54.x4[3] = var53.x4[3];
7291 var41.x4[0] = ORC_CLAMP_UB((orc_uint8)var54.x4[0] + (orc_uint8)var47.x4[0]);
7292 var41.x4[1] = ORC_CLAMP_UB((orc_uint8)var54.x4[1] + (orc_uint8)var47.x4[1]);
7293 var41.x4[2] = ORC_CLAMP_UB((orc_uint8)var54.x4[2] + (orc_uint8)var47.x4[2]);
7294 var41.x4[3] = ORC_CLAMP_UB((orc_uint8)var54.x4[3] + (orc_uint8)var47.x4[3]);
7301 /* orc_composite_over_n_8888_8888_ca_2d */
7303 _backup_orc_composite_over_n_8888_8888_ca_2d (OrcExecutor * ORC_RESTRICT ex)
7307 orc_union32 * ORC_RESTRICT ptr0;
7308 const orc_union32 * ORC_RESTRICT ptr4;
7328 ptr0 = (orc_union32 *)ex->arrays[0];
7329 ptr4 = (orc_union32 *)ex->arrays[4];
7332 var40.x4[0] = ex->params[24];
7333 var40.x4[1] = ex->params[24];
7334 var40.x4[2] = ex->params[24];
7335 var40.x4[3] = ex->params[24];
7337 var42.x4[0] = 0x000000ff; /* 255 or 1.25987e-321f */
7338 var42.x4[1] = 0x000000ff; /* 255 or 1.25987e-321f */
7339 var42.x4[2] = 0x000000ff; /* 255 or 1.25987e-321f */
7340 var42.x4[3] = 0x000000ff; /* 255 or 1.25987e-321f */
7342 for (i = 0; i < n; i++) {
7344 var44.x4[0] = (orc_uint8)var40.x4[0];
7345 var44.x4[1] = (orc_uint8)var40.x4[1];
7346 var44.x4[2] = (orc_uint8)var40.x4[2];
7347 var44.x4[3] = (orc_uint8)var40.x4[3];
7351 var45.x4[0] = (orc_uint8)var41.x4[0];
7352 var45.x4[1] = (orc_uint8)var41.x4[1];
7353 var45.x4[2] = (orc_uint8)var41.x4[2];
7354 var45.x4[3] = (orc_uint8)var41.x4[3];
7356 var46.i = ((((orc_uint64)var44.i)>>48) << 48) | ((((orc_uint64)var44.i)>>48)<<32) | ((((orc_uint64)var44.i)>>48) << 16) | ((((orc_uint64)var44.i)>>48));
7358 var47.x4[0] = (var44.x4[0] * var45.x4[0]) & 0xffff;
7359 var47.x4[1] = (var44.x4[1] * var45.x4[1]) & 0xffff;
7360 var47.x4[2] = (var44.x4[2] * var45.x4[2]) & 0xffff;
7361 var47.x4[3] = (var44.x4[3] * var45.x4[3]) & 0xffff;
7363 var48.x4[0] = ((uint16_t)(((orc_uint16)(var47.x4[0]+128)) + (((orc_uint16)(var47.x4[0]+128))>>8)))>>8;
7364 var48.x4[1] = ((uint16_t)(((orc_uint16)(var47.x4[1]+128)) + (((orc_uint16)(var47.x4[1]+128))>>8)))>>8;
7365 var48.x4[2] = ((uint16_t)(((orc_uint16)(var47.x4[2]+128)) + (((orc_uint16)(var47.x4[2]+128))>>8)))>>8;
7366 var48.x4[3] = ((uint16_t)(((orc_uint16)(var47.x4[3]+128)) + (((orc_uint16)(var47.x4[3]+128))>>8)))>>8;
7368 var49.x4[0] = var48.x4[0];
7369 var49.x4[1] = var48.x4[1];
7370 var49.x4[2] = var48.x4[2];
7371 var49.x4[3] = var48.x4[3];
7373 var50.x4[0] = (var45.x4[0] * var46.x4[0]) & 0xffff;
7374 var50.x4[1] = (var45.x4[1] * var46.x4[1]) & 0xffff;
7375 var50.x4[2] = (var45.x4[2] * var46.x4[2]) & 0xffff;
7376 var50.x4[3] = (var45.x4[3] * var46.x4[3]) & 0xffff;
7378 var51.x4[0] = ((uint16_t)(((orc_uint16)(var50.x4[0]+128)) + (((orc_uint16)(var50.x4[0]+128))>>8)))>>8;
7379 var51.x4[1] = ((uint16_t)(((orc_uint16)(var50.x4[1]+128)) + (((orc_uint16)(var50.x4[1]+128))>>8)))>>8;
7380 var51.x4[2] = ((uint16_t)(((orc_uint16)(var50.x4[2]+128)) + (((orc_uint16)(var50.x4[2]+128))>>8)))>>8;
7381 var51.x4[3] = ((uint16_t)(((orc_uint16)(var50.x4[3]+128)) + (((orc_uint16)(var50.x4[3]+128))>>8)))>>8;
7385 var53.x4[0] = (orc_uint8)var52.x4[0];
7386 var53.x4[1] = (orc_uint8)var52.x4[1];
7387 var53.x4[2] = (orc_uint8)var52.x4[2];
7388 var53.x4[3] = (orc_uint8)var52.x4[3];
7390 var54.x4[0] = var51.x4[0] ^ var42.x4[0];
7391 var54.x4[1] = var51.x4[1] ^ var42.x4[1];
7392 var54.x4[2] = var51.x4[2] ^ var42.x4[2];
7393 var54.x4[3] = var51.x4[3] ^ var42.x4[3];
7395 var55.x4[0] = (var53.x4[0] * var54.x4[0]) & 0xffff;
7396 var55.x4[1] = (var53.x4[1] * var54.x4[1]) & 0xffff;
7397 var55.x4[2] = (var53.x4[2] * var54.x4[2]) & 0xffff;
7398 var55.x4[3] = (var53.x4[3] * var54.x4[3]) & 0xffff;
7400 var56.x4[0] = ((uint16_t)(((orc_uint16)(var55.x4[0]+128)) + (((orc_uint16)(var55.x4[0]+128))>>8)))>>8;
7401 var56.x4[1] = ((uint16_t)(((orc_uint16)(var55.x4[1]+128)) + (((orc_uint16)(var55.x4[1]+128))>>8)))>>8;
7402 var56.x4[2] = ((uint16_t)(((orc_uint16)(var55.x4[2]+128)) + (((orc_uint16)(var55.x4[2]+128))>>8)))>>8;
7403 var56.x4[3] = ((uint16_t)(((orc_uint16)(var55.x4[3]+128)) + (((orc_uint16)(var55.x4[3]+128))>>8)))>>8;
7405 var57.x4[0] = var56.x4[0];
7406 var57.x4[1] = var56.x4[1];
7407 var57.x4[2] = var56.x4[2];
7408 var57.x4[3] = var56.x4[3];
7410 var43.x4[0] = ORC_CLAMP_UB((orc_uint8)var57.x4[0] + (orc_uint8)var49.x4[0]);
7411 var43.x4[1] = ORC_CLAMP_UB((orc_uint8)var57.x4[1] + (orc_uint8)var49.x4[1]);
7412 var43.x4[2] = ORC_CLAMP_UB((orc_uint8)var57.x4[2] + (orc_uint8)var49.x4[2]);
7413 var43.x4[3] = ORC_CLAMP_UB((orc_uint8)var57.x4[3] + (orc_uint8)var49.x4[3]);
7420 /* cogorc_resample_horiz_1tap */
7422 _backup_cogorc_resample_horiz_1tap (OrcExecutor * ORC_RESTRICT ex)
7426 orc_int8 * ORC_RESTRICT ptr0;
7427 const orc_int8 * ORC_RESTRICT ptr4;
7430 ptr0 = (orc_int8 *)ex->arrays[0];
7431 ptr4 = (orc_int8 *)ex->arrays[4];
7434 for (i = 0; i < n; i++) {
7436 var32 = ptr4[(ex->params[24] + i*ex->params[25])>>16];
7443 /* cogorc_resample_horiz_2tap */
7445 _backup_cogorc_resample_horiz_2tap (OrcExecutor * ORC_RESTRICT ex)
7449 orc_int8 * ORC_RESTRICT ptr0;
7450 const orc_int8 * ORC_RESTRICT ptr4;
7453 ptr0 = (orc_int8 *)ex->arrays[0];
7454 ptr4 = (orc_int8 *)ex->arrays[4];
7457 for (i = 0; i < n; i++) {
7460 int tmp = ex->params[24] + i * ex->params[25];
7461 var32 = ((orc_uint8)ptr4[tmp>>16] * (256-((tmp>>8)&0xff)) + (orc_uint8)ptr4[(tmp>>16)+1] * ((tmp>>8)&0xff))>>8;
7469 /* test_float_constant_1 */
7471 _backup_test_float_constant_1 (OrcExecutor * ORC_RESTRICT ex)
7475 orc_union32 * ORC_RESTRICT ptr0;
7479 ptr0 = (orc_union32 *)ex->arrays[0];
7482 var32.i = 0x40000000; /* 1073741824 or 5.30499e-315f */
7484 for (i = 0; i < n; i++) {
7493 /* test_float_constant_2 */
7495 _backup_test_float_constant_2 (OrcExecutor * ORC_RESTRICT ex)
7499 orc_union32 * ORC_RESTRICT ptr0;
7503 ptr0 = (orc_union32 *)ex->arrays[0];
7506 var32.i = 0x40000000; /* 1073741824 or 5.30499e-315f */
7508 for (i = 0; i < n; i++) {
7517 /* convert_fc32_to_int32 */
7519 _backup_convert_fc32_to_int32 (OrcExecutor * ORC_RESTRICT ex)
7523 orc_union32 * ORC_RESTRICT ptr0;
7524 const orc_union64 * ORC_RESTRICT ptr4;
7531 ptr0 = (orc_union32 *)ex->arrays[0];
7532 ptr4 = (orc_union64 *)ex->arrays[4];
7535 var35.x2[0] = 0x46fffe00; /* 1191181824 or 5.88522e-315f */
7536 var35.x2[1] = 0x46fffe00; /* 1191181824 or 5.88522e-315f */
7538 for (i = 0; i < n; i++) {
7546 _src1.i = ORC_DENORMAL(var34.x2[0]);
7547 _src2.i = ORC_DENORMAL(var35.x2[0]);
7548 _dest1.f = _src1.f * _src2.f;
7549 var37.x2[0] = ORC_DENORMAL(_dest1.i);
7555 _src1.i = ORC_DENORMAL(var34.x2[1]);
7556 _src2.i = ORC_DENORMAL(var35.x2[1]);
7557 _dest1.f = _src1.f * _src2.f;
7558 var37.x2[1] = ORC_DENORMAL(_dest1.i);
7563 tmp = (int)var37.x2f[0];
7564 if (tmp == 0x80000000 && !(var37.x2[0]&0x80000000)) tmp = 0x7fffffff;
7569 tmp = (int)var37.x2f[1];
7570 if (tmp == 0x80000000 && !(var37.x2[1]&0x80000000)) tmp = 0x7fffffff;
7574 var36.x2[0] = var38.x2[0];
7575 var36.x2[1] = var38.x2[1];
7584 _backup_param64 (OrcExecutor * ORC_RESTRICT ex)
7588 orc_union64 * ORC_RESTRICT ptr0;
7592 ptr0 = (orc_union64 *)ex->arrays[0];
7595 var32.i = (ex->params[24] & 0xffffffff) | ((orc_uint64)(ex->params[24 + (ORC_VAR_T1 - ORC_VAR_P1)]) << 32);
7597 for (i = 0; i < n; i++) {
7608 _backup_const64 (OrcExecutor * ORC_RESTRICT ex)
7612 orc_union64 * ORC_RESTRICT ptr0;
7616 ptr0 = (orc_union64 *)ex->arrays[0];
7619 var32.i = ORC_UINT64_C(0x0123456789abcdef); /* 3.5127e-303f */
7621 for (i = 0; i < n; i++) {
7632 _backup_param64_2 (OrcExecutor * ORC_RESTRICT ex)
7636 orc_union64 * ORC_RESTRICT ptr0;
7640 ptr0 = (orc_union64 *)ex->arrays[0];
7643 var34.i = (ex->params[24] & 0xffffffff) | ((orc_uint64)(ex->params[24 + (ORC_VAR_T1 - ORC_VAR_P1)]) << 32);
7645 for (i = 0; i < n; i++) {
7654 /* pa_volume_s16ne_orc_2ch */
7656 _backup_pa_volume_s16ne_orc_2ch (OrcExecutor * ORC_RESTRICT ex)
7660 orc_union32 * ORC_RESTRICT ptr0;
7676 ptr0 = (orc_union32 *)ex->arrays[0];
7679 var41.i = (ex->params[24] & 0xffffffff) | ((orc_uint64)(ex->params[24 + (ORC_VAR_T1 - ORC_VAR_P1)]) << 32);
7681 var39.x4[0] = 0x00000000; /* 0 or 0f */
7682 var39.x4[1] = 0x00000000; /* 0 or 0f */
7683 var39.x4[2] = 0x00000000; /* 0 or 0f */
7684 var39.x4[3] = 0x00000000; /* 0 or 0f */
7686 for (i = 0; i < n; i++) {
7690 var42.x2[0] = (orc_uint16)var37.x2[0];
7691 var42.x2[1] = (orc_uint16)var37.x2[1];
7695 var43.x2[0] = var38.x2[0];
7696 var43.x2[1] = var38.x2[1];
7698 var44.x4[0] = (var39.x4[0] > var42.x4[0]) ? (~0) : 0;
7699 var44.x4[1] = (var39.x4[1] > var42.x4[1]) ? (~0) : 0;
7700 var44.x4[2] = (var39.x4[2] > var42.x4[2]) ? (~0) : 0;
7701 var44.x4[3] = (var39.x4[3] > var42.x4[3]) ? (~0) : 0;
7703 var45.x4[0] = var44.x4[0] & var41.x4[0];
7704 var45.x4[1] = var44.x4[1] & var41.x4[1];
7705 var45.x4[2] = var44.x4[2] & var41.x4[2];
7706 var45.x4[3] = var44.x4[3] & var41.x4[3];
7708 var46.x4[0] = ((orc_uint32)((orc_uint16)var42.x4[0]) * (orc_uint32)((orc_uint16)var41.x4[0])) >> 16;
7709 var46.x4[1] = ((orc_uint32)((orc_uint16)var42.x4[1]) * (orc_uint32)((orc_uint16)var41.x4[1])) >> 16;
7710 var46.x4[2] = ((orc_uint32)((orc_uint16)var42.x4[2]) * (orc_uint32)((orc_uint16)var41.x4[2])) >> 16;
7711 var46.x4[3] = ((orc_uint32)((orc_uint16)var42.x4[3]) * (orc_uint32)((orc_uint16)var41.x4[3])) >> 16;
7713 var47.x2[0] = var46.x2[0] - var45.x2[0];
7714 var47.x2[1] = var46.x2[1] - var45.x2[1];
7716 var48.x2[0] = ((orc_uint32)var41.x2[0]) >> 16;
7717 var48.x2[1] = ((orc_uint32)var41.x2[1]) >> 16;
7719 var49.x2[0] = (var43.x2[0] * var48.x2[0]) & 0xffffffff;
7720 var49.x2[1] = (var43.x2[1] * var48.x2[1]) & 0xffffffff;
7722 var50.x2[0] = var47.x2[0] + var49.x2[0];
7723 var50.x2[1] = var47.x2[1] + var49.x2[1];
7725 var40.x2[0] = ORC_CLAMP_SW(var50.x2[0]);
7726 var40.x2[1] = ORC_CLAMP_SW(var50.x2[1]);
7734 static int quiet = 0;
7735 static int benchmark = 0;
7737 static void help (const char *argv0)
7740 printf(" %s [OPTION]\n", argv0);
7741 printf("Help Options:\n");
7742 printf(" -h, --help Show help options\n");
7743 printf("Application Options:\n");
7744 printf(" -b, --benchmark Run benchmark and show results\n");
7745 printf(" -q, --quiet Don't output anything except on failures\n");
7751 main (int argc, char *argv[])
7758 for(i=1;i<argc;i++) {
7759 if (strcmp(argv[i], "--help") == 0 ||
7760 strcmp(argv[i], "-h") == 0) {
7762 } else if (strcmp(argv[i], "--quiet") == 0 ||
7763 strcmp(argv[i], "-q") == 0) {
7766 } else if (strcmp(argv[i], "--benchmark") == 0 ||
7767 strcmp(argv[i], "-b") == 0) {
7773 /* orc_add2_rshift_add_s16_22_op */
7775 OrcProgram *p = NULL;
7778 if (!quiet) printf ("orc_add2_rshift_add_s16_22_op:\n");
7779 p = orc_program_new ();
7780 orc_program_set_name (p, "orc_add2_rshift_add_s16_22_op");
7781 orc_program_set_backup_function (p, _backup_orc_add2_rshift_add_s16_22_op);
7782 orc_program_add_destination (p, 2, "d1");
7783 orc_program_add_source (p, 2, "s1");
7784 orc_program_add_source (p, 2, "s2");
7785 orc_program_add_source (p, 2, "s3");
7786 orc_program_add_constant (p, 4, 0x00000002, "c1");
7787 orc_program_add_temporary (p, 2, "t1");
7789 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, ORC_VAR_D1);
7790 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
7791 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
7792 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1);
7795 printf (" cycles (emulate) : %g\n",
7796 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
7799 ret = orc_test_compare_output_backup (p);
7802 } else if (!quiet) {
7803 printf (" backup function : PASSED\n");
7807 printf (" cycles (backup) : %g\n",
7808 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
7811 ret = orc_test_compare_output (p);
7812 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
7813 printf (" compiled function: COMPILE FAILED\n");
7816 } else if (!quiet) {
7817 printf (" compiled function: PASSED\n");
7821 printf (" cycles (compiled): %g\n",
7822 orc_test_performance_full (p, 0, NULL));
7825 orc_program_free (p);
7828 /* orc_add2_rshift_add_s16_22 */
7830 OrcProgram *p = NULL;
7833 if (!quiet) printf ("orc_add2_rshift_add_s16_22:\n");
7834 p = orc_program_new ();
7835 orc_program_set_name (p, "orc_add2_rshift_add_s16_22");
7836 orc_program_set_backup_function (p, _backup_orc_add2_rshift_add_s16_22);
7837 orc_program_add_destination (p, 2, "d1");
7838 orc_program_add_source (p, 2, "s1");
7839 orc_program_add_source (p, 2, "s2");
7840 orc_program_add_constant (p, 4, 0x00000002, "c1");
7841 orc_program_add_temporary (p, 2, "t1");
7843 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
7844 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
7845 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
7846 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
7849 printf (" cycles (emulate) : %g\n",
7850 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
7853 ret = orc_test_compare_output_backup (p);
7856 } else if (!quiet) {
7857 printf (" backup function : PASSED\n");
7861 printf (" cycles (backup) : %g\n",
7862 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
7865 ret = orc_test_compare_output (p);
7866 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
7867 printf (" compiled function: COMPILE FAILED\n");
7870 } else if (!quiet) {
7871 printf (" compiled function: PASSED\n");
7875 printf (" cycles (compiled): %g\n",
7876 orc_test_performance_full (p, 0, NULL));
7879 orc_program_free (p);
7882 /* orc_add2_rshift_sub_s16_22_op */
7884 OrcProgram *p = NULL;
7887 if (!quiet) printf ("orc_add2_rshift_sub_s16_22_op:\n");
7888 p = orc_program_new ();
7889 orc_program_set_name (p, "orc_add2_rshift_sub_s16_22_op");
7890 orc_program_set_backup_function (p, _backup_orc_add2_rshift_sub_s16_22_op);
7891 orc_program_add_destination (p, 2, "d1");
7892 orc_program_add_source (p, 2, "s1");
7893 orc_program_add_source (p, 2, "s2");
7894 orc_program_add_source (p, 2, "s3");
7895 orc_program_add_constant (p, 4, 0x00000002, "c1");
7896 orc_program_add_temporary (p, 2, "t1");
7898 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, ORC_VAR_D1);
7899 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
7900 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
7901 orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1);
7904 printf (" cycles (emulate) : %g\n",
7905 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
7908 ret = orc_test_compare_output_backup (p);
7911 } else if (!quiet) {
7912 printf (" backup function : PASSED\n");
7916 printf (" cycles (backup) : %g\n",
7917 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
7920 ret = orc_test_compare_output (p);
7921 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
7922 printf (" compiled function: COMPILE FAILED\n");
7925 } else if (!quiet) {
7926 printf (" compiled function: PASSED\n");
7930 printf (" cycles (compiled): %g\n",
7931 orc_test_performance_full (p, 0, NULL));
7934 orc_program_free (p);
7937 /* orc_add2_rshift_sub_s16_22 */
7939 OrcProgram *p = NULL;
7942 if (!quiet) printf ("orc_add2_rshift_sub_s16_22:\n");
7943 p = orc_program_new ();
7944 orc_program_set_name (p, "orc_add2_rshift_sub_s16_22");
7945 orc_program_set_backup_function (p, _backup_orc_add2_rshift_sub_s16_22);
7946 orc_program_add_destination (p, 2, "d1");
7947 orc_program_add_source (p, 2, "s1");
7948 orc_program_add_source (p, 2, "s2");
7949 orc_program_add_constant (p, 4, 0x00000002, "c1");
7950 orc_program_add_temporary (p, 2, "t1");
7952 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
7953 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
7954 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
7955 orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
7958 printf (" cycles (emulate) : %g\n",
7959 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
7962 ret = orc_test_compare_output_backup (p);
7965 } else if (!quiet) {
7966 printf (" backup function : PASSED\n");
7970 printf (" cycles (backup) : %g\n",
7971 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
7974 ret = orc_test_compare_output (p);
7975 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
7976 printf (" compiled function: COMPILE FAILED\n");
7979 } else if (!quiet) {
7980 printf (" compiled function: PASSED\n");
7984 printf (" cycles (compiled): %g\n",
7985 orc_test_performance_full (p, 0, NULL));
7988 orc_program_free (p);
7991 /* orc_add2_rshift_add_s16_11_op */
7993 OrcProgram *p = NULL;
7996 if (!quiet) printf ("orc_add2_rshift_add_s16_11_op:\n");
7997 p = orc_program_new ();
7998 orc_program_set_name (p, "orc_add2_rshift_add_s16_11_op");
7999 orc_program_set_backup_function (p, _backup_orc_add2_rshift_add_s16_11_op);
8000 orc_program_add_destination (p, 2, "d1");
8001 orc_program_add_source (p, 2, "s1");
8002 orc_program_add_source (p, 2, "s2");
8003 orc_program_add_source (p, 2, "s3");
8004 orc_program_add_temporary (p, 2, "t1");
8006 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, ORC_VAR_D1);
8007 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1);
8010 printf (" cycles (emulate) : %g\n",
8011 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
8014 ret = orc_test_compare_output_backup (p);
8017 } else if (!quiet) {
8018 printf (" backup function : PASSED\n");
8022 printf (" cycles (backup) : %g\n",
8023 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
8026 ret = orc_test_compare_output (p);
8027 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
8028 printf (" compiled function: COMPILE FAILED\n");
8031 } else if (!quiet) {
8032 printf (" compiled function: PASSED\n");
8036 printf (" cycles (compiled): %g\n",
8037 orc_test_performance_full (p, 0, NULL));
8040 orc_program_free (p);
8043 /* orc_add2_rshift_add_s16_11 */
8045 OrcProgram *p = NULL;
8048 if (!quiet) printf ("orc_add2_rshift_add_s16_11:\n");
8049 p = orc_program_new ();
8050 orc_program_set_name (p, "orc_add2_rshift_add_s16_11");
8051 orc_program_set_backup_function (p, _backup_orc_add2_rshift_add_s16_11);
8052 orc_program_add_destination (p, 2, "d1");
8053 orc_program_add_source (p, 2, "s1");
8054 orc_program_add_source (p, 2, "s2");
8055 orc_program_add_temporary (p, 2, "t1");
8057 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
8058 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
8061 printf (" cycles (emulate) : %g\n",
8062 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
8065 ret = orc_test_compare_output_backup (p);
8068 } else if (!quiet) {
8069 printf (" backup function : PASSED\n");
8073 printf (" cycles (backup) : %g\n",
8074 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
8077 ret = orc_test_compare_output (p);
8078 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
8079 printf (" compiled function: COMPILE FAILED\n");
8082 } else if (!quiet) {
8083 printf (" compiled function: PASSED\n");
8087 printf (" cycles (compiled): %g\n",
8088 orc_test_performance_full (p, 0, NULL));
8091 orc_program_free (p);
8094 /* orc_add2_rshift_sub_s16_11_op */
8096 OrcProgram *p = NULL;
8099 if (!quiet) printf ("orc_add2_rshift_sub_s16_11_op:\n");
8100 p = orc_program_new ();
8101 orc_program_set_name (p, "orc_add2_rshift_sub_s16_11_op");
8102 orc_program_set_backup_function (p, _backup_orc_add2_rshift_sub_s16_11_op);
8103 orc_program_add_destination (p, 2, "d1");
8104 orc_program_add_source (p, 2, "s1");
8105 orc_program_add_source (p, 2, "s2");
8106 orc_program_add_source (p, 2, "s3");
8107 orc_program_add_temporary (p, 2, "t1");
8109 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, ORC_VAR_D1);
8110 orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1);
8113 printf (" cycles (emulate) : %g\n",
8114 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
8117 ret = orc_test_compare_output_backup (p);
8120 } else if (!quiet) {
8121 printf (" backup function : PASSED\n");
8125 printf (" cycles (backup) : %g\n",
8126 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
8129 ret = orc_test_compare_output (p);
8130 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
8131 printf (" compiled function: COMPILE FAILED\n");
8134 } else if (!quiet) {
8135 printf (" compiled function: PASSED\n");
8139 printf (" cycles (compiled): %g\n",
8140 orc_test_performance_full (p, 0, NULL));
8143 orc_program_free (p);
8146 /* orc_add2_rshift_sub_s16_11 */
8148 OrcProgram *p = NULL;
8151 if (!quiet) printf ("orc_add2_rshift_sub_s16_11:\n");
8152 p = orc_program_new ();
8153 orc_program_set_name (p, "orc_add2_rshift_sub_s16_11");
8154 orc_program_set_backup_function (p, _backup_orc_add2_rshift_sub_s16_11);
8155 orc_program_add_destination (p, 2, "d1");
8156 orc_program_add_source (p, 2, "s1");
8157 orc_program_add_source (p, 2, "s2");
8158 orc_program_add_temporary (p, 2, "t1");
8160 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
8161 orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
8164 printf (" cycles (emulate) : %g\n",
8165 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
8168 ret = orc_test_compare_output_backup (p);
8171 } else if (!quiet) {
8172 printf (" backup function : PASSED\n");
8176 printf (" cycles (backup) : %g\n",
8177 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
8180 ret = orc_test_compare_output (p);
8181 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
8182 printf (" compiled function: COMPILE FAILED\n");
8185 } else if (!quiet) {
8186 printf (" compiled function: PASSED\n");
8190 printf (" cycles (compiled): %g\n",
8191 orc_test_performance_full (p, 0, NULL));
8194 orc_program_free (p);
8197 /* orc_add_const_rshift_s16_11 */
8199 OrcProgram *p = NULL;
8202 if (!quiet) printf ("orc_add_const_rshift_s16_11:\n");
8203 p = orc_program_new ();
8204 orc_program_set_name (p, "orc_add_const_rshift_s16_11");
8205 orc_program_set_backup_function (p, _backup_orc_add_const_rshift_s16_11);
8206 orc_program_add_destination (p, 2, "d1");
8207 orc_program_add_source (p, 2, "s1");
8208 orc_program_add_constant (p, 4, 0x00000001, "c1");
8209 orc_program_add_temporary (p, 2, "t1");
8211 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1);
8212 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
8215 printf (" cycles (emulate) : %g\n",
8216 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
8219 ret = orc_test_compare_output_backup (p);
8222 } else if (!quiet) {
8223 printf (" backup function : PASSED\n");
8227 printf (" cycles (backup) : %g\n",
8228 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
8231 ret = orc_test_compare_output (p);
8232 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
8233 printf (" compiled function: COMPILE FAILED\n");
8236 } else if (!quiet) {
8237 printf (" compiled function: PASSED\n");
8241 printf (" cycles (compiled): %g\n",
8242 orc_test_performance_full (p, 0, NULL));
8245 orc_program_free (p);
8248 /* orc_add_const_rshift_s16 */
8250 OrcProgram *p = NULL;
8253 if (!quiet) printf ("orc_add_const_rshift_s16:\n");
8254 p = orc_program_new ();
8255 orc_program_set_name (p, "orc_add_const_rshift_s16");
8256 orc_program_set_backup_function (p, _backup_orc_add_const_rshift_s16);
8257 orc_program_add_destination (p, 2, "d1");
8258 orc_program_add_parameter (p, 2, "p1");
8259 orc_program_add_parameter (p, 2, "p2");
8260 orc_program_add_temporary (p, 2, "t1");
8262 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1);
8263 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1);
8266 printf (" cycles (emulate) : %g\n",
8267 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
8270 ret = orc_test_compare_output_backup (p);
8273 } else if (!quiet) {
8274 printf (" backup function : PASSED\n");
8278 printf (" cycles (backup) : %g\n",
8279 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
8282 ret = orc_test_compare_output (p);
8283 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
8284 printf (" compiled function: COMPILE FAILED\n");
8287 } else if (!quiet) {
8288 printf (" compiled function: PASSED\n");
8292 printf (" cycles (compiled): %g\n",
8293 orc_test_performance_full (p, 0, NULL));
8296 orc_program_free (p);
8301 OrcProgram *p = NULL;
8304 if (!quiet) printf ("orc_add_s16:\n");
8305 p = orc_program_new ();
8306 orc_program_set_name (p, "orc_add_s16");
8307 orc_program_set_backup_function (p, _backup_orc_add_s16);
8308 orc_program_add_destination (p, 2, "d1");
8309 orc_program_add_source (p, 2, "s1");
8310 orc_program_add_source (p, 2, "s2");
8312 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
8315 printf (" cycles (emulate) : %g\n",
8316 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
8319 ret = orc_test_compare_output_backup (p);
8322 } else if (!quiet) {
8323 printf (" backup function : PASSED\n");
8327 printf (" cycles (backup) : %g\n",
8328 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
8331 ret = orc_test_compare_output (p);
8332 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
8333 printf (" compiled function: COMPILE FAILED\n");
8336 } else if (!quiet) {
8337 printf (" compiled function: PASSED\n");
8341 printf (" cycles (compiled): %g\n",
8342 orc_test_performance_full (p, 0, NULL));
8345 orc_program_free (p);
8348 /* orc_add_s16_2d */
8350 OrcProgram *p = NULL;
8353 if (!quiet) printf ("orc_add_s16_2d:\n");
8354 p = orc_program_new ();
8355 orc_program_set_2d (p);
8356 orc_program_set_name (p, "orc_add_s16_2d");
8357 orc_program_set_backup_function (p, _backup_orc_add_s16_2d);
8358 orc_program_add_destination (p, 2, "d1");
8359 orc_program_add_source (p, 2, "s1");
8361 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1);
8364 printf (" cycles (emulate) : %g\n",
8365 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
8368 ret = orc_test_compare_output_backup (p);
8371 } else if (!quiet) {
8372 printf (" backup function : PASSED\n");
8376 printf (" cycles (backup) : %g\n",
8377 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
8380 ret = orc_test_compare_output (p);
8381 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
8382 printf (" compiled function: COMPILE FAILED\n");
8385 } else if (!quiet) {
8386 printf (" compiled function: PASSED\n");
8390 printf (" cycles (compiled): %g\n",
8391 orc_test_performance_full (p, 0, NULL));
8394 orc_program_free (p);
8397 /* orc_addc_rshift_s16 */
8399 OrcProgram *p = NULL;
8402 if (!quiet) printf ("orc_addc_rshift_s16:\n");
8403 p = orc_program_new ();
8404 orc_program_set_name (p, "orc_addc_rshift_s16");
8405 orc_program_set_backup_function (p, _backup_orc_addc_rshift_s16);
8406 orc_program_add_destination (p, 2, "d1");
8407 orc_program_add_source (p, 2, "s1");
8408 orc_program_add_source (p, 2, "s2");
8409 orc_program_add_parameter (p, 2, "p1");
8410 orc_program_add_temporary (p, 2, "t1");
8412 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
8413 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
8416 printf (" cycles (emulate) : %g\n",
8417 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
8420 ret = orc_test_compare_output_backup (p);
8423 } else if (!quiet) {
8424 printf (" backup function : PASSED\n");
8428 printf (" cycles (backup) : %g\n",
8429 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
8432 ret = orc_test_compare_output (p);
8433 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
8434 printf (" compiled function: COMPILE FAILED\n");
8437 } else if (!quiet) {
8438 printf (" compiled function: PASSED\n");
8442 printf (" cycles (compiled): %g\n",
8443 orc_test_performance_full (p, 0, NULL));
8446 orc_program_free (p);
8449 /* orc_lshift1_s16 */
8451 OrcProgram *p = NULL;
8454 if (!quiet) printf ("orc_lshift1_s16:\n");
8455 p = orc_program_new ();
8456 orc_program_set_name (p, "orc_lshift1_s16");
8457 orc_program_set_backup_function (p, _backup_orc_lshift1_s16);
8458 orc_program_add_destination (p, 2, "d1");
8459 orc_program_add_source (p, 2, "s1");
8460 orc_program_add_constant (p, 4, 0x00000001, "c1");
8462 orc_program_append_2 (p, "shlw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1);
8465 printf (" cycles (emulate) : %g\n",
8466 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
8469 ret = orc_test_compare_output_backup (p);
8472 } else if (!quiet) {
8473 printf (" backup function : PASSED\n");
8477 printf (" cycles (backup) : %g\n",
8478 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
8481 ret = orc_test_compare_output (p);
8482 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
8483 printf (" compiled function: COMPILE FAILED\n");
8486 } else if (!quiet) {
8487 printf (" compiled function: PASSED\n");
8491 printf (" cycles (compiled): %g\n",
8492 orc_test_performance_full (p, 0, NULL));
8495 orc_program_free (p);
8498 /* orc_lshift2_s16 */
8500 OrcProgram *p = NULL;
8503 if (!quiet) printf ("orc_lshift2_s16:\n");
8504 p = orc_program_new ();
8505 orc_program_set_name (p, "orc_lshift2_s16");
8506 orc_program_set_backup_function (p, _backup_orc_lshift2_s16);
8507 orc_program_add_destination (p, 2, "d1");
8508 orc_program_add_source (p, 2, "s1");
8509 orc_program_add_constant (p, 4, 0x00000002, "c1");
8511 orc_program_append_2 (p, "shlw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1);
8514 printf (" cycles (emulate) : %g\n",
8515 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
8518 ret = orc_test_compare_output_backup (p);
8521 } else if (!quiet) {
8522 printf (" backup function : PASSED\n");
8526 printf (" cycles (backup) : %g\n",
8527 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
8530 ret = orc_test_compare_output (p);
8531 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
8532 printf (" compiled function: COMPILE FAILED\n");
8535 } else if (!quiet) {
8536 printf (" compiled function: PASSED\n");
8540 printf (" cycles (compiled): %g\n",
8541 orc_test_performance_full (p, 0, NULL));
8544 orc_program_free (p);
8547 /* orc_lshift_s16_ip */
8549 OrcProgram *p = NULL;
8552 if (!quiet) printf ("orc_lshift_s16_ip:\n");
8553 p = orc_program_new ();
8554 orc_program_set_name (p, "orc_lshift_s16_ip");
8555 orc_program_set_backup_function (p, _backup_orc_lshift_s16_ip);
8556 orc_program_add_destination (p, 2, "d1");
8557 orc_program_add_parameter (p, 2, "p1");
8559 orc_program_append_2 (p, "shlw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1);
8562 printf (" cycles (emulate) : %g\n",
8563 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
8566 ret = orc_test_compare_output_backup (p);
8569 } else if (!quiet) {
8570 printf (" backup function : PASSED\n");
8574 printf (" cycles (backup) : %g\n",
8575 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
8578 ret = orc_test_compare_output (p);
8579 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
8580 printf (" compiled function: COMPILE FAILED\n");
8583 } else if (!quiet) {
8584 printf (" compiled function: PASSED\n");
8588 printf (" cycles (compiled): %g\n",
8589 orc_test_performance_full (p, 0, NULL));
8592 orc_program_free (p);
8595 /* orc_mas2_add_s16_op */
8597 OrcProgram *p = NULL;
8600 if (!quiet) printf ("orc_mas2_add_s16_op:\n");
8601 p = orc_program_new ();
8602 orc_program_set_name (p, "orc_mas2_add_s16_op");
8603 orc_program_set_backup_function (p, _backup_orc_mas2_add_s16_op);
8604 orc_program_add_destination (p, 2, "d1");
8605 orc_program_add_source (p, 2, "s1");
8606 orc_program_add_source (p, 2, "s2");
8607 orc_program_add_source (p, 2, "s3");
8608 orc_program_add_parameter (p, 2, "p1");
8609 orc_program_add_parameter (p, 4, "p2");
8610 orc_program_add_parameter (p, 4, "p3");
8611 orc_program_add_temporary (p, 2, "t1");
8612 orc_program_add_temporary (p, 4, "t2");
8614 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, ORC_VAR_D1);
8615 orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
8616 orc_program_append_2 (p, "addl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2, ORC_VAR_D1);
8617 orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P3, ORC_VAR_D1);
8618 orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
8619 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1);
8622 printf (" cycles (emulate) : %g\n",
8623 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
8626 ret = orc_test_compare_output_backup (p);
8629 } else if (!quiet) {
8630 printf (" backup function : PASSED\n");
8634 printf (" cycles (backup) : %g\n",
8635 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
8638 ret = orc_test_compare_output (p);
8639 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
8640 printf (" compiled function: COMPILE FAILED\n");
8643 } else if (!quiet) {
8644 printf (" compiled function: PASSED\n");
8648 printf (" cycles (compiled): %g\n",
8649 orc_test_performance_full (p, 0, NULL));
8652 orc_program_free (p);
8655 /* orc_mas2_add_s16_ip */
8657 OrcProgram *p = NULL;
8660 if (!quiet) printf ("orc_mas2_add_s16_ip:\n");
8661 p = orc_program_new ();
8662 orc_program_set_name (p, "orc_mas2_add_s16_ip");
8663 orc_program_set_backup_function (p, _backup_orc_mas2_add_s16_ip);
8664 orc_program_add_destination (p, 2, "d1");
8665 orc_program_add_source (p, 2, "s1");
8666 orc_program_add_source (p, 2, "s2");
8667 orc_program_add_parameter (p, 2, "p1");
8668 orc_program_add_parameter (p, 4, "p2");
8669 orc_program_add_parameter (p, 4, "p3");
8670 orc_program_add_temporary (p, 2, "t1");
8671 orc_program_add_temporary (p, 4, "t2");
8673 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
8674 orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
8675 orc_program_append_2 (p, "addl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2, ORC_VAR_D1);
8676 orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P3, ORC_VAR_D1);
8677 orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
8678 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
8681 printf (" cycles (emulate) : %g\n",
8682 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
8685 ret = orc_test_compare_output_backup (p);
8688 } else if (!quiet) {
8689 printf (" backup function : PASSED\n");
8693 printf (" cycles (backup) : %g\n",
8694 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
8697 ret = orc_test_compare_output (p);
8698 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
8699 printf (" compiled function: COMPILE FAILED\n");
8702 } else if (!quiet) {
8703 printf (" compiled function: PASSED\n");
8707 printf (" cycles (compiled): %g\n",
8708 orc_test_performance_full (p, 0, NULL));
8711 orc_program_free (p);
8714 /* orc_mas2_sub_s16_op */
8716 OrcProgram *p = NULL;
8719 if (!quiet) printf ("orc_mas2_sub_s16_op:\n");
8720 p = orc_program_new ();
8721 orc_program_set_name (p, "orc_mas2_sub_s16_op");
8722 orc_program_set_backup_function (p, _backup_orc_mas2_sub_s16_op);
8723 orc_program_add_destination (p, 2, "d1");
8724 orc_program_add_source (p, 2, "s1");
8725 orc_program_add_source (p, 2, "s2");
8726 orc_program_add_source (p, 2, "s3");
8727 orc_program_add_parameter (p, 2, "p1");
8728 orc_program_add_parameter (p, 4, "p2");
8729 orc_program_add_parameter (p, 4, "p3");
8730 orc_program_add_temporary (p, 2, "t1");
8731 orc_program_add_temporary (p, 4, "t2");
8733 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, ORC_VAR_D1);
8734 orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
8735 orc_program_append_2 (p, "addl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2, ORC_VAR_D1);
8736 orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P3, ORC_VAR_D1);
8737 orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
8738 orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1);
8741 printf (" cycles (emulate) : %g\n",
8742 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
8745 ret = orc_test_compare_output_backup (p);
8748 } else if (!quiet) {
8749 printf (" backup function : PASSED\n");
8753 printf (" cycles (backup) : %g\n",
8754 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
8757 ret = orc_test_compare_output (p);
8758 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
8759 printf (" compiled function: COMPILE FAILED\n");
8762 } else if (!quiet) {
8763 printf (" compiled function: PASSED\n");
8767 printf (" cycles (compiled): %g\n",
8768 orc_test_performance_full (p, 0, NULL));
8771 orc_program_free (p);
8774 /* orc_mas2_sub_s16_ip */
8776 OrcProgram *p = NULL;
8779 if (!quiet) printf ("orc_mas2_sub_s16_ip:\n");
8780 p = orc_program_new ();
8781 orc_program_set_name (p, "orc_mas2_sub_s16_ip");
8782 orc_program_set_backup_function (p, _backup_orc_mas2_sub_s16_ip);
8783 orc_program_add_destination (p, 2, "d1");
8784 orc_program_add_source (p, 2, "s1");
8785 orc_program_add_source (p, 2, "s2");
8786 orc_program_add_parameter (p, 2, "p1");
8787 orc_program_add_parameter (p, 4, "p2");
8788 orc_program_add_parameter (p, 4, "p3");
8789 orc_program_add_temporary (p, 2, "t1");
8790 orc_program_add_temporary (p, 4, "t2");
8792 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
8793 orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
8794 orc_program_append_2 (p, "addl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2, ORC_VAR_D1);
8795 orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P3, ORC_VAR_D1);
8796 orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
8797 orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
8800 printf (" cycles (emulate) : %g\n",
8801 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
8804 ret = orc_test_compare_output_backup (p);
8807 } else if (!quiet) {
8808 printf (" backup function : PASSED\n");
8812 printf (" cycles (backup) : %g\n",
8813 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
8816 ret = orc_test_compare_output (p);
8817 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
8818 printf (" compiled function: COMPILE FAILED\n");
8821 } else if (!quiet) {
8822 printf (" compiled function: PASSED\n");
8826 printf (" cycles (compiled): %g\n",
8827 orc_test_performance_full (p, 0, NULL));
8830 orc_program_free (p);
8833 /* orc_mas4_across_add_s16_1991_op */
8835 OrcProgram *p = NULL;
8838 if (!quiet) printf ("orc_mas4_across_add_s16_1991_op:\n");
8839 p = orc_program_new ();
8840 orc_program_set_name (p, "orc_mas4_across_add_s16_1991_op");
8841 orc_program_set_backup_function (p, _backup_orc_mas4_across_add_s16_1991_op);
8842 orc_program_add_destination (p, 2, "d1");
8843 orc_program_add_source (p, 2, "s1");
8844 orc_program_add_source (p, 2, "s2");
8845 orc_program_add_source (p, 2, "s3");
8846 orc_program_add_source (p, 2, "s4");
8847 orc_program_add_source (p, 2, "s5");
8848 orc_program_add_constant (p, 4, 0x00000009, "c1");
8849 orc_program_add_parameter (p, 4, "p1");
8850 orc_program_add_parameter (p, 4, "p2");
8851 orc_program_add_temporary (p, 2, "t1");
8852 orc_program_add_temporary (p, 2, "t2");
8853 orc_program_add_temporary (p, 4, "t3");
8854 orc_program_add_temporary (p, 4, "t4");
8856 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_S4, ORC_VAR_D1);
8857 orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
8858 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_S5, ORC_VAR_D1);
8859 orc_program_append_2 (p, "convswl", 0, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
8860 orc_program_append_2 (p, "subl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_D1);
8861 orc_program_append_2 (p, "addl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P1, ORC_VAR_D1);
8862 orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P2, ORC_VAR_D1);
8863 orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
8864 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1);
8867 printf (" cycles (emulate) : %g\n",
8868 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
8871 ret = orc_test_compare_output_backup (p);
8874 } else if (!quiet) {
8875 printf (" backup function : PASSED\n");
8879 printf (" cycles (backup) : %g\n",
8880 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
8883 ret = orc_test_compare_output (p);
8884 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
8885 printf (" compiled function: COMPILE FAILED\n");
8888 } else if (!quiet) {
8889 printf (" compiled function: PASSED\n");
8893 printf (" cycles (compiled): %g\n",
8894 orc_test_performance_full (p, 0, NULL));
8897 orc_program_free (p);
8900 /* orc_mas4_across_add_s16_1991_ip */
8902 OrcProgram *p = NULL;
8905 if (!quiet) printf ("orc_mas4_across_add_s16_1991_ip:\n");
8906 p = orc_program_new ();
8907 orc_program_set_name (p, "orc_mas4_across_add_s16_1991_ip");
8908 orc_program_set_backup_function (p, _backup_orc_mas4_across_add_s16_1991_ip);
8909 orc_program_add_destination (p, 2, "d1");
8910 orc_program_add_source (p, 2, "s1");
8911 orc_program_add_source (p, 2, "s2");
8912 orc_program_add_source (p, 2, "s3");
8913 orc_program_add_source (p, 2, "s4");
8914 orc_program_add_constant (p, 4, 0x00000009, "c1");
8915 orc_program_add_parameter (p, 4, "p1");
8916 orc_program_add_parameter (p, 4, "p2");
8917 orc_program_add_temporary (p, 2, "t1");
8918 orc_program_add_temporary (p, 2, "t2");
8919 orc_program_add_temporary (p, 4, "t3");
8920 orc_program_add_temporary (p, 4, "t4");
8922 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, ORC_VAR_D1);
8923 orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
8924 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_S4, ORC_VAR_D1);
8925 orc_program_append_2 (p, "convswl", 0, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
8926 orc_program_append_2 (p, "subl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_D1);
8927 orc_program_append_2 (p, "addl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P1, ORC_VAR_D1);
8928 orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P2, ORC_VAR_D1);
8929 orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
8930 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
8933 printf (" cycles (emulate) : %g\n",
8934 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
8937 ret = orc_test_compare_output_backup (p);
8940 } else if (!quiet) {
8941 printf (" backup function : PASSED\n");
8945 printf (" cycles (backup) : %g\n",
8946 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
8949 ret = orc_test_compare_output (p);
8950 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
8951 printf (" compiled function: COMPILE FAILED\n");
8954 } else if (!quiet) {
8955 printf (" compiled function: PASSED\n");
8959 printf (" cycles (compiled): %g\n",
8960 orc_test_performance_full (p, 0, NULL));
8963 orc_program_free (p);
8966 /* orc_mas4_across_sub_s16_1991_op */
8968 OrcProgram *p = NULL;
8971 if (!quiet) printf ("orc_mas4_across_sub_s16_1991_op:\n");
8972 p = orc_program_new ();
8973 orc_program_set_name (p, "orc_mas4_across_sub_s16_1991_op");
8974 orc_program_set_backup_function (p, _backup_orc_mas4_across_sub_s16_1991_op);
8975 orc_program_add_destination (p, 2, "d1");
8976 orc_program_add_source (p, 2, "s1");
8977 orc_program_add_source (p, 2, "s2");
8978 orc_program_add_source (p, 2, "s3");
8979 orc_program_add_source (p, 2, "s4");
8980 orc_program_add_source (p, 2, "s5");
8981 orc_program_add_constant (p, 4, 0x00000009, "c1");
8982 orc_program_add_parameter (p, 4, "p1");
8983 orc_program_add_parameter (p, 4, "p2");
8984 orc_program_add_temporary (p, 2, "t1");
8985 orc_program_add_temporary (p, 2, "t2");
8986 orc_program_add_temporary (p, 4, "t3");
8987 orc_program_add_temporary (p, 4, "t4");
8989 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_S4, ORC_VAR_D1);
8990 orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
8991 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_S5, ORC_VAR_D1);
8992 orc_program_append_2 (p, "convswl", 0, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
8993 orc_program_append_2 (p, "subl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_D1);
8994 orc_program_append_2 (p, "addl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P1, ORC_VAR_D1);
8995 orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P2, ORC_VAR_D1);
8996 orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
8997 orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1);
9000 printf (" cycles (emulate) : %g\n",
9001 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9004 ret = orc_test_compare_output_backup (p);
9007 } else if (!quiet) {
9008 printf (" backup function : PASSED\n");
9012 printf (" cycles (backup) : %g\n",
9013 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9016 ret = orc_test_compare_output (p);
9017 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9018 printf (" compiled function: COMPILE FAILED\n");
9021 } else if (!quiet) {
9022 printf (" compiled function: PASSED\n");
9026 printf (" cycles (compiled): %g\n",
9027 orc_test_performance_full (p, 0, NULL));
9030 orc_program_free (p);
9033 /* orc_mas4_across_sub_s16_1991_ip */
9035 OrcProgram *p = NULL;
9038 if (!quiet) printf ("orc_mas4_across_sub_s16_1991_ip:\n");
9039 p = orc_program_new ();
9040 orc_program_set_name (p, "orc_mas4_across_sub_s16_1991_ip");
9041 orc_program_set_backup_function (p, _backup_orc_mas4_across_sub_s16_1991_ip);
9042 orc_program_add_destination (p, 2, "d1");
9043 orc_program_add_source (p, 2, "s1");
9044 orc_program_add_source (p, 2, "s2");
9045 orc_program_add_source (p, 2, "s3");
9046 orc_program_add_source (p, 2, "s4");
9047 orc_program_add_constant (p, 4, 0x00000009, "c1");
9048 orc_program_add_parameter (p, 4, "p1");
9049 orc_program_add_parameter (p, 4, "p2");
9050 orc_program_add_temporary (p, 2, "t1");
9051 orc_program_add_temporary (p, 2, "t2");
9052 orc_program_add_temporary (p, 4, "t3");
9053 orc_program_add_temporary (p, 4, "t4");
9055 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_S3, ORC_VAR_D1);
9056 orc_program_append_2 (p, "mulswl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
9057 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_S4, ORC_VAR_D1);
9058 orc_program_append_2 (p, "convswl", 0, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
9059 orc_program_append_2 (p, "subl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_D1);
9060 orc_program_append_2 (p, "addl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P1, ORC_VAR_D1);
9061 orc_program_append_2 (p, "shrsl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P2, ORC_VAR_D1);
9062 orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
9063 orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
9066 printf (" cycles (emulate) : %g\n",
9067 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9070 ret = orc_test_compare_output_backup (p);
9073 } else if (!quiet) {
9074 printf (" backup function : PASSED\n");
9078 printf (" cycles (backup) : %g\n",
9079 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9082 ret = orc_test_compare_output (p);
9083 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9084 printf (" compiled function: COMPILE FAILED\n");
9087 } else if (!quiet) {
9088 printf (" compiled function: PASSED\n");
9092 printf (" cycles (compiled): %g\n",
9093 orc_test_performance_full (p, 0, NULL));
9096 orc_program_free (p);
9099 /* orc_subtract_s16 */
9101 OrcProgram *p = NULL;
9104 if (!quiet) printf ("orc_subtract_s16:\n");
9105 p = orc_program_new ();
9106 orc_program_set_name (p, "orc_subtract_s16");
9107 orc_program_set_backup_function (p, _backup_orc_subtract_s16);
9108 orc_program_add_destination (p, 2, "d1");
9109 orc_program_add_source (p, 2, "s1");
9110 orc_program_add_source (p, 2, "s2");
9112 orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
9115 printf (" cycles (emulate) : %g\n",
9116 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9119 ret = orc_test_compare_output_backup (p);
9122 } else if (!quiet) {
9123 printf (" backup function : PASSED\n");
9127 printf (" cycles (backup) : %g\n",
9128 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9131 ret = orc_test_compare_output (p);
9132 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9133 printf (" compiled function: COMPILE FAILED\n");
9136 } else if (!quiet) {
9137 printf (" compiled function: PASSED\n");
9141 printf (" cycles (compiled): %g\n",
9142 orc_test_performance_full (p, 0, NULL));
9145 orc_program_free (p);
9148 /* orc_add_s16_u8 */
9150 OrcProgram *p = NULL;
9153 if (!quiet) printf ("orc_add_s16_u8:\n");
9154 p = orc_program_new ();
9155 orc_program_set_name (p, "orc_add_s16_u8");
9156 orc_program_set_backup_function (p, _backup_orc_add_s16_u8);
9157 orc_program_add_destination (p, 2, "d1");
9158 orc_program_add_source (p, 2, "s1");
9159 orc_program_add_source (p, 1, "s2");
9160 orc_program_add_temporary (p, 2, "t1");
9162 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
9163 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
9166 printf (" cycles (emulate) : %g\n",
9167 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9170 ret = orc_test_compare_output_backup (p);
9173 } else if (!quiet) {
9174 printf (" backup function : PASSED\n");
9178 printf (" cycles (backup) : %g\n",
9179 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9182 ret = orc_test_compare_output (p);
9183 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9184 printf (" compiled function: COMPILE FAILED\n");
9187 } else if (!quiet) {
9188 printf (" compiled function: PASSED\n");
9192 printf (" cycles (compiled): %g\n",
9193 orc_test_performance_full (p, 0, NULL));
9196 orc_program_free (p);
9199 /* orc_add_s16_u8_2d */
9201 OrcProgram *p = NULL;
9204 if (!quiet) printf ("orc_add_s16_u8_2d:\n");
9205 p = orc_program_new ();
9206 orc_program_set_2d (p);
9207 orc_program_set_name (p, "orc_add_s16_u8_2d");
9208 orc_program_set_backup_function (p, _backup_orc_add_s16_u8_2d);
9209 orc_program_add_destination (p, 2, "d1");
9210 orc_program_add_source (p, 1, "s1");
9211 orc_program_add_temporary (p, 2, "t1");
9213 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
9214 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
9217 printf (" cycles (emulate) : %g\n",
9218 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9221 ret = orc_test_compare_output_backup (p);
9224 } else if (!quiet) {
9225 printf (" backup function : PASSED\n");
9229 printf (" cycles (backup) : %g\n",
9230 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9233 ret = orc_test_compare_output (p);
9234 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9235 printf (" compiled function: COMPILE FAILED\n");
9238 } else if (!quiet) {
9239 printf (" compiled function: PASSED\n");
9243 printf (" cycles (compiled): %g\n",
9244 orc_test_performance_full (p, 0, NULL));
9247 orc_program_free (p);
9250 /* orc_convert_s16_u8 */
9252 OrcProgram *p = NULL;
9255 if (!quiet) printf ("orc_convert_s16_u8:\n");
9256 p = orc_program_new ();
9257 orc_program_set_name (p, "orc_convert_s16_u8");
9258 orc_program_set_backup_function (p, _backup_orc_convert_s16_u8);
9259 orc_program_add_destination (p, 2, "d1");
9260 orc_program_add_source (p, 1, "s1");
9262 orc_program_append_2 (p, "convubw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
9265 printf (" cycles (emulate) : %g\n",
9266 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9269 ret = orc_test_compare_output_backup (p);
9272 } else if (!quiet) {
9273 printf (" backup function : PASSED\n");
9277 printf (" cycles (backup) : %g\n",
9278 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9281 ret = orc_test_compare_output (p);
9282 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9283 printf (" compiled function: COMPILE FAILED\n");
9286 } else if (!quiet) {
9287 printf (" compiled function: PASSED\n");
9291 printf (" cycles (compiled): %g\n",
9292 orc_test_performance_full (p, 0, NULL));
9295 orc_program_free (p);
9298 /* orc_convert_u8_s16 */
9300 OrcProgram *p = NULL;
9303 if (!quiet) printf ("orc_convert_u8_s16:\n");
9304 p = orc_program_new ();
9305 orc_program_set_name (p, "orc_convert_u8_s16");
9306 orc_program_set_backup_function (p, _backup_orc_convert_u8_s16);
9307 orc_program_add_destination (p, 1, "d1");
9308 orc_program_add_source (p, 2, "s1");
9310 orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
9313 printf (" cycles (emulate) : %g\n",
9314 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9317 ret = orc_test_compare_output_backup (p);
9320 } else if (!quiet) {
9321 printf (" backup function : PASSED\n");
9325 printf (" cycles (backup) : %g\n",
9326 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9329 ret = orc_test_compare_output (p);
9330 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9331 printf (" compiled function: COMPILE FAILED\n");
9334 } else if (!quiet) {
9335 printf (" compiled function: PASSED\n");
9339 printf (" cycles (compiled): %g\n",
9340 orc_test_performance_full (p, 0, NULL));
9343 orc_program_free (p);
9346 /* orc_offsetconvert_u8_s16 */
9348 OrcProgram *p = NULL;
9351 if (!quiet) printf ("orc_offsetconvert_u8_s16:\n");
9352 p = orc_program_new ();
9353 orc_program_set_name (p, "orc_offsetconvert_u8_s16");
9354 orc_program_set_backup_function (p, _backup_orc_offsetconvert_u8_s16);
9355 orc_program_add_destination (p, 1, "d1");
9356 orc_program_add_source (p, 2, "s1");
9357 orc_program_add_constant (p, 4, 0x00000080, "c1");
9358 orc_program_add_temporary (p, 2, "t1");
9360 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1);
9361 orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
9364 printf (" cycles (emulate) : %g\n",
9365 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9368 ret = orc_test_compare_output_backup (p);
9371 } else if (!quiet) {
9372 printf (" backup function : PASSED\n");
9376 printf (" cycles (backup) : %g\n",
9377 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9380 ret = orc_test_compare_output (p);
9381 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9382 printf (" compiled function: COMPILE FAILED\n");
9385 } else if (!quiet) {
9386 printf (" compiled function: PASSED\n");
9390 printf (" cycles (compiled): %g\n",
9391 orc_test_performance_full (p, 0, NULL));
9394 orc_program_free (p);
9397 /* orc_offsetconvert_s16_u8 */
9399 OrcProgram *p = NULL;
9402 if (!quiet) printf ("orc_offsetconvert_s16_u8:\n");
9403 p = orc_program_new ();
9404 orc_program_set_name (p, "orc_offsetconvert_s16_u8");
9405 orc_program_set_backup_function (p, _backup_orc_offsetconvert_s16_u8);
9406 orc_program_add_destination (p, 2, "d1");
9407 orc_program_add_source (p, 1, "s1");
9408 orc_program_add_constant (p, 4, 0x00000080, "c1");
9409 orc_program_add_temporary (p, 2, "t1");
9411 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
9412 orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
9415 printf (" cycles (emulate) : %g\n",
9416 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9419 ret = orc_test_compare_output_backup (p);
9422 } else if (!quiet) {
9423 printf (" backup function : PASSED\n");
9427 printf (" cycles (backup) : %g\n",
9428 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9431 ret = orc_test_compare_output (p);
9432 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9433 printf (" compiled function: COMPILE FAILED\n");
9436 } else if (!quiet) {
9437 printf (" compiled function: PASSED\n");
9441 printf (" cycles (compiled): %g\n",
9442 orc_test_performance_full (p, 0, NULL));
9445 orc_program_free (p);
9448 /* orc_subtract_s16_u8 */
9450 OrcProgram *p = NULL;
9453 if (!quiet) printf ("orc_subtract_s16_u8:\n");
9454 p = orc_program_new ();
9455 orc_program_set_name (p, "orc_subtract_s16_u8");
9456 orc_program_set_backup_function (p, _backup_orc_subtract_s16_u8);
9457 orc_program_add_destination (p, 2, "d1");
9458 orc_program_add_source (p, 2, "s1");
9459 orc_program_add_source (p, 1, "s2");
9460 orc_program_add_temporary (p, 2, "t1");
9462 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
9463 orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1);
9466 printf (" cycles (emulate) : %g\n",
9467 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9470 ret = orc_test_compare_output_backup (p);
9473 } else if (!quiet) {
9474 printf (" backup function : PASSED\n");
9478 printf (" cycles (backup) : %g\n",
9479 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9482 ret = orc_test_compare_output (p);
9483 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9484 printf (" compiled function: COMPILE FAILED\n");
9487 } else if (!quiet) {
9488 printf (" compiled function: PASSED\n");
9492 printf (" cycles (compiled): %g\n",
9493 orc_test_performance_full (p, 0, NULL));
9496 orc_program_free (p);
9499 /* orc_multiply_and_add_s16_u8 */
9501 OrcProgram *p = NULL;
9504 if (!quiet) printf ("orc_multiply_and_add_s16_u8:\n");
9505 p = orc_program_new ();
9506 orc_program_set_name (p, "orc_multiply_and_add_s16_u8");
9507 orc_program_set_backup_function (p, _backup_orc_multiply_and_add_s16_u8);
9508 orc_program_add_destination (p, 2, "d1");
9509 orc_program_add_source (p, 2, "s1");
9510 orc_program_add_source (p, 1, "s2");
9511 orc_program_add_temporary (p, 2, "t1");
9513 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
9514 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
9515 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
9518 printf (" cycles (emulate) : %g\n",
9519 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9522 ret = orc_test_compare_output_backup (p);
9525 } else if (!quiet) {
9526 printf (" backup function : PASSED\n");
9530 printf (" cycles (backup) : %g\n",
9531 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9534 ret = orc_test_compare_output (p);
9535 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9536 printf (" compiled function: COMPILE FAILED\n");
9539 } else if (!quiet) {
9540 printf (" compiled function: PASSED\n");
9544 printf (" cycles (compiled): %g\n",
9545 orc_test_performance_full (p, 0, NULL));
9548 orc_program_free (p);
9551 /* orc_splat_s16_ns */
9553 OrcProgram *p = NULL;
9556 if (!quiet) printf ("orc_splat_s16_ns:\n");
9557 p = orc_program_new ();
9558 orc_program_set_name (p, "orc_splat_s16_ns");
9559 orc_program_set_backup_function (p, _backup_orc_splat_s16_ns);
9560 orc_program_add_destination (p, 2, "d1");
9561 orc_program_add_parameter (p, 2, "p1");
9563 orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1);
9566 printf (" cycles (emulate) : %g\n",
9567 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9570 ret = orc_test_compare_output_backup (p);
9573 } else if (!quiet) {
9574 printf (" backup function : PASSED\n");
9578 printf (" cycles (backup) : %g\n",
9579 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9582 ret = orc_test_compare_output (p);
9583 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9584 printf (" compiled function: COMPILE FAILED\n");
9587 } else if (!quiet) {
9588 printf (" compiled function: PASSED\n");
9592 printf (" cycles (compiled): %g\n",
9593 orc_test_performance_full (p, 0, NULL));
9596 orc_program_free (p);
9599 /* orc_splat_s16_2d_4xn */
9601 OrcProgram *p = NULL;
9604 if (!quiet) printf ("orc_splat_s16_2d_4xn:\n");
9605 p = orc_program_new ();
9606 orc_program_set_constant_n (p, 4);
9607 orc_program_set_2d (p);
9608 orc_program_set_name (p, "orc_splat_s16_2d_4xn");
9609 orc_program_set_backup_function (p, _backup_orc_splat_s16_2d_4xn);
9610 orc_program_add_destination (p, 2, "d1");
9611 orc_program_add_parameter (p, 2, "p1");
9613 orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1);
9616 printf (" cycles (emulate) : %g\n",
9617 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9620 ret = orc_test_compare_output_backup (p);
9623 } else if (!quiet) {
9624 printf (" backup function : PASSED\n");
9628 printf (" cycles (backup) : %g\n",
9629 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9632 ret = orc_test_compare_output (p);
9633 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9634 printf (" compiled function: COMPILE FAILED\n");
9637 } else if (!quiet) {
9638 printf (" compiled function: PASSED\n");
9642 printf (" cycles (compiled): %g\n",
9643 orc_test_performance_full (p, 0, NULL));
9646 orc_program_free (p);
9649 /* orc_splat_s16_2d_8xn */
9651 OrcProgram *p = NULL;
9654 if (!quiet) printf ("orc_splat_s16_2d_8xn:\n");
9655 p = orc_program_new ();
9656 orc_program_set_constant_n (p, 8);
9657 orc_program_set_2d (p);
9658 orc_program_set_name (p, "orc_splat_s16_2d_8xn");
9659 orc_program_set_backup_function (p, _backup_orc_splat_s16_2d_8xn);
9660 orc_program_add_destination (p, 2, "d1");
9661 orc_program_add_parameter (p, 2, "p1");
9663 orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1);
9666 printf (" cycles (emulate) : %g\n",
9667 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9670 ret = orc_test_compare_output_backup (p);
9673 } else if (!quiet) {
9674 printf (" backup function : PASSED\n");
9678 printf (" cycles (backup) : %g\n",
9679 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9682 ret = orc_test_compare_output (p);
9683 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9684 printf (" compiled function: COMPILE FAILED\n");
9687 } else if (!quiet) {
9688 printf (" compiled function: PASSED\n");
9692 printf (" cycles (compiled): %g\n",
9693 orc_test_performance_full (p, 0, NULL));
9696 orc_program_free (p);
9699 /* orc_splat_s16_2d */
9701 OrcProgram *p = NULL;
9704 if (!quiet) printf ("orc_splat_s16_2d:\n");
9705 p = orc_program_new ();
9706 orc_program_set_2d (p);
9707 orc_program_set_name (p, "orc_splat_s16_2d");
9708 orc_program_set_backup_function (p, _backup_orc_splat_s16_2d);
9709 orc_program_add_destination (p, 2, "d1");
9710 orc_program_add_parameter (p, 2, "p1");
9712 orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1);
9715 printf (" cycles (emulate) : %g\n",
9716 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9719 ret = orc_test_compare_output_backup (p);
9722 } else if (!quiet) {
9723 printf (" backup function : PASSED\n");
9727 printf (" cycles (backup) : %g\n",
9728 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9731 ret = orc_test_compare_output (p);
9732 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9733 printf (" compiled function: COMPILE FAILED\n");
9736 } else if (!quiet) {
9737 printf (" compiled function: PASSED\n");
9741 printf (" cycles (compiled): %g\n",
9742 orc_test_performance_full (p, 0, NULL));
9745 orc_program_free (p);
9748 /* orc_splat_u8_ns */
9750 OrcProgram *p = NULL;
9753 if (!quiet) printf ("orc_splat_u8_ns:\n");
9754 p = orc_program_new ();
9755 orc_program_set_name (p, "orc_splat_u8_ns");
9756 orc_program_set_backup_function (p, _backup_orc_splat_u8_ns);
9757 orc_program_add_destination (p, 1, "d1");
9758 orc_program_add_parameter (p, 1, "p1");
9760 orc_program_append_2 (p, "copyb", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1);
9763 printf (" cycles (emulate) : %g\n",
9764 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9767 ret = orc_test_compare_output_backup (p);
9770 } else if (!quiet) {
9771 printf (" backup function : PASSED\n");
9775 printf (" cycles (backup) : %g\n",
9776 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9779 ret = orc_test_compare_output (p);
9780 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9781 printf (" compiled function: COMPILE FAILED\n");
9784 } else if (!quiet) {
9785 printf (" compiled function: PASSED\n");
9789 printf (" cycles (compiled): %g\n",
9790 orc_test_performance_full (p, 0, NULL));
9793 orc_program_free (p);
9796 /* orc_splat_u8_2d */
9798 OrcProgram *p = NULL;
9801 if (!quiet) printf ("orc_splat_u8_2d:\n");
9802 p = orc_program_new ();
9803 orc_program_set_2d (p);
9804 orc_program_set_name (p, "orc_splat_u8_2d");
9805 orc_program_set_backup_function (p, _backup_orc_splat_u8_2d);
9806 orc_program_add_destination (p, 1, "d1");
9807 orc_program_add_parameter (p, 1, "p1");
9809 orc_program_append_2 (p, "copyb", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1);
9812 printf (" cycles (emulate) : %g\n",
9813 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9816 ret = orc_test_compare_output_backup (p);
9819 } else if (!quiet) {
9820 printf (" backup function : PASSED\n");
9824 printf (" cycles (backup) : %g\n",
9825 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9828 ret = orc_test_compare_output (p);
9829 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9830 printf (" compiled function: COMPILE FAILED\n");
9833 } else if (!quiet) {
9834 printf (" compiled function: PASSED\n");
9838 printf (" cycles (compiled): %g\n",
9839 orc_test_performance_full (p, 0, NULL));
9842 orc_program_free (p);
9845 /* orc_average_u8 */
9847 OrcProgram *p = NULL;
9850 if (!quiet) printf ("orc_average_u8:\n");
9851 p = orc_program_new ();
9852 orc_program_set_name (p, "orc_average_u8");
9853 orc_program_set_backup_function (p, _backup_orc_average_u8);
9854 orc_program_add_destination (p, 1, "d1");
9855 orc_program_add_source (p, 1, "s1");
9856 orc_program_add_source (p, 1, "s2");
9858 orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
9861 printf (" cycles (emulate) : %g\n",
9862 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9865 ret = orc_test_compare_output_backup (p);
9868 } else if (!quiet) {
9869 printf (" backup function : PASSED\n");
9873 printf (" cycles (backup) : %g\n",
9874 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9877 ret = orc_test_compare_output (p);
9878 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9879 printf (" compiled function: COMPILE FAILED\n");
9882 } else if (!quiet) {
9883 printf (" compiled function: PASSED\n");
9887 printf (" cycles (compiled): %g\n",
9888 orc_test_performance_full (p, 0, NULL));
9891 orc_program_free (p);
9894 /* orc_rrshift6_add_s16_2d */
9896 OrcProgram *p = NULL;
9899 if (!quiet) printf ("orc_rrshift6_add_s16_2d:\n");
9900 p = orc_program_new ();
9901 orc_program_set_2d (p);
9902 orc_program_set_name (p, "orc_rrshift6_add_s16_2d");
9903 orc_program_set_backup_function (p, _backup_orc_rrshift6_add_s16_2d);
9904 orc_program_add_destination (p, 1, "d1");
9905 orc_program_add_source (p, 2, "s1");
9906 orc_program_add_source (p, 2, "s2");
9907 orc_program_add_constant (p, 4, 0x00000020, "c1");
9908 orc_program_add_constant (p, 4, 0x00000006, "c2");
9909 orc_program_add_temporary (p, 2, "t1");
9911 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_C1, ORC_VAR_D1);
9912 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_D1);
9913 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1);
9914 orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
9917 printf (" cycles (emulate) : %g\n",
9918 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9921 ret = orc_test_compare_output_backup (p);
9924 } else if (!quiet) {
9925 printf (" backup function : PASSED\n");
9929 printf (" cycles (backup) : %g\n",
9930 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9933 ret = orc_test_compare_output (p);
9934 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9935 printf (" compiled function: COMPILE FAILED\n");
9938 } else if (!quiet) {
9939 printf (" compiled function: PASSED\n");
9943 printf (" cycles (compiled): %g\n",
9944 orc_test_performance_full (p, 0, NULL));
9947 orc_program_free (p);
9950 /* orc_rrshift6_sub_s16_2d */
9952 OrcProgram *p = NULL;
9955 if (!quiet) printf ("orc_rrshift6_sub_s16_2d:\n");
9956 p = orc_program_new ();
9957 orc_program_set_2d (p);
9958 orc_program_set_name (p, "orc_rrshift6_sub_s16_2d");
9959 orc_program_set_backup_function (p, _backup_orc_rrshift6_sub_s16_2d);
9960 orc_program_add_destination (p, 2, "d1");
9961 orc_program_add_destination (p, 2, "d2");
9962 orc_program_add_constant (p, 4, 0x00001fe0, "c1");
9963 orc_program_add_constant (p, 4, 0x00000006, "c2");
9964 orc_program_add_temporary (p, 2, "t1");
9966 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_D2, ORC_VAR_C1, ORC_VAR_D1);
9967 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_D1);
9968 orc_program_append_2 (p, "copyw", 0, ORC_VAR_D2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
9969 orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
9972 printf (" cycles (emulate) : %g\n",
9973 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
9976 ret = orc_test_compare_output_backup (p);
9979 } else if (!quiet) {
9980 printf (" backup function : PASSED\n");
9984 printf (" cycles (backup) : %g\n",
9985 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
9988 ret = orc_test_compare_output (p);
9989 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
9990 printf (" compiled function: COMPILE FAILED\n");
9993 } else if (!quiet) {
9994 printf (" compiled function: PASSED\n");
9998 printf (" cycles (compiled): %g\n",
9999 orc_test_performance_full (p, 0, NULL));
10002 orc_program_free (p);
10005 /* orc_rrshift6_s16_ip_2d */
10007 OrcProgram *p = NULL;
10010 if (!quiet) printf ("orc_rrshift6_s16_ip_2d:\n");
10011 p = orc_program_new ();
10012 orc_program_set_2d (p);
10013 orc_program_set_name (p, "orc_rrshift6_s16_ip_2d");
10014 orc_program_set_backup_function (p, _backup_orc_rrshift6_s16_ip_2d);
10015 orc_program_add_destination (p, 2, "d1");
10016 orc_program_add_constant (p, 4, 0x00001fe0, "c1");
10017 orc_program_add_constant (p, 4, 0x00000006, "c2");
10018 orc_program_add_temporary (p, 2, "t1");
10020 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_C1, ORC_VAR_D1);
10021 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_D1);
10024 printf (" cycles (emulate) : %g\n",
10025 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10028 ret = orc_test_compare_output_backup (p);
10031 } else if (!quiet) {
10032 printf (" backup function : PASSED\n");
10036 printf (" cycles (backup) : %g\n",
10037 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10040 ret = orc_test_compare_output (p);
10041 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
10042 printf (" compiled function: COMPILE FAILED\n");
10045 } else if (!quiet) {
10046 printf (" compiled function: PASSED\n");
10050 printf (" cycles (compiled): %g\n",
10051 orc_test_performance_full (p, 0, NULL));
10054 orc_program_free (p);
10057 /* orc_rrshift6_s16_ip */
10059 OrcProgram *p = NULL;
10062 if (!quiet) printf ("orc_rrshift6_s16_ip:\n");
10063 p = orc_program_new ();
10064 orc_program_set_name (p, "orc_rrshift6_s16_ip");
10065 orc_program_set_backup_function (p, _backup_orc_rrshift6_s16_ip);
10066 orc_program_add_destination (p, 2, "d1");
10067 orc_program_add_constant (p, 4, 0x00001fe0, "c1");
10068 orc_program_add_constant (p, 4, 0x00000006, "c2");
10069 orc_program_add_temporary (p, 2, "t1");
10071 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_C1, ORC_VAR_D1);
10072 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_D1);
10075 printf (" cycles (emulate) : %g\n",
10076 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10079 ret = orc_test_compare_output_backup (p);
10082 } else if (!quiet) {
10083 printf (" backup function : PASSED\n");
10087 printf (" cycles (backup) : %g\n",
10088 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10091 ret = orc_test_compare_output (p);
10092 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
10093 printf (" compiled function: COMPILE FAILED\n");
10096 } else if (!quiet) {
10097 printf (" compiled function: PASSED\n");
10101 printf (" cycles (compiled): %g\n",
10102 orc_test_performance_full (p, 0, NULL));
10105 orc_program_free (p);
10108 /* orc_unpack_yuyv_y */
10110 OrcProgram *p = NULL;
10113 if (!quiet) printf ("orc_unpack_yuyv_y:\n");
10114 p = orc_program_new ();
10115 orc_program_set_name (p, "orc_unpack_yuyv_y");
10116 orc_program_set_backup_function (p, _backup_orc_unpack_yuyv_y);
10117 orc_program_add_destination (p, 1, "d1");
10118 orc_program_add_source (p, 2, "s1");
10120 orc_program_append_2 (p, "select0wb", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
10123 printf (" cycles (emulate) : %g\n",
10124 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10127 ret = orc_test_compare_output_backup (p);
10130 } else if (!quiet) {
10131 printf (" backup function : PASSED\n");
10135 printf (" cycles (backup) : %g\n",
10136 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10139 ret = orc_test_compare_output (p);
10140 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
10141 printf (" compiled function: COMPILE FAILED\n");
10144 } else if (!quiet) {
10145 printf (" compiled function: PASSED\n");
10149 printf (" cycles (compiled): %g\n",
10150 orc_test_performance_full (p, 0, NULL));
10153 orc_program_free (p);
10156 /* orc_unpack_yuyv_u */
10158 OrcProgram *p = NULL;
10161 if (!quiet) printf ("orc_unpack_yuyv_u:\n");
10162 p = orc_program_new ();
10163 orc_program_set_name (p, "orc_unpack_yuyv_u");
10164 orc_program_set_backup_function (p, _backup_orc_unpack_yuyv_u);
10165 orc_program_add_destination (p, 1, "d1");
10166 orc_program_add_source (p, 4, "s1");
10167 orc_program_add_temporary (p, 2, "t1");
10169 orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
10170 orc_program_append_2 (p, "select1wb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
10173 printf (" cycles (emulate) : %g\n",
10174 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10177 ret = orc_test_compare_output_backup (p);
10180 } else if (!quiet) {
10181 printf (" backup function : PASSED\n");
10185 printf (" cycles (backup) : %g\n",
10186 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10189 ret = orc_test_compare_output (p);
10190 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
10191 printf (" compiled function: COMPILE FAILED\n");
10194 } else if (!quiet) {
10195 printf (" compiled function: PASSED\n");
10199 printf (" cycles (compiled): %g\n",
10200 orc_test_performance_full (p, 0, NULL));
10203 orc_program_free (p);
10206 /* orc_unpack_yuyv_v */
10208 OrcProgram *p = NULL;
10211 if (!quiet) printf ("orc_unpack_yuyv_v:\n");
10212 p = orc_program_new ();
10213 orc_program_set_name (p, "orc_unpack_yuyv_v");
10214 orc_program_set_backup_function (p, _backup_orc_unpack_yuyv_v);
10215 orc_program_add_destination (p, 1, "d1");
10216 orc_program_add_source (p, 4, "s1");
10217 orc_program_add_temporary (p, 2, "t1");
10219 orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
10220 orc_program_append_2 (p, "select1wb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
10223 printf (" cycles (emulate) : %g\n",
10224 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10227 ret = orc_test_compare_output_backup (p);
10230 } else if (!quiet) {
10231 printf (" backup function : PASSED\n");
10235 printf (" cycles (backup) : %g\n",
10236 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10239 ret = orc_test_compare_output (p);
10240 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
10241 printf (" compiled function: COMPILE FAILED\n");
10244 } else if (!quiet) {
10245 printf (" compiled function: PASSED\n");
10249 printf (" cycles (compiled): %g\n",
10250 orc_test_performance_full (p, 0, NULL));
10253 orc_program_free (p);
10258 OrcProgram *p = NULL;
10261 if (!quiet) printf ("orc_packyuyv:\n");
10262 p = orc_program_new ();
10263 orc_program_set_name (p, "orc_packyuyv");
10264 orc_program_set_backup_function (p, _backup_orc_packyuyv);
10265 orc_program_add_destination (p, 4, "d1");
10266 orc_program_add_source (p, 2, "s1");
10267 orc_program_add_source (p, 1, "s2");
10268 orc_program_add_source (p, 1, "s3");
10269 orc_program_add_temporary (p, 1, "t1");
10270 orc_program_add_temporary (p, 1, "t2");
10271 orc_program_add_temporary (p, 2, "t3");
10272 orc_program_add_temporary (p, 2, "t4");
10273 orc_program_add_temporary (p, 2, "t5");
10275 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T5, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
10276 orc_program_append_2 (p, "select0wb", 0, ORC_VAR_T1, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1);
10277 orc_program_append_2 (p, "select1wb", 0, ORC_VAR_T2, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1);
10278 orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1);
10279 orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_S3, ORC_VAR_D1);
10280 orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_D1);
10283 printf (" cycles (emulate) : %g\n",
10284 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10287 ret = orc_test_compare_output_backup (p);
10290 } else if (!quiet) {
10291 printf (" backup function : PASSED\n");
10295 printf (" cycles (backup) : %g\n",
10296 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10299 ret = orc_test_compare_output (p);
10300 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
10301 printf (" compiled function: COMPILE FAILED\n");
10304 } else if (!quiet) {
10305 printf (" compiled function: PASSED\n");
10309 printf (" cycles (compiled): %g\n",
10310 orc_test_performance_full (p, 0, NULL));
10313 orc_program_free (p);
10316 /* orc_unpack_uyvy_y */
10318 OrcProgram *p = NULL;
10321 if (!quiet) printf ("orc_unpack_uyvy_y:\n");
10322 p = orc_program_new ();
10323 orc_program_set_name (p, "orc_unpack_uyvy_y");
10324 orc_program_set_backup_function (p, _backup_orc_unpack_uyvy_y);
10325 orc_program_add_destination (p, 1, "d1");
10326 orc_program_add_source (p, 2, "s1");
10328 orc_program_append_2 (p, "select1wb", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
10331 printf (" cycles (emulate) : %g\n",
10332 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10335 ret = orc_test_compare_output_backup (p);
10338 } else if (!quiet) {
10339 printf (" backup function : PASSED\n");
10343 printf (" cycles (backup) : %g\n",
10344 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10347 ret = orc_test_compare_output (p);
10348 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
10349 printf (" compiled function: COMPILE FAILED\n");
10352 } else if (!quiet) {
10353 printf (" compiled function: PASSED\n");
10357 printf (" cycles (compiled): %g\n",
10358 orc_test_performance_full (p, 0, NULL));
10361 orc_program_free (p);
10364 /* orc_unpack_uyvy_u */
10366 OrcProgram *p = NULL;
10369 if (!quiet) printf ("orc_unpack_uyvy_u:\n");
10370 p = orc_program_new ();
10371 orc_program_set_name (p, "orc_unpack_uyvy_u");
10372 orc_program_set_backup_function (p, _backup_orc_unpack_uyvy_u);
10373 orc_program_add_destination (p, 1, "d1");
10374 orc_program_add_source (p, 4, "s1");
10375 orc_program_add_temporary (p, 2, "t1");
10377 orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
10378 orc_program_append_2 (p, "select0wb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
10381 printf (" cycles (emulate) : %g\n",
10382 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10385 ret = orc_test_compare_output_backup (p);
10388 } else if (!quiet) {
10389 printf (" backup function : PASSED\n");
10393 printf (" cycles (backup) : %g\n",
10394 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10397 ret = orc_test_compare_output (p);
10398 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
10399 printf (" compiled function: COMPILE FAILED\n");
10402 } else if (!quiet) {
10403 printf (" compiled function: PASSED\n");
10407 printf (" cycles (compiled): %g\n",
10408 orc_test_performance_full (p, 0, NULL));
10411 orc_program_free (p);
10414 /* orc_unpack_uyvy_v */
10416 OrcProgram *p = NULL;
10419 if (!quiet) printf ("orc_unpack_uyvy_v:\n");
10420 p = orc_program_new ();
10421 orc_program_set_name (p, "orc_unpack_uyvy_v");
10422 orc_program_set_backup_function (p, _backup_orc_unpack_uyvy_v);
10423 orc_program_add_destination (p, 1, "d1");
10424 orc_program_add_source (p, 4, "s1");
10425 orc_program_add_temporary (p, 2, "t1");
10427 orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
10428 orc_program_append_2 (p, "select0wb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
10431 printf (" cycles (emulate) : %g\n",
10432 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10435 ret = orc_test_compare_output_backup (p);
10438 } else if (!quiet) {
10439 printf (" backup function : PASSED\n");
10443 printf (" cycles (backup) : %g\n",
10444 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10447 ret = orc_test_compare_output (p);
10448 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
10449 printf (" compiled function: COMPILE FAILED\n");
10452 } else if (!quiet) {
10453 printf (" compiled function: PASSED\n");
10457 printf (" cycles (compiled): %g\n",
10458 orc_test_performance_full (p, 0, NULL));
10461 orc_program_free (p);
10464 /* orc_interleave2_s16 */
10466 OrcProgram *p = NULL;
10469 if (!quiet) printf ("orc_interleave2_s16:\n");
10470 p = orc_program_new ();
10471 orc_program_set_name (p, "orc_interleave2_s16");
10472 orc_program_set_backup_function (p, _backup_orc_interleave2_s16);
10473 orc_program_add_destination (p, 4, "d1");
10474 orc_program_add_source (p, 2, "s1");
10475 orc_program_add_source (p, 2, "s2");
10477 orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
10480 printf (" cycles (emulate) : %g\n",
10481 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10484 ret = orc_test_compare_output_backup (p);
10487 } else if (!quiet) {
10488 printf (" backup function : PASSED\n");
10492 printf (" cycles (backup) : %g\n",
10493 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10496 ret = orc_test_compare_output (p);
10497 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
10498 printf (" compiled function: COMPILE FAILED\n");
10501 } else if (!quiet) {
10502 printf (" compiled function: PASSED\n");
10506 printf (" cycles (compiled): %g\n",
10507 orc_test_performance_full (p, 0, NULL));
10510 orc_program_free (p);
10513 /* orc_interleave2_rrshift1_s16 */
10515 OrcProgram *p = NULL;
10518 if (!quiet) printf ("orc_interleave2_rrshift1_s16:\n");
10519 p = orc_program_new ();
10520 orc_program_set_name (p, "orc_interleave2_rrshift1_s16");
10521 orc_program_set_backup_function (p, _backup_orc_interleave2_rrshift1_s16);
10522 orc_program_add_destination (p, 4, "d1");
10523 orc_program_add_source (p, 2, "s1");
10524 orc_program_add_source (p, 2, "s2");
10525 orc_program_add_constant (p, 4, 0x00000001, "c1");
10526 orc_program_add_temporary (p, 2, "t1");
10527 orc_program_add_temporary (p, 2, "t2");
10529 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1);
10530 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
10531 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_C1, ORC_VAR_D1);
10532 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
10533 orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
10536 printf (" cycles (emulate) : %g\n",
10537 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10540 ret = orc_test_compare_output_backup (p);
10543 } else if (!quiet) {
10544 printf (" backup function : PASSED\n");
10548 printf (" cycles (backup) : %g\n",
10549 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10552 ret = orc_test_compare_output (p);
10553 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
10554 printf (" compiled function: COMPILE FAILED\n");
10557 } else if (!quiet) {
10558 printf (" compiled function: PASSED\n");
10562 printf (" cycles (compiled): %g\n",
10563 orc_test_performance_full (p, 0, NULL));
10566 orc_program_free (p);
10569 /* orc_deinterleave2_s16 */
10571 OrcProgram *p = NULL;
10574 if (!quiet) printf ("orc_deinterleave2_s16:\n");
10575 p = orc_program_new ();
10576 orc_program_set_name (p, "orc_deinterleave2_s16");
10577 orc_program_set_backup_function (p, _backup_orc_deinterleave2_s16);
10578 orc_program_add_destination (p, 2, "d1");
10579 orc_program_add_destination (p, 2, "d2");
10580 orc_program_add_source (p, 4, "s1");
10581 orc_program_add_temporary (p, 4, "t1");
10583 orc_program_append_2 (p, "copyl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
10584 orc_program_append_2 (p, "select0lw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
10585 orc_program_append_2 (p, "select1lw", 0, ORC_VAR_D2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
10588 printf (" cycles (emulate) : %g\n",
10589 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10592 ret = orc_test_compare_output_backup (p);
10595 } else if (!quiet) {
10596 printf (" backup function : PASSED\n");
10600 printf (" cycles (backup) : %g\n",
10601 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10604 ret = orc_test_compare_output (p);
10605 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
10606 printf (" compiled function: COMPILE FAILED\n");
10609 } else if (!quiet) {
10610 printf (" compiled function: PASSED\n");
10614 printf (" cycles (compiled): %g\n",
10615 orc_test_performance_full (p, 0, NULL));
10618 orc_program_free (p);
10621 /* orc_deinterleave2_lshift1_s16 */
10623 OrcProgram *p = NULL;
10626 if (!quiet) printf ("orc_deinterleave2_lshift1_s16:\n");
10627 p = orc_program_new ();
10628 orc_program_set_name (p, "orc_deinterleave2_lshift1_s16");
10629 orc_program_set_backup_function (p, _backup_orc_deinterleave2_lshift1_s16);
10630 orc_program_add_destination (p, 2, "d1");
10631 orc_program_add_destination (p, 2, "d2");
10632 orc_program_add_source (p, 4, "s1");
10633 orc_program_add_constant (p, 4, 0x00000001, "c1");
10634 orc_program_add_temporary (p, 4, "t1");
10635 orc_program_add_temporary (p, 2, "t2");
10636 orc_program_add_temporary (p, 2, "t3");
10638 orc_program_append_2 (p, "copyl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
10639 orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
10640 orc_program_append_2 (p, "shlw", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
10641 orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
10642 orc_program_append_2 (p, "shlw", 0, ORC_VAR_D2, ORC_VAR_T3, ORC_VAR_C1, ORC_VAR_D1);
10645 printf (" cycles (emulate) : %g\n",
10646 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10649 ret = orc_test_compare_output_backup (p);
10652 } else if (!quiet) {
10653 printf (" backup function : PASSED\n");
10657 printf (" cycles (backup) : %g\n",
10658 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10661 ret = orc_test_compare_output (p);
10662 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
10663 printf (" compiled function: COMPILE FAILED\n");
10666 } else if (!quiet) {
10667 printf (" compiled function: PASSED\n");
10671 printf (" cycles (compiled): %g\n",
10672 orc_test_performance_full (p, 0, NULL));
10675 orc_program_free (p);
10678 /* orc_haar_deint_lshift1_split_s16 */
10680 OrcProgram *p = NULL;
10683 if (!quiet) printf ("orc_haar_deint_lshift1_split_s16:\n");
10684 p = orc_program_new ();
10685 orc_program_set_name (p, "orc_haar_deint_lshift1_split_s16");
10686 orc_program_set_backup_function (p, _backup_orc_haar_deint_lshift1_split_s16);
10687 orc_program_add_destination (p, 2, "d1");
10688 orc_program_add_destination (p, 2, "d2");
10689 orc_program_add_source (p, 4, "s1");
10690 orc_program_add_constant (p, 4, 0x00000001, "c1");
10691 orc_program_add_constant (p, 4, 0x00000000, "c2");
10692 orc_program_add_temporary (p, 2, "t1");
10693 orc_program_add_temporary (p, 2, "t2");
10694 orc_program_add_temporary (p, 4, "t3");
10696 orc_program_append_2 (p, "copyl", 0, ORC_VAR_T3, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
10697 orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
10698 orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
10699 orc_program_append_2 (p, "shlw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
10700 orc_program_append_2 (p, "shlw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
10701 orc_program_append_2 (p, "subw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
10702 orc_program_append_2 (p, "copyw", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
10703 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C2, ORC_VAR_D1);
10704 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
10707 printf (" cycles (emulate) : %g\n",
10708 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10711 ret = orc_test_compare_output_backup (p);
10714 } else if (!quiet) {
10715 printf (" backup function : PASSED\n");
10719 printf (" cycles (backup) : %g\n",
10720 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10723 ret = orc_test_compare_output (p);
10724 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
10725 printf (" compiled function: COMPILE FAILED\n");
10728 } else if (!quiet) {
10729 printf (" compiled function: PASSED\n");
10733 printf (" cycles (compiled): %g\n",
10734 orc_test_performance_full (p, 0, NULL));
10737 orc_program_free (p);
10740 /* orc_haar_deint_split_s16 */
10742 OrcProgram *p = NULL;
10745 if (!quiet) printf ("orc_haar_deint_split_s16:\n");
10746 p = orc_program_new ();
10747 orc_program_set_name (p, "orc_haar_deint_split_s16");
10748 orc_program_set_backup_function (p, _backup_orc_haar_deint_split_s16);
10749 orc_program_add_destination (p, 2, "d1");
10750 orc_program_add_destination (p, 2, "d2");
10751 orc_program_add_source (p, 4, "s1");
10752 orc_program_add_constant (p, 4, 0x00000000, "c1");
10753 orc_program_add_temporary (p, 2, "t1");
10754 orc_program_add_temporary (p, 2, "t2");
10755 orc_program_add_temporary (p, 4, "t3");
10757 orc_program_append_2 (p, "copyl", 0, ORC_VAR_T3, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
10758 orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
10759 orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
10760 orc_program_append_2 (p, "subw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
10761 orc_program_append_2 (p, "copyw", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
10762 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
10763 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
10766 printf (" cycles (emulate) : %g\n",
10767 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10770 ret = orc_test_compare_output_backup (p);
10773 } else if (!quiet) {
10774 printf (" backup function : PASSED\n");
10778 printf (" cycles (backup) : %g\n",
10779 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10782 ret = orc_test_compare_output (p);
10783 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
10784 printf (" compiled function: COMPILE FAILED\n");
10787 } else if (!quiet) {
10788 printf (" compiled function: PASSED\n");
10792 printf (" cycles (compiled): %g\n",
10793 orc_test_performance_full (p, 0, NULL));
10796 orc_program_free (p);
10799 /* orc_haar_split_s16_lo */
10801 OrcProgram *p = NULL;
10804 if (!quiet) printf ("orc_haar_split_s16_lo:\n");
10805 p = orc_program_new ();
10806 orc_program_set_name (p, "orc_haar_split_s16_lo");
10807 orc_program_set_backup_function (p, _backup_orc_haar_split_s16_lo);
10808 orc_program_add_destination (p, 2, "d1");
10809 orc_program_add_source (p, 2, "s1");
10810 orc_program_add_source (p, 2, "s2");
10811 orc_program_add_constant (p, 4, 0x00000000, "c1");
10812 orc_program_add_temporary (p, 2, "t1");
10813 orc_program_add_temporary (p, 2, "t2");
10815 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
10816 orc_program_append_2 (p, "subw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_T1, ORC_VAR_D1);
10817 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
10818 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
10821 printf (" cycles (emulate) : %g\n",
10822 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10825 ret = orc_test_compare_output_backup (p);
10828 } else if (!quiet) {
10829 printf (" backup function : PASSED\n");
10833 printf (" cycles (backup) : %g\n",
10834 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10837 ret = orc_test_compare_output (p);
10838 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
10839 printf (" compiled function: COMPILE FAILED\n");
10842 } else if (!quiet) {
10843 printf (" compiled function: PASSED\n");
10847 printf (" cycles (compiled): %g\n",
10848 orc_test_performance_full (p, 0, NULL));
10851 orc_program_free (p);
10854 /* orc_haar_split_s16_hi */
10856 OrcProgram *p = NULL;
10859 if (!quiet) printf ("orc_haar_split_s16_hi:\n");
10860 p = orc_program_new ();
10861 orc_program_set_name (p, "orc_haar_split_s16_hi");
10862 orc_program_set_backup_function (p, _backup_orc_haar_split_s16_hi);
10863 orc_program_add_destination (p, 2, "d1");
10864 orc_program_add_source (p, 2, "s1");
10865 orc_program_add_source (p, 2, "s2");
10867 orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_S2, ORC_VAR_S1, ORC_VAR_D1);
10870 printf (" cycles (emulate) : %g\n",
10871 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10874 ret = orc_test_compare_output_backup (p);
10877 } else if (!quiet) {
10878 printf (" backup function : PASSED\n");
10882 printf (" cycles (backup) : %g\n",
10883 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10886 ret = orc_test_compare_output (p);
10887 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
10888 printf (" compiled function: COMPILE FAILED\n");
10891 } else if (!quiet) {
10892 printf (" compiled function: PASSED\n");
10896 printf (" cycles (compiled): %g\n",
10897 orc_test_performance_full (p, 0, NULL));
10900 orc_program_free (p);
10903 /* orc_haar_split_s16_op */
10905 OrcProgram *p = NULL;
10908 if (!quiet) printf ("orc_haar_split_s16_op:\n");
10909 p = orc_program_new ();
10910 orc_program_set_name (p, "orc_haar_split_s16_op");
10911 orc_program_set_backup_function (p, _backup_orc_haar_split_s16_op);
10912 orc_program_add_destination (p, 2, "d1");
10913 orc_program_add_destination (p, 2, "d2");
10914 orc_program_add_source (p, 2, "s1");
10915 orc_program_add_source (p, 2, "s2");
10916 orc_program_add_constant (p, 4, 0x00000000, "c1");
10917 orc_program_add_temporary (p, 2, "t1");
10918 orc_program_add_temporary (p, 2, "t2");
10920 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
10921 orc_program_append_2 (p, "subw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_T1, ORC_VAR_D1);
10922 orc_program_append_2 (p, "copyw", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
10923 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
10924 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
10927 printf (" cycles (emulate) : %g\n",
10928 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10931 ret = orc_test_compare_output_backup (p);
10934 } else if (!quiet) {
10935 printf (" backup function : PASSED\n");
10939 printf (" cycles (backup) : %g\n",
10940 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10943 ret = orc_test_compare_output (p);
10944 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
10945 printf (" compiled function: COMPILE FAILED\n");
10948 } else if (!quiet) {
10949 printf (" compiled function: PASSED\n");
10953 printf (" cycles (compiled): %g\n",
10954 orc_test_performance_full (p, 0, NULL));
10957 orc_program_free (p);
10960 /* orc_haar_split_s16 */
10962 OrcProgram *p = NULL;
10965 if (!quiet) printf ("orc_haar_split_s16:\n");
10966 p = orc_program_new ();
10967 orc_program_set_name (p, "orc_haar_split_s16");
10968 orc_program_set_backup_function (p, _backup_orc_haar_split_s16);
10969 orc_program_add_destination (p, 2, "d1");
10970 orc_program_add_destination (p, 2, "d2");
10971 orc_program_add_constant (p, 4, 0x00000000, "c1");
10972 orc_program_add_temporary (p, 2, "t1");
10973 orc_program_add_temporary (p, 2, "t2");
10975 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
10976 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T2, ORC_VAR_D2, ORC_VAR_D1, ORC_VAR_D1);
10977 orc_program_append_2 (p, "subw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
10978 orc_program_append_2 (p, "copyw", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
10979 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
10980 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
10983 printf (" cycles (emulate) : %g\n",
10984 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
10987 ret = orc_test_compare_output_backup (p);
10990 } else if (!quiet) {
10991 printf (" backup function : PASSED\n");
10995 printf (" cycles (backup) : %g\n",
10996 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
10999 ret = orc_test_compare_output (p);
11000 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11001 printf (" compiled function: COMPILE FAILED\n");
11004 } else if (!quiet) {
11005 printf (" compiled function: PASSED\n");
11009 printf (" cycles (compiled): %g\n",
11010 orc_test_performance_full (p, 0, NULL));
11013 orc_program_free (p);
11016 /* orc_haar_synth_s16_lo */
11018 OrcProgram *p = NULL;
11021 if (!quiet) printf ("orc_haar_synth_s16_lo:\n");
11022 p = orc_program_new ();
11023 orc_program_set_name (p, "orc_haar_synth_s16_lo");
11024 orc_program_set_backup_function (p, _backup_orc_haar_synth_s16_lo);
11025 orc_program_add_destination (p, 2, "d1");
11026 orc_program_add_source (p, 2, "s1");
11027 orc_program_add_source (p, 2, "s2");
11028 orc_program_add_constant (p, 4, 0x00000000, "c1");
11029 orc_program_add_temporary (p, 2, "t1");
11031 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_C1, ORC_VAR_D1);
11032 orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1);
11035 printf (" cycles (emulate) : %g\n",
11036 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
11039 ret = orc_test_compare_output_backup (p);
11042 } else if (!quiet) {
11043 printf (" backup function : PASSED\n");
11047 printf (" cycles (backup) : %g\n",
11048 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
11051 ret = orc_test_compare_output (p);
11052 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11053 printf (" compiled function: COMPILE FAILED\n");
11056 } else if (!quiet) {
11057 printf (" compiled function: PASSED\n");
11061 printf (" cycles (compiled): %g\n",
11062 orc_test_performance_full (p, 0, NULL));
11065 orc_program_free (p);
11068 /* orc_haar_synth_s16_hi */
11070 OrcProgram *p = NULL;
11073 if (!quiet) printf ("orc_haar_synth_s16_hi:\n");
11074 p = orc_program_new ();
11075 orc_program_set_name (p, "orc_haar_synth_s16_hi");
11076 orc_program_set_backup_function (p, _backup_orc_haar_synth_s16_hi);
11077 orc_program_add_destination (p, 2, "d1");
11078 orc_program_add_source (p, 2, "s1");
11079 orc_program_add_source (p, 2, "s2");
11080 orc_program_add_constant (p, 4, 0x00000000, "c1");
11081 orc_program_add_temporary (p, 2, "t1");
11082 orc_program_add_temporary (p, 2, "t2");
11083 orc_program_add_temporary (p, 2, "t3");
11085 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
11086 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
11087 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_T3, ORC_VAR_D1);
11088 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
11091 printf (" cycles (emulate) : %g\n",
11092 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
11095 ret = orc_test_compare_output_backup (p);
11098 } else if (!quiet) {
11099 printf (" backup function : PASSED\n");
11103 printf (" cycles (backup) : %g\n",
11104 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
11107 ret = orc_test_compare_output (p);
11108 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11109 printf (" compiled function: COMPILE FAILED\n");
11112 } else if (!quiet) {
11113 printf (" compiled function: PASSED\n");
11117 printf (" cycles (compiled): %g\n",
11118 orc_test_performance_full (p, 0, NULL));
11121 orc_program_free (p);
11124 /* orc_haar_synth_s16_op */
11126 OrcProgram *p = NULL;
11129 if (!quiet) printf ("orc_haar_synth_s16_op:\n");
11130 p = orc_program_new ();
11131 orc_program_set_name (p, "orc_haar_synth_s16_op");
11132 orc_program_set_backup_function (p, _backup_orc_haar_synth_s16_op);
11133 orc_program_add_destination (p, 2, "d1");
11134 orc_program_add_destination (p, 2, "d2");
11135 orc_program_add_source (p, 2, "s1");
11136 orc_program_add_source (p, 2, "s2");
11137 orc_program_add_constant (p, 4, 0x00000000, "c1");
11138 orc_program_add_temporary (p, 2, "t1");
11139 orc_program_add_temporary (p, 2, "t2");
11140 orc_program_add_temporary (p, 2, "t3");
11142 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
11143 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
11144 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_T3, ORC_VAR_D1);
11145 orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
11146 orc_program_append_2 (p, "addw", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
11149 printf (" cycles (emulate) : %g\n",
11150 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
11153 ret = orc_test_compare_output_backup (p);
11156 } else if (!quiet) {
11157 printf (" backup function : PASSED\n");
11161 printf (" cycles (backup) : %g\n",
11162 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
11165 ret = orc_test_compare_output (p);
11166 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11167 printf (" compiled function: COMPILE FAILED\n");
11170 } else if (!quiet) {
11171 printf (" compiled function: PASSED\n");
11175 printf (" cycles (compiled): %g\n",
11176 orc_test_performance_full (p, 0, NULL));
11179 orc_program_free (p);
11182 /* orc_haar_synth_s16 */
11184 OrcProgram *p = NULL;
11187 if (!quiet) printf ("orc_haar_synth_s16:\n");
11188 p = orc_program_new ();
11189 orc_program_set_name (p, "orc_haar_synth_s16");
11190 orc_program_set_backup_function (p, _backup_orc_haar_synth_s16);
11191 orc_program_add_destination (p, 2, "d1");
11192 orc_program_add_destination (p, 2, "d2");
11193 orc_program_add_constant (p, 4, 0x00000000, "c1");
11194 orc_program_add_temporary (p, 2, "t1");
11195 orc_program_add_temporary (p, 2, "t2");
11196 orc_program_add_temporary (p, 2, "t3");
11198 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
11199 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T2, ORC_VAR_D2, ORC_VAR_D1, ORC_VAR_D1);
11200 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
11201 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_D1);
11202 orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
11203 orc_program_append_2 (p, "addw", 0, ORC_VAR_D2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
11206 printf (" cycles (emulate) : %g\n",
11207 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
11210 ret = orc_test_compare_output_backup (p);
11213 } else if (!quiet) {
11214 printf (" backup function : PASSED\n");
11218 printf (" cycles (backup) : %g\n",
11219 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
11222 ret = orc_test_compare_output (p);
11223 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11224 printf (" compiled function: COMPILE FAILED\n");
11227 } else if (!quiet) {
11228 printf (" compiled function: PASSED\n");
11232 printf (" cycles (compiled): %g\n",
11233 orc_test_performance_full (p, 0, NULL));
11236 orc_program_free (p);
11239 /* orc_haar_synth_rrshift1_int_s16 */
11241 OrcProgram *p = NULL;
11244 if (!quiet) printf ("orc_haar_synth_rrshift1_int_s16:\n");
11245 p = orc_program_new ();
11246 orc_program_set_name (p, "orc_haar_synth_rrshift1_int_s16");
11247 orc_program_set_backup_function (p, _backup_orc_haar_synth_rrshift1_int_s16);
11248 orc_program_add_destination (p, 4, "d1");
11249 orc_program_add_source (p, 2, "s1");
11250 orc_program_add_source (p, 2, "s2");
11251 orc_program_add_constant (p, 4, 0x00000000, "c1");
11252 orc_program_add_temporary (p, 2, "t1");
11253 orc_program_add_temporary (p, 2, "t2");
11255 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
11256 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
11257 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1);
11258 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
11259 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
11260 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
11261 orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
11264 printf (" cycles (emulate) : %g\n",
11265 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
11268 ret = orc_test_compare_output_backup (p);
11271 } else if (!quiet) {
11272 printf (" backup function : PASSED\n");
11276 printf (" cycles (backup) : %g\n",
11277 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
11280 ret = orc_test_compare_output (p);
11281 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11282 printf (" compiled function: COMPILE FAILED\n");
11285 } else if (!quiet) {
11286 printf (" compiled function: PASSED\n");
11290 printf (" cycles (compiled): %g\n",
11291 orc_test_performance_full (p, 0, NULL));
11294 orc_program_free (p);
11297 /* orc_haar_synth_int_s16 */
11299 OrcProgram *p = NULL;
11302 if (!quiet) printf ("orc_haar_synth_int_s16:\n");
11303 p = orc_program_new ();
11304 orc_program_set_name (p, "orc_haar_synth_int_s16");
11305 orc_program_set_backup_function (p, _backup_orc_haar_synth_int_s16);
11306 orc_program_add_destination (p, 4, "d1");
11307 orc_program_add_source (p, 2, "s1");
11308 orc_program_add_source (p, 2, "s2");
11309 orc_program_add_constant (p, 4, 0x00000000, "c1");
11310 orc_program_add_temporary (p, 2, "t1");
11311 orc_program_add_temporary (p, 2, "t2");
11313 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
11314 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
11315 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_T1, ORC_VAR_D1);
11316 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
11317 orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
11320 printf (" cycles (emulate) : %g\n",
11321 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
11324 ret = orc_test_compare_output_backup (p);
11327 } else if (!quiet) {
11328 printf (" backup function : PASSED\n");
11332 printf (" cycles (backup) : %g\n",
11333 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
11336 ret = orc_test_compare_output (p);
11337 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11338 printf (" compiled function: COMPILE FAILED\n");
11341 } else if (!quiet) {
11342 printf (" compiled function: PASSED\n");
11346 printf (" cycles (compiled): %g\n",
11347 orc_test_performance_full (p, 0, NULL));
11350 orc_program_free (p);
11353 /* orc_haar_sub_s16 */
11355 OrcProgram *p = NULL;
11358 if (!quiet) printf ("orc_haar_sub_s16:\n");
11359 p = orc_program_new ();
11360 orc_program_set_name (p, "orc_haar_sub_s16");
11361 orc_program_set_backup_function (p, _backup_orc_haar_sub_s16);
11362 orc_program_add_destination (p, 2, "d1");
11363 orc_program_add_source (p, 2, "s1");
11365 orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1);
11368 printf (" cycles (emulate) : %g\n",
11369 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
11372 ret = orc_test_compare_output_backup (p);
11375 } else if (!quiet) {
11376 printf (" backup function : PASSED\n");
11380 printf (" cycles (backup) : %g\n",
11381 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
11384 ret = orc_test_compare_output (p);
11385 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11386 printf (" compiled function: COMPILE FAILED\n");
11389 } else if (!quiet) {
11390 printf (" compiled function: PASSED\n");
11394 printf (" cycles (compiled): %g\n",
11395 orc_test_performance_full (p, 0, NULL));
11398 orc_program_free (p);
11401 /* orc_haar_add_half_s16 */
11403 OrcProgram *p = NULL;
11406 if (!quiet) printf ("orc_haar_add_half_s16:\n");
11407 p = orc_program_new ();
11408 orc_program_set_name (p, "orc_haar_add_half_s16");
11409 orc_program_set_backup_function (p, _backup_orc_haar_add_half_s16);
11410 orc_program_add_destination (p, 2, "d1");
11411 orc_program_add_source (p, 2, "s1");
11412 orc_program_add_constant (p, 4, 0x00000000, "c1");
11413 orc_program_add_temporary (p, 2, "t1");
11415 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1);
11416 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
11419 printf (" cycles (emulate) : %g\n",
11420 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
11423 ret = orc_test_compare_output_backup (p);
11426 } else if (!quiet) {
11427 printf (" backup function : PASSED\n");
11431 printf (" cycles (backup) : %g\n",
11432 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
11435 ret = orc_test_compare_output (p);
11436 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11437 printf (" compiled function: COMPILE FAILED\n");
11440 } else if (!quiet) {
11441 printf (" compiled function: PASSED\n");
11445 printf (" cycles (compiled): %g\n",
11446 orc_test_performance_full (p, 0, NULL));
11449 orc_program_free (p);
11452 /* orc_haar_add_s16 */
11454 OrcProgram *p = NULL;
11457 if (!quiet) printf ("orc_haar_add_s16:\n");
11458 p = orc_program_new ();
11459 orc_program_set_name (p, "orc_haar_add_s16");
11460 orc_program_set_backup_function (p, _backup_orc_haar_add_s16);
11461 orc_program_add_destination (p, 2, "d1");
11462 orc_program_add_source (p, 2, "s1");
11464 orc_program_append_2 (p, "addw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1);
11467 printf (" cycles (emulate) : %g\n",
11468 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
11471 ret = orc_test_compare_output_backup (p);
11474 } else if (!quiet) {
11475 printf (" backup function : PASSED\n");
11479 printf (" cycles (backup) : %g\n",
11480 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
11483 ret = orc_test_compare_output (p);
11484 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11485 printf (" compiled function: COMPILE FAILED\n");
11488 } else if (!quiet) {
11489 printf (" compiled function: PASSED\n");
11493 printf (" cycles (compiled): %g\n",
11494 orc_test_performance_full (p, 0, NULL));
11497 orc_program_free (p);
11500 /* orc_haar_sub_half_s16 */
11502 OrcProgram *p = NULL;
11505 if (!quiet) printf ("orc_haar_sub_half_s16:\n");
11506 p = orc_program_new ();
11507 orc_program_set_name (p, "orc_haar_sub_half_s16");
11508 orc_program_set_backup_function (p, _backup_orc_haar_sub_half_s16);
11509 orc_program_add_destination (p, 2, "d1");
11510 orc_program_add_source (p, 2, "s1");
11511 orc_program_add_constant (p, 4, 0x00000000, "c1");
11512 orc_program_add_temporary (p, 2, "t1");
11514 orc_program_append_2 (p, "avgsw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1);
11515 orc_program_append_2 (p, "subw", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1);
11518 printf (" cycles (emulate) : %g\n",
11519 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
11522 ret = orc_test_compare_output_backup (p);
11525 } else if (!quiet) {
11526 printf (" backup function : PASSED\n");
11530 printf (" cycles (backup) : %g\n",
11531 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
11534 ret = orc_test_compare_output (p);
11535 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11536 printf (" compiled function: COMPILE FAILED\n");
11539 } else if (!quiet) {
11540 printf (" compiled function: PASSED\n");
11544 printf (" cycles (compiled): %g\n",
11545 orc_test_performance_full (p, 0, NULL));
11548 orc_program_free (p);
11553 OrcProgram *p = NULL;
11556 if (!quiet) printf ("orc_sum_u8:\n");
11557 p = orc_program_new ();
11558 orc_program_set_name (p, "orc_sum_u8");
11559 orc_program_set_backup_function (p, _backup_orc_sum_u8);
11560 orc_program_add_source (p, 1, "s1");
11561 orc_program_add_accumulator (p, 4, "a1");
11562 orc_program_add_temporary (p, 2, "t1");
11563 orc_program_add_temporary (p, 4, "t2");
11565 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
11566 orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
11567 orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
11570 printf (" cycles (emulate) : %g\n",
11571 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
11574 ret = orc_test_compare_output_backup (p);
11577 } else if (!quiet) {
11578 printf (" backup function : PASSED\n");
11582 printf (" cycles (backup) : %g\n",
11583 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
11586 ret = orc_test_compare_output (p);
11587 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11588 printf (" compiled function: COMPILE FAILED\n");
11591 } else if (!quiet) {
11592 printf (" compiled function: PASSED\n");
11596 printf (" cycles (compiled): %g\n",
11597 orc_test_performance_full (p, 0, NULL));
11600 orc_program_free (p);
11605 OrcProgram *p = NULL;
11608 if (!quiet) printf ("orc_sum_s16:\n");
11609 p = orc_program_new ();
11610 orc_program_set_name (p, "orc_sum_s16");
11611 orc_program_set_backup_function (p, _backup_orc_sum_s16);
11612 orc_program_add_source (p, 2, "s1");
11613 orc_program_add_accumulator (p, 4, "a1");
11614 orc_program_add_temporary (p, 4, "t1");
11616 orc_program_append_2 (p, "convswl", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
11617 orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
11620 printf (" cycles (emulate) : %g\n",
11621 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
11624 ret = orc_test_compare_output_backup (p);
11627 } else if (!quiet) {
11628 printf (" backup function : PASSED\n");
11632 printf (" cycles (backup) : %g\n",
11633 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
11636 ret = orc_test_compare_output (p);
11637 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11638 printf (" compiled function: COMPILE FAILED\n");
11641 } else if (!quiet) {
11642 printf (" compiled function: PASSED\n");
11646 printf (" cycles (compiled): %g\n",
11647 orc_test_performance_full (p, 0, NULL));
11650 orc_program_free (p);
11653 /* orc_sum_square_diff_u8 */
11655 OrcProgram *p = NULL;
11658 if (!quiet) printf ("orc_sum_square_diff_u8:\n");
11659 p = orc_program_new ();
11660 orc_program_set_name (p, "orc_sum_square_diff_u8");
11661 orc_program_set_backup_function (p, _backup_orc_sum_square_diff_u8);
11662 orc_program_add_source (p, 1, "s1");
11663 orc_program_add_source (p, 1, "s2");
11664 orc_program_add_accumulator (p, 4, "a1");
11665 orc_program_add_temporary (p, 2, "t1");
11666 orc_program_add_temporary (p, 2, "t2");
11667 orc_program_add_temporary (p, 4, "t3");
11669 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
11670 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
11671 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
11672 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1);
11673 orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
11674 orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
11677 printf (" cycles (emulate) : %g\n",
11678 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
11681 ret = orc_test_compare_output_backup (p);
11684 } else if (!quiet) {
11685 printf (" backup function : PASSED\n");
11689 printf (" cycles (backup) : %g\n",
11690 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
11693 ret = orc_test_compare_output (p);
11694 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11695 printf (" compiled function: COMPILE FAILED\n");
11698 } else if (!quiet) {
11699 printf (" compiled function: PASSED\n");
11703 printf (" cycles (compiled): %g\n",
11704 orc_test_performance_full (p, 0, NULL));
11707 orc_program_free (p);
11710 /* orc_dequantise_s16_2d_4xn */
11712 OrcProgram *p = NULL;
11715 if (!quiet) printf ("orc_dequantise_s16_2d_4xn:\n");
11716 p = orc_program_new ();
11717 orc_program_set_constant_n (p, 4);
11718 orc_program_set_2d (p);
11719 orc_program_set_name (p, "orc_dequantise_s16_2d_4xn");
11720 orc_program_set_backup_function (p, _backup_orc_dequantise_s16_2d_4xn);
11721 orc_program_add_destination (p, 2, "d1");
11722 orc_program_add_source (p, 2, "s1");
11723 orc_program_add_constant (p, 4, 0x00000002, "c1");
11724 orc_program_add_parameter (p, 2, "p1");
11725 orc_program_add_parameter (p, 2, "p2");
11726 orc_program_add_temporary (p, 2, "t1");
11727 orc_program_add_temporary (p, 2, "t2");
11729 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
11730 orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
11731 orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
11732 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
11733 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1);
11734 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
11735 orc_program_append_2 (p, "mullw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
11738 printf (" cycles (emulate) : %g\n",
11739 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
11742 ret = orc_test_compare_output_backup (p);
11745 } else if (!quiet) {
11746 printf (" backup function : PASSED\n");
11750 printf (" cycles (backup) : %g\n",
11751 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
11754 ret = orc_test_compare_output (p);
11755 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11756 printf (" compiled function: COMPILE FAILED\n");
11759 } else if (!quiet) {
11760 printf (" compiled function: PASSED\n");
11764 printf (" cycles (compiled): %g\n",
11765 orc_test_performance_full (p, 0, NULL));
11768 orc_program_free (p);
11771 /* orc_dequantise_s16_2d_8xn */
11773 OrcProgram *p = NULL;
11776 if (!quiet) printf ("orc_dequantise_s16_2d_8xn:\n");
11777 p = orc_program_new ();
11778 orc_program_set_constant_n (p, 8);
11779 orc_program_set_2d (p);
11780 orc_program_set_name (p, "orc_dequantise_s16_2d_8xn");
11781 orc_program_set_backup_function (p, _backup_orc_dequantise_s16_2d_8xn);
11782 orc_program_add_destination (p, 2, "d1");
11783 orc_program_add_source (p, 2, "s1");
11784 orc_program_add_constant (p, 4, 0x00000002, "c1");
11785 orc_program_add_parameter (p, 2, "p1");
11786 orc_program_add_parameter (p, 2, "p2");
11787 orc_program_add_temporary (p, 2, "t1");
11788 orc_program_add_temporary (p, 2, "t2");
11790 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
11791 orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
11792 orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
11793 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
11794 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1);
11795 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
11796 orc_program_append_2 (p, "mullw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
11799 printf (" cycles (emulate) : %g\n",
11800 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
11803 ret = orc_test_compare_output_backup (p);
11806 } else if (!quiet) {
11807 printf (" backup function : PASSED\n");
11811 printf (" cycles (backup) : %g\n",
11812 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
11815 ret = orc_test_compare_output (p);
11816 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11817 printf (" compiled function: COMPILE FAILED\n");
11820 } else if (!quiet) {
11821 printf (" compiled function: PASSED\n");
11825 printf (" cycles (compiled): %g\n",
11826 orc_test_performance_full (p, 0, NULL));
11829 orc_program_free (p);
11832 /* orc_dequantise_s16_ip_2d_8xn */
11834 OrcProgram *p = NULL;
11837 if (!quiet) printf ("orc_dequantise_s16_ip_2d_8xn:\n");
11838 p = orc_program_new ();
11839 orc_program_set_constant_n (p, 8);
11840 orc_program_set_2d (p);
11841 orc_program_set_name (p, "orc_dequantise_s16_ip_2d_8xn");
11842 orc_program_set_backup_function (p, _backup_orc_dequantise_s16_ip_2d_8xn);
11843 orc_program_add_destination (p, 2, "d1");
11844 orc_program_add_constant (p, 4, 0x00000002, "c1");
11845 orc_program_add_parameter (p, 2, "p1");
11846 orc_program_add_parameter (p, 2, "p2");
11847 orc_program_add_temporary (p, 2, "t1");
11848 orc_program_add_temporary (p, 2, "t2");
11850 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
11851 orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
11852 orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
11853 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
11854 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1);
11855 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
11856 orc_program_append_2 (p, "mullw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
11859 printf (" cycles (emulate) : %g\n",
11860 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
11863 ret = orc_test_compare_output_backup (p);
11866 } else if (!quiet) {
11867 printf (" backup function : PASSED\n");
11871 printf (" cycles (backup) : %g\n",
11872 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
11875 ret = orc_test_compare_output (p);
11876 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11877 printf (" compiled function: COMPILE FAILED\n");
11880 } else if (!quiet) {
11881 printf (" compiled function: PASSED\n");
11885 printf (" cycles (compiled): %g\n",
11886 orc_test_performance_full (p, 0, NULL));
11889 orc_program_free (p);
11892 /* orc_dequantise_s16_ip_2d */
11894 OrcProgram *p = NULL;
11897 if (!quiet) printf ("orc_dequantise_s16_ip_2d:\n");
11898 p = orc_program_new ();
11899 orc_program_set_2d (p);
11900 orc_program_set_name (p, "orc_dequantise_s16_ip_2d");
11901 orc_program_set_backup_function (p, _backup_orc_dequantise_s16_ip_2d);
11902 orc_program_add_destination (p, 2, "d1");
11903 orc_program_add_constant (p, 4, 0x00000002, "c1");
11904 orc_program_add_parameter (p, 2, "p1");
11905 orc_program_add_parameter (p, 2, "p2");
11906 orc_program_add_temporary (p, 2, "t1");
11907 orc_program_add_temporary (p, 2, "t2");
11909 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
11910 orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
11911 orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
11912 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
11913 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1);
11914 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
11915 orc_program_append_2 (p, "mullw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
11918 printf (" cycles (emulate) : %g\n",
11919 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
11922 ret = orc_test_compare_output_backup (p);
11925 } else if (!quiet) {
11926 printf (" backup function : PASSED\n");
11930 printf (" cycles (backup) : %g\n",
11931 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
11934 ret = orc_test_compare_output (p);
11935 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11936 printf (" compiled function: COMPILE FAILED\n");
11939 } else if (!quiet) {
11940 printf (" compiled function: PASSED\n");
11944 printf (" cycles (compiled): %g\n",
11945 orc_test_performance_full (p, 0, NULL));
11948 orc_program_free (p);
11951 /* orc_dequantise_s16_ip */
11953 OrcProgram *p = NULL;
11956 if (!quiet) printf ("orc_dequantise_s16_ip:\n");
11957 p = orc_program_new ();
11958 orc_program_set_name (p, "orc_dequantise_s16_ip");
11959 orc_program_set_backup_function (p, _backup_orc_dequantise_s16_ip);
11960 orc_program_add_destination (p, 2, "d1");
11961 orc_program_add_constant (p, 4, 0x00000002, "c1");
11962 orc_program_add_parameter (p, 2, "p1");
11963 orc_program_add_parameter (p, 2, "p2");
11964 orc_program_add_temporary (p, 2, "t1");
11965 orc_program_add_temporary (p, 2, "t2");
11967 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
11968 orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
11969 orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
11970 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
11971 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1);
11972 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
11973 orc_program_append_2 (p, "mullw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
11976 printf (" cycles (emulate) : %g\n",
11977 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
11980 ret = orc_test_compare_output_backup (p);
11983 } else if (!quiet) {
11984 printf (" backup function : PASSED\n");
11988 printf (" cycles (backup) : %g\n",
11989 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
11992 ret = orc_test_compare_output (p);
11993 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
11994 printf (" compiled function: COMPILE FAILED\n");
11997 } else if (!quiet) {
11998 printf (" compiled function: PASSED\n");
12002 printf (" cycles (compiled): %g\n",
12003 orc_test_performance_full (p, 0, NULL));
12006 orc_program_free (p);
12009 /* orc_dequantise_s16 */
12011 OrcProgram *p = NULL;
12014 if (!quiet) printf ("orc_dequantise_s16:\n");
12015 p = orc_program_new ();
12016 orc_program_set_name (p, "orc_dequantise_s16");
12017 orc_program_set_backup_function (p, _backup_orc_dequantise_s16);
12018 orc_program_add_destination (p, 2, "d1");
12019 orc_program_add_source (p, 2, "s1");
12020 orc_program_add_constant (p, 4, 0x00000002, "c1");
12021 orc_program_add_parameter (p, 2, "p1");
12022 orc_program_add_parameter (p, 2, "p2");
12023 orc_program_add_temporary (p, 2, "t1");
12024 orc_program_add_temporary (p, 2, "t2");
12026 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
12027 orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12028 orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12029 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
12030 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1);
12031 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
12032 orc_program_append_2 (p, "mullw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
12035 printf (" cycles (emulate) : %g\n",
12036 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
12039 ret = orc_test_compare_output_backup (p);
12042 } else if (!quiet) {
12043 printf (" backup function : PASSED\n");
12047 printf (" cycles (backup) : %g\n",
12048 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
12051 ret = orc_test_compare_output (p);
12052 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
12053 printf (" compiled function: COMPILE FAILED\n");
12056 } else if (!quiet) {
12057 printf (" compiled function: PASSED\n");
12061 printf (" cycles (compiled): %g\n",
12062 orc_test_performance_full (p, 0, NULL));
12065 orc_program_free (p);
12068 /* orc_dequantise_var_s16_ip */
12070 OrcProgram *p = NULL;
12073 if (!quiet) printf ("orc_dequantise_var_s16_ip:\n");
12074 p = orc_program_new ();
12075 orc_program_set_name (p, "orc_dequantise_var_s16_ip");
12076 orc_program_set_backup_function (p, _backup_orc_dequantise_var_s16_ip);
12077 orc_program_add_destination (p, 2, "d1");
12078 orc_program_add_source (p, 2, "s1");
12079 orc_program_add_source (p, 2, "s2");
12080 orc_program_add_constant (p, 4, 0x00000002, "c1");
12081 orc_program_add_temporary (p, 2, "t1");
12082 orc_program_add_temporary (p, 2, "t2");
12084 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
12085 orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12086 orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12087 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1);
12088 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1);
12089 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
12090 orc_program_append_2 (p, "mullw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
12093 printf (" cycles (emulate) : %g\n",
12094 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
12097 ret = orc_test_compare_output_backup (p);
12100 } else if (!quiet) {
12101 printf (" backup function : PASSED\n");
12105 printf (" cycles (backup) : %g\n",
12106 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
12109 ret = orc_test_compare_output (p);
12110 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
12111 printf (" compiled function: COMPILE FAILED\n");
12114 } else if (!quiet) {
12115 printf (" compiled function: PASSED\n");
12119 printf (" cycles (compiled): %g\n",
12120 orc_test_performance_full (p, 0, NULL));
12123 orc_program_free (p);
12126 /* orc_quantise1_s16 */
12128 OrcProgram *p = NULL;
12131 if (!quiet) printf ("orc_quantise1_s16:\n");
12132 p = orc_program_new ();
12133 orc_program_set_name (p, "orc_quantise1_s16");
12134 orc_program_set_backup_function (p, _backup_orc_quantise1_s16);
12135 orc_program_add_destination (p, 2, "d1");
12136 orc_program_add_source (p, 2, "s1");
12137 orc_program_add_constant (p, 4, 0x00000002, "c1");
12138 orc_program_add_parameter (p, 2, "p1");
12139 orc_program_add_parameter (p, 2, "p2");
12140 orc_program_add_parameter (p, 2, "p3");
12141 orc_program_add_temporary (p, 2, "t1");
12142 orc_program_add_temporary (p, 2, "t2");
12144 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
12145 orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12146 orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12147 orc_program_append_2 (p, "shlw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
12148 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1);
12149 orc_program_append_2 (p, "mulhuw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
12150 orc_program_append_2 (p, "shruw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1);
12151 orc_program_append_2 (p, "mullw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
12154 printf (" cycles (emulate) : %g\n",
12155 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
12158 ret = orc_test_compare_output_backup (p);
12161 } else if (!quiet) {
12162 printf (" backup function : PASSED\n");
12166 printf (" cycles (backup) : %g\n",
12167 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
12170 ret = orc_test_compare_output (p);
12171 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
12172 printf (" compiled function: COMPILE FAILED\n");
12175 } else if (!quiet) {
12176 printf (" compiled function: PASSED\n");
12180 printf (" cycles (compiled): %g\n",
12181 orc_test_performance_full (p, 0, NULL));
12184 orc_program_free (p);
12187 /* orc_quantise2_s16 */
12189 OrcProgram *p = NULL;
12192 if (!quiet) printf ("orc_quantise2_s16:\n");
12193 p = orc_program_new ();
12194 orc_program_set_name (p, "orc_quantise2_s16");
12195 orc_program_set_backup_function (p, _backup_orc_quantise2_s16);
12196 orc_program_add_destination (p, 2, "d1");
12197 orc_program_add_source (p, 2, "s1");
12198 orc_program_add_constant (p, 4, 0x00000002, "c1");
12199 orc_program_add_parameter (p, 2, "p1");
12200 orc_program_add_parameter (p, 2, "p2");
12201 orc_program_add_temporary (p, 2, "t1");
12202 orc_program_add_temporary (p, 2, "t2");
12204 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
12205 orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12206 orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12207 orc_program_append_2 (p, "shlw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
12208 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1);
12209 orc_program_append_2 (p, "shruw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
12210 orc_program_append_2 (p, "mullw", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
12213 printf (" cycles (emulate) : %g\n",
12214 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
12217 ret = orc_test_compare_output_backup (p);
12220 } else if (!quiet) {
12221 printf (" backup function : PASSED\n");
12225 printf (" cycles (backup) : %g\n",
12226 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
12229 ret = orc_test_compare_output (p);
12230 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
12231 printf (" compiled function: COMPILE FAILED\n");
12234 } else if (!quiet) {
12235 printf (" compiled function: PASSED\n");
12239 printf (" cycles (compiled): %g\n",
12240 orc_test_performance_full (p, 0, NULL));
12243 orc_program_free (p);
12246 /* orc_quantdequant1_s16 */
12248 OrcProgram *p = NULL;
12251 if (!quiet) printf ("orc_quantdequant1_s16:\n");
12252 p = orc_program_new ();
12253 orc_program_set_name (p, "orc_quantdequant1_s16");
12254 orc_program_set_backup_function (p, _backup_orc_quantdequant1_s16);
12255 orc_program_add_destination (p, 2, "d1");
12256 orc_program_add_destination (p, 2, "d2");
12257 orc_program_add_constant (p, 4, 0x00000002, "c1");
12258 orc_program_add_parameter (p, 2, "p1");
12259 orc_program_add_parameter (p, 2, "p2");
12260 orc_program_add_parameter (p, 2, "p3");
12261 orc_program_add_parameter (p, 2, "p4");
12262 orc_program_add_parameter (p, 2, "p5");
12263 orc_program_add_temporary (p, 2, "t1");
12264 orc_program_add_temporary (p, 2, "t2");
12266 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_D2, ORC_VAR_D1, ORC_VAR_D1);
12267 orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12268 orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12269 orc_program_append_2 (p, "shlw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
12270 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1);
12271 orc_program_append_2 (p, "mulhuw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
12272 orc_program_append_2 (p, "shruw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1);
12273 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
12274 orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
12275 orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
12276 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1);
12277 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P5, ORC_VAR_D1);
12278 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
12279 orc_program_append_2 (p, "mullw", 0, ORC_VAR_D2, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
12282 printf (" cycles (emulate) : %g\n",
12283 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
12286 ret = orc_test_compare_output_backup (p);
12289 } else if (!quiet) {
12290 printf (" backup function : PASSED\n");
12294 printf (" cycles (backup) : %g\n",
12295 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
12298 ret = orc_test_compare_output (p);
12299 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
12300 printf (" compiled function: COMPILE FAILED\n");
12303 } else if (!quiet) {
12304 printf (" compiled function: PASSED\n");
12308 printf (" cycles (compiled): %g\n",
12309 orc_test_performance_full (p, 0, NULL));
12312 orc_program_free (p);
12315 /* orc_quantdequant3_s16 */
12317 OrcProgram *p = NULL;
12320 if (!quiet) printf ("orc_quantdequant3_s16:\n");
12321 p = orc_program_new ();
12322 orc_program_set_name (p, "orc_quantdequant3_s16");
12323 orc_program_set_backup_function (p, _backup_orc_quantdequant3_s16);
12324 orc_program_add_destination (p, 2, "d1");
12325 orc_program_add_destination (p, 2, "d2");
12326 orc_program_add_constant (p, 4, 0x00000002, "c1");
12327 orc_program_add_parameter (p, 2, "p1");
12328 orc_program_add_parameter (p, 2, "p2");
12329 orc_program_add_parameter (p, 2, "p3");
12330 orc_program_add_parameter (p, 2, "p4");
12331 orc_program_add_parameter (p, 2, "p5");
12332 orc_program_add_parameter (p, 4, "p6");
12333 orc_program_add_temporary (p, 2, "t1");
12334 orc_program_add_temporary (p, 2, "t2");
12335 orc_program_add_temporary (p, 4, "t3");
12337 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_D2, ORC_VAR_D1, ORC_VAR_D1);
12338 orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12339 orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12340 orc_program_append_2 (p, "shlw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
12341 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1);
12342 orc_program_append_2 (p, "muluwl", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
12343 orc_program_append_2 (p, "addl", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P6, ORC_VAR_D1);
12344 orc_program_append_2 (p, "shrul", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_P3, ORC_VAR_D1);
12345 orc_program_append_2 (p, "convlw", 0, ORC_VAR_T1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
12346 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
12347 orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
12348 orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
12349 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1);
12350 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P5, ORC_VAR_D1);
12351 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
12352 orc_program_append_2 (p, "mullw", 0, ORC_VAR_D2, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
12355 printf (" cycles (emulate) : %g\n",
12356 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
12359 ret = orc_test_compare_output_backup (p);
12362 } else if (!quiet) {
12363 printf (" backup function : PASSED\n");
12367 printf (" cycles (backup) : %g\n",
12368 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
12371 ret = orc_test_compare_output (p);
12372 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
12373 printf (" compiled function: COMPILE FAILED\n");
12376 } else if (!quiet) {
12377 printf (" compiled function: PASSED\n");
12381 printf (" cycles (compiled): %g\n",
12382 orc_test_performance_full (p, 0, NULL));
12385 orc_program_free (p);
12388 /* orc_quantdequant2_s16 */
12390 OrcProgram *p = NULL;
12393 if (!quiet) printf ("orc_quantdequant2_s16:\n");
12394 p = orc_program_new ();
12395 orc_program_set_name (p, "orc_quantdequant2_s16");
12396 orc_program_set_backup_function (p, _backup_orc_quantdequant2_s16);
12397 orc_program_add_destination (p, 2, "d1");
12398 orc_program_add_destination (p, 2, "d2");
12399 orc_program_add_constant (p, 4, 0x00000002, "c1");
12400 orc_program_add_parameter (p, 2, "p1");
12401 orc_program_add_parameter (p, 2, "p2");
12402 orc_program_add_parameter (p, 2, "p3");
12403 orc_program_add_parameter (p, 2, "p4");
12404 orc_program_add_temporary (p, 2, "t1");
12405 orc_program_add_temporary (p, 2, "t2");
12407 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_D2, ORC_VAR_D1, ORC_VAR_D1);
12408 orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12409 orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12410 orc_program_append_2 (p, "shlw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
12411 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1);
12412 orc_program_append_2 (p, "shruw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
12413 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
12414 orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
12415 orc_program_append_2 (p, "signw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
12416 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1);
12417 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1);
12418 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
12419 orc_program_append_2 (p, "mullw", 0, ORC_VAR_D2, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
12422 printf (" cycles (emulate) : %g\n",
12423 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
12426 ret = orc_test_compare_output_backup (p);
12429 } else if (!quiet) {
12430 printf (" backup function : PASSED\n");
12434 printf (" cycles (backup) : %g\n",
12435 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
12438 ret = orc_test_compare_output (p);
12439 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
12440 printf (" compiled function: COMPILE FAILED\n");
12443 } else if (!quiet) {
12444 printf (" compiled function: PASSED\n");
12448 printf (" cycles (compiled): %g\n",
12449 orc_test_performance_full (p, 0, NULL));
12452 orc_program_free (p);
12455 /* orc_downsample_vert_u8 */
12457 OrcProgram *p = NULL;
12460 if (!quiet) printf ("orc_downsample_vert_u8:\n");
12461 p = orc_program_new ();
12462 orc_program_set_name (p, "orc_downsample_vert_u8");
12463 orc_program_set_backup_function (p, _backup_orc_downsample_vert_u8);
12464 orc_program_add_destination (p, 1, "d1");
12465 orc_program_add_source (p, 1, "s1");
12466 orc_program_add_source (p, 1, "s2");
12467 orc_program_add_source (p, 1, "s3");
12468 orc_program_add_source (p, 1, "s4");
12469 orc_program_add_constant (p, 4, 0x00000006, "c1");
12470 orc_program_add_constant (p, 4, 0x0000001a, "c2");
12471 orc_program_add_constant (p, 4, 0x00000020, "c3");
12472 orc_program_add_temporary (p, 2, "t1");
12473 orc_program_add_temporary (p, 2, "t2");
12474 orc_program_add_temporary (p, 2, "t3");
12476 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
12477 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S4, ORC_VAR_D1, ORC_VAR_D1);
12478 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
12479 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
12480 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
12481 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T3, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1);
12482 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T3, ORC_VAR_D1);
12483 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C2, ORC_VAR_D1);
12484 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
12485 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C3, ORC_VAR_D1);
12486 orc_program_append_2 (p, "shruw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
12487 orc_program_append_2 (p, "convwb", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
12490 printf (" cycles (emulate) : %g\n",
12491 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
12494 ret = orc_test_compare_output_backup (p);
12497 } else if (!quiet) {
12498 printf (" backup function : PASSED\n");
12502 printf (" cycles (backup) : %g\n",
12503 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
12506 ret = orc_test_compare_output (p);
12507 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
12508 printf (" compiled function: COMPILE FAILED\n");
12511 } else if (!quiet) {
12512 printf (" compiled function: PASSED\n");
12516 printf (" cycles (compiled): %g\n",
12517 orc_test_performance_full (p, 0, NULL));
12520 orc_program_free (p);
12523 /* orc_downsample_horiz_u8 */
12525 OrcProgram *p = NULL;
12528 if (!quiet) printf ("orc_downsample_horiz_u8:\n");
12529 p = orc_program_new ();
12530 orc_program_set_name (p, "orc_downsample_horiz_u8");
12531 orc_program_set_backup_function (p, _backup_orc_downsample_horiz_u8);
12532 orc_program_add_destination (p, 1, "d1");
12533 orc_program_add_source (p, 2, "s1");
12534 orc_program_add_source (p, 2, "s2");
12535 orc_program_add_constant (p, 4, 0x00000006, "c1");
12536 orc_program_add_constant (p, 4, 0x0000001a, "c2");
12537 orc_program_add_constant (p, 4, 0x00000020, "c3");
12538 orc_program_add_temporary (p, 2, "t1");
12539 orc_program_add_temporary (p, 2, "t2");
12540 orc_program_add_temporary (p, 1, "t3");
12541 orc_program_add_temporary (p, 2, "t4");
12542 orc_program_add_temporary (p, 2, "t5");
12543 orc_program_add_temporary (p, 2, "t6");
12545 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
12546 orc_program_append_2 (p, "copyw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
12547 orc_program_append_2 (p, "select0wb", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12548 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
12549 orc_program_append_2 (p, "select1wb", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
12550 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T5, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
12551 orc_program_append_2 (p, "addw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
12552 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C1, ORC_VAR_D1);
12553 orc_program_append_2 (p, "select1wb", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12554 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T5, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
12555 orc_program_append_2 (p, "select0wb", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
12556 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T6, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
12557 orc_program_append_2 (p, "addw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_T6, ORC_VAR_D1);
12558 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C2, ORC_VAR_D1);
12559 orc_program_append_2 (p, "addw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
12560 orc_program_append_2 (p, "addw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C3, ORC_VAR_D1);
12561 orc_program_append_2 (p, "shruw", 0, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_C1, ORC_VAR_D1);
12562 orc_program_append_2 (p, "convwb", 0, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
12565 printf (" cycles (emulate) : %g\n",
12566 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
12569 ret = orc_test_compare_output_backup (p);
12572 } else if (!quiet) {
12573 printf (" backup function : PASSED\n");
12577 printf (" cycles (backup) : %g\n",
12578 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
12581 ret = orc_test_compare_output (p);
12582 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
12583 printf (" compiled function: COMPILE FAILED\n");
12586 } else if (!quiet) {
12587 printf (" compiled function: PASSED\n");
12591 printf (" cycles (compiled): %g\n",
12592 orc_test_performance_full (p, 0, NULL));
12595 orc_program_free (p);
12598 /* orc_stats_moment_s16 */
12600 OrcProgram *p = NULL;
12603 if (!quiet) printf ("orc_stats_moment_s16:\n");
12604 p = orc_program_new ();
12605 orc_program_set_name (p, "orc_stats_moment_s16");
12606 orc_program_set_backup_function (p, _backup_orc_stats_moment_s16);
12607 orc_program_add_source (p, 2, "s1");
12608 orc_program_add_accumulator (p, 4, "a1");
12609 orc_program_add_constant (p, 4, 0x00000002, "c1");
12610 orc_program_add_constant (p, 4, 0x00000000, "c2");
12611 orc_program_add_temporary (p, 2, "t1");
12612 orc_program_add_temporary (p, 4, "t2");
12614 orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
12615 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
12616 orc_program_append_2 (p, "maxsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_D1);
12617 orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12618 orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
12621 printf (" cycles (emulate) : %g\n",
12622 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
12625 ret = orc_test_compare_output_backup (p);
12628 } else if (!quiet) {
12629 printf (" backup function : PASSED\n");
12633 printf (" cycles (backup) : %g\n",
12634 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
12637 ret = orc_test_compare_output (p);
12638 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
12639 printf (" compiled function: COMPILE FAILED\n");
12642 } else if (!quiet) {
12643 printf (" compiled function: PASSED\n");
12647 printf (" cycles (compiled): %g\n",
12648 orc_test_performance_full (p, 0, NULL));
12651 orc_program_free (p);
12654 /* orc_stats_above_s16 */
12656 OrcProgram *p = NULL;
12659 if (!quiet) printf ("orc_stats_above_s16:\n");
12660 p = orc_program_new ();
12661 orc_program_set_name (p, "orc_stats_above_s16");
12662 orc_program_set_backup_function (p, _backup_orc_stats_above_s16);
12663 orc_program_add_source (p, 2, "s1");
12664 orc_program_add_accumulator (p, 4, "a1");
12665 orc_program_add_constant (p, 4, 0x00000001, "c1");
12666 orc_program_add_constant (p, 4, 0x00000000, "c2");
12667 orc_program_add_temporary (p, 2, "t1");
12668 orc_program_add_temporary (p, 4, "t2");
12670 orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
12671 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
12672 orc_program_append_2 (p, "maxsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_D1);
12673 orc_program_append_2 (p, "minsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
12674 orc_program_append_2 (p, "convuwl", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12675 orc_program_append_2 (p, "accl", 0, ORC_VAR_A1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
12678 printf (" cycles (emulate) : %g\n",
12679 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
12682 ret = orc_test_compare_output_backup (p);
12685 } else if (!quiet) {
12686 printf (" backup function : PASSED\n");
12690 printf (" cycles (backup) : %g\n",
12691 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
12694 ret = orc_test_compare_output (p);
12695 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
12696 printf (" compiled function: COMPILE FAILED\n");
12699 } else if (!quiet) {
12700 printf (" compiled function: PASSED\n");
12704 printf (" cycles (compiled): %g\n",
12705 orc_test_performance_full (p, 0, NULL));
12708 orc_program_free (p);
12713 OrcProgram *p = NULL;
12716 if (!quiet) printf ("orc_accw:\n");
12717 p = orc_program_new ();
12718 orc_program_set_name (p, "orc_accw");
12719 orc_program_set_backup_function (p, _backup_orc_accw);
12720 orc_program_add_source (p, 2, "s1");
12721 orc_program_add_accumulator (p, 2, "a1");
12722 orc_program_add_temporary (p, 2, "t1");
12724 orc_program_append_2 (p, "absw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
12725 orc_program_append_2 (p, "accw", 0, ORC_VAR_A1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
12728 printf (" cycles (emulate) : %g\n",
12729 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
12732 ret = orc_test_compare_output_backup (p);
12735 } else if (!quiet) {
12736 printf (" backup function : PASSED\n");
12740 printf (" cycles (backup) : %g\n",
12741 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
12744 ret = orc_test_compare_output (p);
12745 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
12746 printf (" compiled function: COMPILE FAILED\n");
12749 } else if (!quiet) {
12750 printf (" compiled function: PASSED\n");
12754 printf (" cycles (compiled): %g\n",
12755 orc_test_performance_full (p, 0, NULL));
12758 orc_program_free (p);
12761 /* orc_avg2_8xn_u8 */
12763 OrcProgram *p = NULL;
12766 if (!quiet) printf ("orc_avg2_8xn_u8:\n");
12767 p = orc_program_new ();
12768 orc_program_set_constant_n (p, 8);
12769 orc_program_set_2d (p);
12770 orc_program_set_name (p, "orc_avg2_8xn_u8");
12771 orc_program_set_backup_function (p, _backup_orc_avg2_8xn_u8);
12772 orc_program_add_destination (p, 1, "d1");
12773 orc_program_add_source (p, 1, "s1");
12774 orc_program_add_source (p, 1, "s2");
12776 orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
12779 printf (" cycles (emulate) : %g\n",
12780 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
12783 ret = orc_test_compare_output_backup (p);
12786 } else if (!quiet) {
12787 printf (" backup function : PASSED\n");
12791 printf (" cycles (backup) : %g\n",
12792 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
12795 ret = orc_test_compare_output (p);
12796 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
12797 printf (" compiled function: COMPILE FAILED\n");
12800 } else if (!quiet) {
12801 printf (" compiled function: PASSED\n");
12805 printf (" cycles (compiled): %g\n",
12806 orc_test_performance_full (p, 0, NULL));
12809 orc_program_free (p);
12812 /* orc_avg2_12xn_u8 */
12814 OrcProgram *p = NULL;
12817 if (!quiet) printf ("orc_avg2_12xn_u8:\n");
12818 p = orc_program_new ();
12819 orc_program_set_constant_n (p, 12);
12820 orc_program_set_2d (p);
12821 orc_program_set_name (p, "orc_avg2_12xn_u8");
12822 orc_program_set_backup_function (p, _backup_orc_avg2_12xn_u8);
12823 orc_program_add_destination (p, 1, "d1");
12824 orc_program_add_source (p, 1, "s1");
12825 orc_program_add_source (p, 1, "s2");
12827 orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
12830 printf (" cycles (emulate) : %g\n",
12831 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
12834 ret = orc_test_compare_output_backup (p);
12837 } else if (!quiet) {
12838 printf (" backup function : PASSED\n");
12842 printf (" cycles (backup) : %g\n",
12843 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
12846 ret = orc_test_compare_output (p);
12847 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
12848 printf (" compiled function: COMPILE FAILED\n");
12851 } else if (!quiet) {
12852 printf (" compiled function: PASSED\n");
12856 printf (" cycles (compiled): %g\n",
12857 orc_test_performance_full (p, 0, NULL));
12860 orc_program_free (p);
12863 /* orc_avg2_16xn_u8 */
12865 OrcProgram *p = NULL;
12868 if (!quiet) printf ("orc_avg2_16xn_u8:\n");
12869 p = orc_program_new ();
12870 orc_program_set_constant_n (p, 16);
12871 orc_program_set_2d (p);
12872 orc_program_set_name (p, "orc_avg2_16xn_u8");
12873 orc_program_set_backup_function (p, _backup_orc_avg2_16xn_u8);
12874 orc_program_add_destination (p, 1, "d1");
12875 orc_program_add_source (p, 1, "s1");
12876 orc_program_add_source (p, 1, "s2");
12878 orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
12881 printf (" cycles (emulate) : %g\n",
12882 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
12885 ret = orc_test_compare_output_backup (p);
12888 } else if (!quiet) {
12889 printf (" backup function : PASSED\n");
12893 printf (" cycles (backup) : %g\n",
12894 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
12897 ret = orc_test_compare_output (p);
12898 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
12899 printf (" compiled function: COMPILE FAILED\n");
12902 } else if (!quiet) {
12903 printf (" compiled function: PASSED\n");
12907 printf (" cycles (compiled): %g\n",
12908 orc_test_performance_full (p, 0, NULL));
12911 orc_program_free (p);
12914 /* orc_avg2_32xn_u8 */
12916 OrcProgram *p = NULL;
12919 if (!quiet) printf ("orc_avg2_32xn_u8:\n");
12920 p = orc_program_new ();
12921 orc_program_set_constant_n (p, 32);
12922 orc_program_set_2d (p);
12923 orc_program_set_name (p, "orc_avg2_32xn_u8");
12924 orc_program_set_backup_function (p, _backup_orc_avg2_32xn_u8);
12925 orc_program_add_destination (p, 1, "d1");
12926 orc_program_add_source (p, 1, "s1");
12927 orc_program_add_source (p, 1, "s2");
12929 orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
12932 printf (" cycles (emulate) : %g\n",
12933 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
12936 ret = orc_test_compare_output_backup (p);
12939 } else if (!quiet) {
12940 printf (" backup function : PASSED\n");
12944 printf (" cycles (backup) : %g\n",
12945 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
12948 ret = orc_test_compare_output (p);
12949 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
12950 printf (" compiled function: COMPILE FAILED\n");
12953 } else if (!quiet) {
12954 printf (" compiled function: PASSED\n");
12958 printf (" cycles (compiled): %g\n",
12959 orc_test_performance_full (p, 0, NULL));
12962 orc_program_free (p);
12965 /* orc_avg2_nxm_u8 */
12967 OrcProgram *p = NULL;
12970 if (!quiet) printf ("orc_avg2_nxm_u8:\n");
12971 p = orc_program_new ();
12972 orc_program_set_2d (p);
12973 orc_program_set_name (p, "orc_avg2_nxm_u8");
12974 orc_program_set_backup_function (p, _backup_orc_avg2_nxm_u8);
12975 orc_program_add_destination (p, 1, "d1");
12976 orc_program_add_source (p, 1, "s1");
12977 orc_program_add_source (p, 1, "s2");
12979 orc_program_append_2 (p, "avgub", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
12982 printf (" cycles (emulate) : %g\n",
12983 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
12986 ret = orc_test_compare_output_backup (p);
12989 } else if (!quiet) {
12990 printf (" backup function : PASSED\n");
12994 printf (" cycles (backup) : %g\n",
12995 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
12998 ret = orc_test_compare_output (p);
12999 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
13000 printf (" compiled function: COMPILE FAILED\n");
13003 } else if (!quiet) {
13004 printf (" compiled function: PASSED\n");
13008 printf (" cycles (compiled): %g\n",
13009 orc_test_performance_full (p, 0, NULL));
13012 orc_program_free (p);
13015 /* orc_combine4_8xn_u8 */
13017 OrcProgram *p = NULL;
13020 if (!quiet) printf ("orc_combine4_8xn_u8:\n");
13021 p = orc_program_new ();
13022 orc_program_set_constant_n (p, 8);
13023 orc_program_set_2d (p);
13024 orc_program_set_name (p, "orc_combine4_8xn_u8");
13025 orc_program_set_backup_function (p, _backup_orc_combine4_8xn_u8);
13026 orc_program_add_destination (p, 1, "d1");
13027 orc_program_add_source (p, 1, "s1");
13028 orc_program_add_source (p, 1, "s2");
13029 orc_program_add_source (p, 1, "s3");
13030 orc_program_add_source (p, 1, "s4");
13031 orc_program_add_constant (p, 4, 0x00000008, "c1");
13032 orc_program_add_parameter (p, 2, "p1");
13033 orc_program_add_parameter (p, 2, "p2");
13034 orc_program_add_parameter (p, 2, "p3");
13035 orc_program_add_parameter (p, 2, "p4");
13036 orc_program_add_temporary (p, 2, "t1");
13037 orc_program_add_temporary (p, 2, "t2");
13039 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
13040 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
13041 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
13042 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1);
13043 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
13044 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1);
13045 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1);
13046 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
13047 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S4, ORC_VAR_D1, ORC_VAR_D1);
13048 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1);
13049 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
13050 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
13051 orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
13054 printf (" cycles (emulate) : %g\n",
13055 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
13058 ret = orc_test_compare_output_backup (p);
13061 } else if (!quiet) {
13062 printf (" backup function : PASSED\n");
13066 printf (" cycles (backup) : %g\n",
13067 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
13070 ret = orc_test_compare_output (p);
13071 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
13072 printf (" compiled function: COMPILE FAILED\n");
13075 } else if (!quiet) {
13076 printf (" compiled function: PASSED\n");
13080 printf (" cycles (compiled): %g\n",
13081 orc_test_performance_full (p, 0, NULL));
13084 orc_program_free (p);
13087 /* orc_combine4_12xn_u8 */
13089 OrcProgram *p = NULL;
13092 if (!quiet) printf ("orc_combine4_12xn_u8:\n");
13093 p = orc_program_new ();
13094 orc_program_set_constant_n (p, 12);
13095 orc_program_set_2d (p);
13096 orc_program_set_name (p, "orc_combine4_12xn_u8");
13097 orc_program_set_backup_function (p, _backup_orc_combine4_12xn_u8);
13098 orc_program_add_destination (p, 1, "d1");
13099 orc_program_add_source (p, 1, "s1");
13100 orc_program_add_source (p, 1, "s2");
13101 orc_program_add_source (p, 1, "s3");
13102 orc_program_add_source (p, 1, "s4");
13103 orc_program_add_constant (p, 4, 0x00000008, "c1");
13104 orc_program_add_parameter (p, 2, "p1");
13105 orc_program_add_parameter (p, 2, "p2");
13106 orc_program_add_parameter (p, 2, "p3");
13107 orc_program_add_parameter (p, 2, "p4");
13108 orc_program_add_temporary (p, 2, "t1");
13109 orc_program_add_temporary (p, 2, "t2");
13111 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
13112 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
13113 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
13114 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1);
13115 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
13116 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1);
13117 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1);
13118 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
13119 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S4, ORC_VAR_D1, ORC_VAR_D1);
13120 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1);
13121 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
13122 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
13123 orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
13126 printf (" cycles (emulate) : %g\n",
13127 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
13130 ret = orc_test_compare_output_backup (p);
13133 } else if (!quiet) {
13134 printf (" backup function : PASSED\n");
13138 printf (" cycles (backup) : %g\n",
13139 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
13142 ret = orc_test_compare_output (p);
13143 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
13144 printf (" compiled function: COMPILE FAILED\n");
13147 } else if (!quiet) {
13148 printf (" compiled function: PASSED\n");
13152 printf (" cycles (compiled): %g\n",
13153 orc_test_performance_full (p, 0, NULL));
13156 orc_program_free (p);
13159 /* orc_combine4_16xn_u8 */
13161 OrcProgram *p = NULL;
13164 if (!quiet) printf ("orc_combine4_16xn_u8:\n");
13165 p = orc_program_new ();
13166 orc_program_set_constant_n (p, 16);
13167 orc_program_set_2d (p);
13168 orc_program_set_name (p, "orc_combine4_16xn_u8");
13169 orc_program_set_backup_function (p, _backup_orc_combine4_16xn_u8);
13170 orc_program_add_destination (p, 1, "d1");
13171 orc_program_add_source (p, 1, "s1");
13172 orc_program_add_source (p, 1, "s2");
13173 orc_program_add_source (p, 1, "s3");
13174 orc_program_add_source (p, 1, "s4");
13175 orc_program_add_constant (p, 4, 0x00000008, "c1");
13176 orc_program_add_parameter (p, 2, "p1");
13177 orc_program_add_parameter (p, 2, "p2");
13178 orc_program_add_parameter (p, 2, "p3");
13179 orc_program_add_parameter (p, 2, "p4");
13180 orc_program_add_temporary (p, 2, "t1");
13181 orc_program_add_temporary (p, 2, "t2");
13183 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
13184 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
13185 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
13186 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1);
13187 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
13188 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1);
13189 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1);
13190 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
13191 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S4, ORC_VAR_D1, ORC_VAR_D1);
13192 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1);
13193 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
13194 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
13195 orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
13198 printf (" cycles (emulate) : %g\n",
13199 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
13202 ret = orc_test_compare_output_backup (p);
13205 } else if (!quiet) {
13206 printf (" backup function : PASSED\n");
13210 printf (" cycles (backup) : %g\n",
13211 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
13214 ret = orc_test_compare_output (p);
13215 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
13216 printf (" compiled function: COMPILE FAILED\n");
13219 } else if (!quiet) {
13220 printf (" compiled function: PASSED\n");
13224 printf (" cycles (compiled): %g\n",
13225 orc_test_performance_full (p, 0, NULL));
13228 orc_program_free (p);
13231 /* orc_combine4_24xn_u8 */
13233 OrcProgram *p = NULL;
13236 if (!quiet) printf ("orc_combine4_24xn_u8:\n");
13237 p = orc_program_new ();
13238 orc_program_set_constant_n (p, 24);
13239 orc_program_set_2d (p);
13240 orc_program_set_name (p, "orc_combine4_24xn_u8");
13241 orc_program_set_backup_function (p, _backup_orc_combine4_24xn_u8);
13242 orc_program_add_destination (p, 1, "d1");
13243 orc_program_add_source (p, 1, "s1");
13244 orc_program_add_source (p, 1, "s2");
13245 orc_program_add_source (p, 1, "s3");
13246 orc_program_add_source (p, 1, "s4");
13247 orc_program_add_constant (p, 4, 0x00000008, "c1");
13248 orc_program_add_parameter (p, 2, "p1");
13249 orc_program_add_parameter (p, 2, "p2");
13250 orc_program_add_parameter (p, 2, "p3");
13251 orc_program_add_parameter (p, 2, "p4");
13252 orc_program_add_temporary (p, 2, "t1");
13253 orc_program_add_temporary (p, 2, "t2");
13255 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
13256 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
13257 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
13258 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1);
13259 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
13260 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1);
13261 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1);
13262 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
13263 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S4, ORC_VAR_D1, ORC_VAR_D1);
13264 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1);
13265 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
13266 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
13267 orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
13270 printf (" cycles (emulate) : %g\n",
13271 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
13274 ret = orc_test_compare_output_backup (p);
13277 } else if (!quiet) {
13278 printf (" backup function : PASSED\n");
13282 printf (" cycles (backup) : %g\n",
13283 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
13286 ret = orc_test_compare_output (p);
13287 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
13288 printf (" compiled function: COMPILE FAILED\n");
13291 } else if (!quiet) {
13292 printf (" compiled function: PASSED\n");
13296 printf (" cycles (compiled): %g\n",
13297 orc_test_performance_full (p, 0, NULL));
13300 orc_program_free (p);
13303 /* orc_combine4_32xn_u8 */
13305 OrcProgram *p = NULL;
13308 if (!quiet) printf ("orc_combine4_32xn_u8:\n");
13309 p = orc_program_new ();
13310 orc_program_set_constant_n (p, 32);
13311 orc_program_set_2d (p);
13312 orc_program_set_name (p, "orc_combine4_32xn_u8");
13313 orc_program_set_backup_function (p, _backup_orc_combine4_32xn_u8);
13314 orc_program_add_destination (p, 1, "d1");
13315 orc_program_add_source (p, 1, "s1");
13316 orc_program_add_source (p, 1, "s2");
13317 orc_program_add_source (p, 1, "s3");
13318 orc_program_add_source (p, 1, "s4");
13319 orc_program_add_constant (p, 4, 0x00000008, "c1");
13320 orc_program_add_parameter (p, 2, "p1");
13321 orc_program_add_parameter (p, 2, "p2");
13322 orc_program_add_parameter (p, 2, "p3");
13323 orc_program_add_parameter (p, 2, "p4");
13324 orc_program_add_temporary (p, 2, "t1");
13325 orc_program_add_temporary (p, 2, "t2");
13327 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
13328 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
13329 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
13330 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1);
13331 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
13332 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1);
13333 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1);
13334 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
13335 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S4, ORC_VAR_D1, ORC_VAR_D1);
13336 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1);
13337 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
13338 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
13339 orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
13342 printf (" cycles (emulate) : %g\n",
13343 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
13346 ret = orc_test_compare_output_backup (p);
13349 } else if (!quiet) {
13350 printf (" backup function : PASSED\n");
13354 printf (" cycles (backup) : %g\n",
13355 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
13358 ret = orc_test_compare_output (p);
13359 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
13360 printf (" compiled function: COMPILE FAILED\n");
13363 } else if (!quiet) {
13364 printf (" compiled function: PASSED\n");
13368 printf (" cycles (compiled): %g\n",
13369 orc_test_performance_full (p, 0, NULL));
13372 orc_program_free (p);
13375 /* orc_combine4_nxm_u8 */
13377 OrcProgram *p = NULL;
13380 if (!quiet) printf ("orc_combine4_nxm_u8:\n");
13381 p = orc_program_new ();
13382 orc_program_set_2d (p);
13383 orc_program_set_name (p, "orc_combine4_nxm_u8");
13384 orc_program_set_backup_function (p, _backup_orc_combine4_nxm_u8);
13385 orc_program_add_destination (p, 1, "d1");
13386 orc_program_add_source (p, 1, "s1");
13387 orc_program_add_source (p, 1, "s2");
13388 orc_program_add_source (p, 1, "s3");
13389 orc_program_add_source (p, 1, "s4");
13390 orc_program_add_constant (p, 4, 0x00000008, "c1");
13391 orc_program_add_constant (p, 4, 0x00000004, "c2");
13392 orc_program_add_parameter (p, 2, "p1");
13393 orc_program_add_parameter (p, 2, "p2");
13394 orc_program_add_parameter (p, 2, "p3");
13395 orc_program_add_parameter (p, 2, "p4");
13396 orc_program_add_temporary (p, 2, "t1");
13397 orc_program_add_temporary (p, 2, "t2");
13399 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
13400 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
13401 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
13402 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P2, ORC_VAR_D1);
13403 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
13404 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1);
13405 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1);
13406 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
13407 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S4, ORC_VAR_D1, ORC_VAR_D1);
13408 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1);
13409 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
13410 orc_program_append_2 (p, "addw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C1, ORC_VAR_D1);
13411 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C2, ORC_VAR_D1);
13412 orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
13415 printf (" cycles (emulate) : %g\n",
13416 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
13419 ret = orc_test_compare_output_backup (p);
13422 } else if (!quiet) {
13423 printf (" backup function : PASSED\n");
13427 printf (" cycles (backup) : %g\n",
13428 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
13431 ret = orc_test_compare_output (p);
13432 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
13433 printf (" compiled function: COMPILE FAILED\n");
13436 } else if (!quiet) {
13437 printf (" compiled function: PASSED\n");
13441 printf (" cycles (compiled): %g\n",
13442 orc_test_performance_full (p, 0, NULL));
13445 orc_program_free (p);
13448 /* orc_combine2_8xn_u8 */
13450 OrcProgram *p = NULL;
13453 if (!quiet) printf ("orc_combine2_8xn_u8:\n");
13454 p = orc_program_new ();
13455 orc_program_set_constant_n (p, 8);
13456 orc_program_set_2d (p);
13457 orc_program_set_name (p, "orc_combine2_8xn_u8");
13458 orc_program_set_backup_function (p, _backup_orc_combine2_8xn_u8);
13459 orc_program_add_destination (p, 1, "d1");
13460 orc_program_add_source (p, 1, "s1");
13461 orc_program_add_source (p, 1, "s2");
13462 orc_program_add_parameter (p, 2, "p1");
13463 orc_program_add_parameter (p, 2, "p2");
13464 orc_program_add_parameter (p, 2, "p3");
13465 orc_program_add_parameter (p, 2, "p4");
13466 orc_program_add_temporary (p, 2, "t1");
13467 orc_program_add_temporary (p, 2, "t2");
13469 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
13470 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
13471 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
13472 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2, ORC_VAR_D1);
13473 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
13474 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1);
13475 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1);
13476 orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
13479 printf (" cycles (emulate) : %g\n",
13480 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
13483 ret = orc_test_compare_output_backup (p);
13486 } else if (!quiet) {
13487 printf (" backup function : PASSED\n");
13491 printf (" cycles (backup) : %g\n",
13492 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
13495 ret = orc_test_compare_output (p);
13496 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
13497 printf (" compiled function: COMPILE FAILED\n");
13500 } else if (!quiet) {
13501 printf (" compiled function: PASSED\n");
13505 printf (" cycles (compiled): %g\n",
13506 orc_test_performance_full (p, 0, NULL));
13509 orc_program_free (p);
13512 /* orc_combine2_12xn_u8 */
13514 OrcProgram *p = NULL;
13517 if (!quiet) printf ("orc_combine2_12xn_u8:\n");
13518 p = orc_program_new ();
13519 orc_program_set_constant_n (p, 12);
13520 orc_program_set_2d (p);
13521 orc_program_set_name (p, "orc_combine2_12xn_u8");
13522 orc_program_set_backup_function (p, _backup_orc_combine2_12xn_u8);
13523 orc_program_add_destination (p, 1, "d1");
13524 orc_program_add_source (p, 1, "s1");
13525 orc_program_add_source (p, 1, "s2");
13526 orc_program_add_parameter (p, 2, "p1");
13527 orc_program_add_parameter (p, 2, "p2");
13528 orc_program_add_parameter (p, 2, "p3");
13529 orc_program_add_parameter (p, 2, "p4");
13530 orc_program_add_temporary (p, 2, "t1");
13531 orc_program_add_temporary (p, 2, "t2");
13533 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
13534 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
13535 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
13536 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2, ORC_VAR_D1);
13537 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
13538 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1);
13539 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1);
13540 orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
13543 printf (" cycles (emulate) : %g\n",
13544 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
13547 ret = orc_test_compare_output_backup (p);
13550 } else if (!quiet) {
13551 printf (" backup function : PASSED\n");
13555 printf (" cycles (backup) : %g\n",
13556 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
13559 ret = orc_test_compare_output (p);
13560 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
13561 printf (" compiled function: COMPILE FAILED\n");
13564 } else if (!quiet) {
13565 printf (" compiled function: PASSED\n");
13569 printf (" cycles (compiled): %g\n",
13570 orc_test_performance_full (p, 0, NULL));
13573 orc_program_free (p);
13576 /* orc_combine2_16xn_u8 */
13578 OrcProgram *p = NULL;
13581 if (!quiet) printf ("orc_combine2_16xn_u8:\n");
13582 p = orc_program_new ();
13583 orc_program_set_constant_n (p, 16);
13584 orc_program_set_2d (p);
13585 orc_program_set_name (p, "orc_combine2_16xn_u8");
13586 orc_program_set_backup_function (p, _backup_orc_combine2_16xn_u8);
13587 orc_program_add_destination (p, 1, "d1");
13588 orc_program_add_source (p, 1, "s1");
13589 orc_program_add_source (p, 1, "s2");
13590 orc_program_add_parameter (p, 2, "p1");
13591 orc_program_add_parameter (p, 2, "p2");
13592 orc_program_add_parameter (p, 2, "p3");
13593 orc_program_add_parameter (p, 2, "p4");
13594 orc_program_add_temporary (p, 2, "t1");
13595 orc_program_add_temporary (p, 2, "t2");
13597 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
13598 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
13599 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
13600 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2, ORC_VAR_D1);
13601 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
13602 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1);
13603 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1);
13604 orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
13607 printf (" cycles (emulate) : %g\n",
13608 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
13611 ret = orc_test_compare_output_backup (p);
13614 } else if (!quiet) {
13615 printf (" backup function : PASSED\n");
13619 printf (" cycles (backup) : %g\n",
13620 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
13623 ret = orc_test_compare_output (p);
13624 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
13625 printf (" compiled function: COMPILE FAILED\n");
13628 } else if (!quiet) {
13629 printf (" compiled function: PASSED\n");
13633 printf (" cycles (compiled): %g\n",
13634 orc_test_performance_full (p, 0, NULL));
13637 orc_program_free (p);
13640 /* orc_combine2_nxm_u8 */
13642 OrcProgram *p = NULL;
13645 if (!quiet) printf ("orc_combine2_nxm_u8:\n");
13646 p = orc_program_new ();
13647 orc_program_set_2d (p);
13648 orc_program_set_name (p, "orc_combine2_nxm_u8");
13649 orc_program_set_backup_function (p, _backup_orc_combine2_nxm_u8);
13650 orc_program_add_destination (p, 1, "d1");
13651 orc_program_add_source (p, 1, "s1");
13652 orc_program_add_source (p, 1, "s2");
13653 orc_program_add_parameter (p, 2, "p1");
13654 orc_program_add_parameter (p, 2, "p2");
13655 orc_program_add_parameter (p, 2, "p3");
13656 orc_program_add_parameter (p, 2, "p4");
13657 orc_program_add_temporary (p, 2, "t1");
13658 orc_program_add_temporary (p, 2, "t2");
13660 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
13661 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
13662 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
13663 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_P2, ORC_VAR_D1);
13664 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
13665 orc_program_append_2 (p, "addw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P3, ORC_VAR_D1);
13666 orc_program_append_2 (p, "shrsw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P4, ORC_VAR_D1);
13667 orc_program_append_2 (p, "convsuswb", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
13670 printf (" cycles (emulate) : %g\n",
13671 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
13674 ret = orc_test_compare_output_backup (p);
13677 } else if (!quiet) {
13678 printf (" backup function : PASSED\n");
13682 printf (" cycles (backup) : %g\n",
13683 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
13686 ret = orc_test_compare_output (p);
13687 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
13688 printf (" compiled function: COMPILE FAILED\n");
13691 } else if (!quiet) {
13692 printf (" compiled function: PASSED\n");
13696 printf (" cycles (compiled): %g\n",
13697 orc_test_performance_full (p, 0, NULL));
13700 orc_program_free (p);
13703 /* orc_sad_nxm_u8 */
13705 OrcProgram *p = NULL;
13708 if (!quiet) printf ("orc_sad_nxm_u8:\n");
13709 p = orc_program_new ();
13710 orc_program_set_2d (p);
13711 orc_program_set_name (p, "orc_sad_nxm_u8");
13712 orc_program_set_backup_function (p, _backup_orc_sad_nxm_u8);
13713 orc_program_add_source (p, 1, "s1");
13714 orc_program_add_source (p, 1, "s2");
13715 orc_program_add_accumulator (p, 4, "a1");
13717 orc_program_append_2 (p, "accsadubl", 0, ORC_VAR_A1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
13720 printf (" cycles (emulate) : %g\n",
13721 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
13724 ret = orc_test_compare_output_backup (p);
13727 } else if (!quiet) {
13728 printf (" backup function : PASSED\n");
13732 printf (" cycles (backup) : %g\n",
13733 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
13736 ret = orc_test_compare_output (p);
13737 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
13738 printf (" compiled function: COMPILE FAILED\n");
13741 } else if (!quiet) {
13742 printf (" compiled function: PASSED\n");
13746 printf (" cycles (compiled): %g\n",
13747 orc_test_performance_full (p, 0, NULL));
13750 orc_program_free (p);
13753 /* orc_sad_8x8_u8 */
13755 OrcProgram *p = NULL;
13758 if (!quiet) printf ("orc_sad_8x8_u8:\n");
13759 p = orc_program_new ();
13760 orc_program_set_constant_n (p, 8);
13761 orc_program_set_2d (p);
13762 orc_program_set_constant_m (p, 8);
13763 orc_program_set_name (p, "orc_sad_8x8_u8");
13764 orc_program_set_backup_function (p, _backup_orc_sad_8x8_u8);
13765 orc_program_add_source (p, 1, "s1");
13766 orc_program_add_source (p, 1, "s2");
13767 orc_program_add_accumulator (p, 4, "a1");
13769 orc_program_append_2 (p, "accsadubl", 0, ORC_VAR_A1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
13772 printf (" cycles (emulate) : %g\n",
13773 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
13776 ret = orc_test_compare_output_backup (p);
13779 } else if (!quiet) {
13780 printf (" backup function : PASSED\n");
13784 printf (" cycles (backup) : %g\n",
13785 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
13788 ret = orc_test_compare_output (p);
13789 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
13790 printf (" compiled function: COMPILE FAILED\n");
13793 } else if (!quiet) {
13794 printf (" compiled function: PASSED\n");
13798 printf (" cycles (compiled): %g\n",
13799 orc_test_performance_full (p, 0, NULL));
13802 orc_program_free (p);
13805 /* orc_sad_12x12_u8 */
13807 OrcProgram *p = NULL;
13810 if (!quiet) printf ("orc_sad_12x12_u8:\n");
13811 p = orc_program_new ();
13812 orc_program_set_constant_n (p, 12);
13813 orc_program_set_2d (p);
13814 orc_program_set_constant_m (p, 12);
13815 orc_program_set_name (p, "orc_sad_12x12_u8");
13816 orc_program_set_backup_function (p, _backup_orc_sad_12x12_u8);
13817 orc_program_add_source (p, 1, "s1");
13818 orc_program_add_source (p, 1, "s2");
13819 orc_program_add_accumulator (p, 4, "a1");
13821 orc_program_append_2 (p, "accsadubl", 0, ORC_VAR_A1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
13824 printf (" cycles (emulate) : %g\n",
13825 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
13828 ret = orc_test_compare_output_backup (p);
13831 } else if (!quiet) {
13832 printf (" backup function : PASSED\n");
13836 printf (" cycles (backup) : %g\n",
13837 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
13840 ret = orc_test_compare_output (p);
13841 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
13842 printf (" compiled function: COMPILE FAILED\n");
13845 } else if (!quiet) {
13846 printf (" compiled function: PASSED\n");
13850 printf (" cycles (compiled): %g\n",
13851 orc_test_performance_full (p, 0, NULL));
13854 orc_program_free (p);
13857 /* orc_sad_16xn_u8 */
13859 OrcProgram *p = NULL;
13862 if (!quiet) printf ("orc_sad_16xn_u8:\n");
13863 p = orc_program_new ();
13864 orc_program_set_constant_n (p, 16);
13865 orc_program_set_2d (p);
13866 orc_program_set_name (p, "orc_sad_16xn_u8");
13867 orc_program_set_backup_function (p, _backup_orc_sad_16xn_u8);
13868 orc_program_add_source (p, 1, "s1");
13869 orc_program_add_source (p, 1, "s2");
13870 orc_program_add_accumulator (p, 4, "a1");
13872 orc_program_append_2 (p, "accsadubl", 0, ORC_VAR_A1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
13875 printf (" cycles (emulate) : %g\n",
13876 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
13879 ret = orc_test_compare_output_backup (p);
13882 } else if (!quiet) {
13883 printf (" backup function : PASSED\n");
13887 printf (" cycles (backup) : %g\n",
13888 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
13891 ret = orc_test_compare_output (p);
13892 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
13893 printf (" compiled function: COMPILE FAILED\n");
13896 } else if (!quiet) {
13897 printf (" compiled function: PASSED\n");
13901 printf (" cycles (compiled): %g\n",
13902 orc_test_performance_full (p, 0, NULL));
13905 orc_program_free (p);
13908 /* orc_sad_32xn_u8 */
13910 OrcProgram *p = NULL;
13913 if (!quiet) printf ("orc_sad_32xn_u8:\n");
13914 p = orc_program_new ();
13915 orc_program_set_constant_n (p, 32);
13916 orc_program_set_2d (p);
13917 orc_program_set_name (p, "orc_sad_32xn_u8");
13918 orc_program_set_backup_function (p, _backup_orc_sad_32xn_u8);
13919 orc_program_add_source (p, 1, "s1");
13920 orc_program_add_source (p, 1, "s2");
13921 orc_program_add_accumulator (p, 4, "a1");
13923 orc_program_append_2 (p, "accsadubl", 0, ORC_VAR_A1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
13926 printf (" cycles (emulate) : %g\n",
13927 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
13930 ret = orc_test_compare_output_backup (p);
13933 } else if (!quiet) {
13934 printf (" backup function : PASSED\n");
13938 printf (" cycles (backup) : %g\n",
13939 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
13942 ret = orc_test_compare_output (p);
13943 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
13944 printf (" compiled function: COMPILE FAILED\n");
13947 } else if (!quiet) {
13948 printf (" compiled function: PASSED\n");
13952 printf (" cycles (compiled): %g\n",
13953 orc_test_performance_full (p, 0, NULL));
13956 orc_program_free (p);
13959 /* convert_rgb_to_gray */
13961 OrcProgram *p = NULL;
13964 if (!quiet) printf ("convert_rgb_to_gray:\n");
13965 p = orc_program_new ();
13966 orc_program_set_name (p, "convert_rgb_to_gray");
13967 orc_program_set_backup_function (p, _backup_convert_rgb_to_gray);
13968 orc_program_add_destination (p, 1, "d1");
13969 orc_program_add_source (p, 4, "s1");
13970 orc_program_add_constant (p, 4, 0x00004c8b, "c1");
13971 orc_program_add_constant (p, 4, 0x00009646, "c2");
13972 orc_program_add_constant (p, 4, 0x00001d2f, "c3");
13973 orc_program_add_constant (p, 4, 0x00000080, "c4");
13974 orc_program_add_temporary (p, 1, "t1");
13975 orc_program_add_temporary (p, 2, "t2");
13976 orc_program_add_temporary (p, 2, "t3");
13978 orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
13979 orc_program_append_2 (p, "select0wb", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
13980 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
13981 orc_program_append_2 (p, "swapw", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
13982 orc_program_append_2 (p, "mulhuw", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C1, ORC_VAR_D1);
13983 orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
13984 orc_program_append_2 (p, "select1wb", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
13985 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
13986 orc_program_append_2 (p, "swapw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
13987 orc_program_append_2 (p, "mulhuw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C2, ORC_VAR_D1);
13988 orc_program_append_2 (p, "addusw", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1);
13989 orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
13990 orc_program_append_2 (p, "select0wb", 0, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
13991 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
13992 orc_program_append_2 (p, "swapw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
13993 orc_program_append_2 (p, "mulhuw", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_C3, ORC_VAR_D1);
13994 orc_program_append_2 (p, "addusw", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1);
13995 orc_program_append_2 (p, "addusw", 0, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_C4, ORC_VAR_D1);
13996 orc_program_append_2 (p, "select1wb", 0, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
13999 printf (" cycles (emulate) : %g\n",
14000 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14003 ret = orc_test_compare_output_backup (p);
14006 } else if (!quiet) {
14007 printf (" backup function : PASSED\n");
14011 printf (" cycles (backup) : %g\n",
14012 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
14015 ret = orc_test_compare_output (p);
14016 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
14017 printf (" compiled function: COMPILE FAILED\n");
14020 } else if (!quiet) {
14021 printf (" compiled function: PASSED\n");
14025 printf (" cycles (compiled): %g\n",
14026 orc_test_performance_full (p, 0, NULL));
14029 orc_program_free (p);
14032 /* canny_calc_delta_x */
14034 OrcProgram *p = NULL;
14037 if (!quiet) printf ("canny_calc_delta_x:\n");
14038 p = orc_program_new ();
14039 orc_program_set_name (p, "canny_calc_delta_x");
14040 orc_program_set_backup_function (p, _backup_canny_calc_delta_x);
14041 orc_program_add_destination (p, 4, "d1");
14042 orc_program_add_source (p, 4, "s1");
14043 orc_program_add_source (p, 4, "s2");
14044 orc_program_add_temporary (p, 2, "t1");
14045 orc_program_add_temporary (p, 2, "t2");
14046 orc_program_add_temporary (p, 1, "t3");
14047 orc_program_add_temporary (p, 2, "t4");
14048 orc_program_add_temporary (p, 1, "t5");
14049 orc_program_add_temporary (p, 2, "t6");
14050 orc_program_add_temporary (p, 4, "t7");
14051 orc_program_add_temporary (p, 4, "t8");
14053 orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
14054 orc_program_append_2 (p, "select1wb", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
14055 orc_program_append_2 (p, "select0lw", 0, ORC_VAR_T4, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
14056 orc_program_append_2 (p, "select1wb", 0, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
14057 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
14058 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T6, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1);
14059 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T4, ORC_VAR_T6, ORC_VAR_D1);
14060 orc_program_append_2 (p, "convswl", 0, ORC_VAR_T7, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
14061 orc_program_append_2 (p, "mulll", 0, ORC_VAR_T8, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_D1);
14062 orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
14063 orc_program_append_2 (p, "select0wb", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
14064 orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T4, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
14065 orc_program_append_2 (p, "select0wb", 0, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
14066 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
14067 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T6, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1);
14068 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T4, ORC_VAR_T6, ORC_VAR_D1);
14069 orc_program_append_2 (p, "convswl", 0, ORC_VAR_T7, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
14070 orc_program_append_2 (p, "mulll", 0, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_D1);
14071 orc_program_append_2 (p, "addl", 0, ORC_VAR_T8, ORC_VAR_T8, ORC_VAR_T7, ORC_VAR_D1);
14072 orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T2, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
14073 orc_program_append_2 (p, "select1wb", 0, ORC_VAR_T3, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
14074 orc_program_append_2 (p, "select1lw", 0, ORC_VAR_T4, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
14075 orc_program_append_2 (p, "select1wb", 0, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
14076 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
14077 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T6, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1);
14078 orc_program_append_2 (p, "subw", 0, ORC_VAR_T1, ORC_VAR_T4, ORC_VAR_T6, ORC_VAR_D1);
14079 orc_program_append_2 (p, "convswl", 0, ORC_VAR_T7, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
14080 orc_program_append_2 (p, "mulll", 0, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_T7, ORC_VAR_D1);
14081 orc_program_append_2 (p, "addl", 0, ORC_VAR_D1, ORC_VAR_T8, ORC_VAR_T7, ORC_VAR_D1);
14084 printf (" cycles (emulate) : %g\n",
14085 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14088 ret = orc_test_compare_output_backup (p);
14091 } else if (!quiet) {
14092 printf (" backup function : PASSED\n");
14096 printf (" cycles (backup) : %g\n",
14097 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
14100 ret = orc_test_compare_output (p);
14101 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
14102 printf (" compiled function: COMPILE FAILED\n");
14105 } else if (!quiet) {
14106 printf (" compiled function: PASSED\n");
14110 printf (" cycles (compiled): %g\n",
14111 orc_test_performance_full (p, 0, NULL));
14114 orc_program_free (p);
14119 OrcProgram *p = NULL;
14122 if (!quiet) printf ("i420_to_ayuv:\n");
14123 p = orc_program_new ();
14124 orc_program_set_name (p, "i420_to_ayuv");
14125 orc_program_set_backup_function (p, _backup_i420_to_ayuv);
14126 orc_program_add_destination (p, 4, "d1");
14127 orc_program_add_source (p, 1, "s1");
14128 orc_program_add_source (p, 1, "s2");
14129 orc_program_add_source (p, 1, "s3");
14130 orc_program_add_parameter (p, 1, "p1");
14131 orc_program_add_temporary (p, 1, "t1");
14132 orc_program_add_temporary (p, 1, "t2");
14133 orc_program_add_temporary (p, 1, "t3");
14134 orc_program_add_temporary (p, 2, "t4");
14135 orc_program_add_temporary (p, 2, "t5");
14137 orc_program_append_2 (p, "loadupdb", 0, ORC_VAR_T1, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
14138 orc_program_append_2 (p, "loadupdb", 0, ORC_VAR_T2, ORC_VAR_S3, ORC_VAR_D1, ORC_VAR_D1);
14139 orc_program_append_2 (p, "loadb", 0, ORC_VAR_T3, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
14140 orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T4, ORC_VAR_P1, ORC_VAR_T3, ORC_VAR_D1);
14141 orc_program_append_2 (p, "mergebw", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
14142 orc_program_append_2 (p, "mergewl", 0, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
14145 printf (" cycles (emulate) : %g\n",
14146 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14149 ret = orc_test_compare_output_backup (p);
14152 } else if (!quiet) {
14153 printf (" backup function : PASSED\n");
14157 printf (" cycles (backup) : %g\n",
14158 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
14161 ret = orc_test_compare_output (p);
14162 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
14163 printf (" compiled function: COMPILE FAILED\n");
14166 } else if (!quiet) {
14167 printf (" compiled function: PASSED\n");
14171 printf (" cycles (compiled): %g\n",
14172 orc_test_performance_full (p, 0, NULL));
14175 orc_program_free (p);
14180 OrcProgram *p = NULL;
14183 if (!quiet) printf ("test_4x:\n");
14184 p = orc_program_new ();
14185 orc_program_set_name (p, "test_4x");
14186 orc_program_set_backup_function (p, _backup_test_4x);
14187 orc_program_add_destination (p, 4, "d1");
14188 orc_program_add_source (p, 4, "s1");
14189 orc_program_add_source (p, 4, "s2");
14191 orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_S2, ORC_VAR_D1);
14194 printf (" cycles (emulate) : %g\n",
14195 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14198 ret = orc_test_compare_output_backup (p);
14201 } else if (!quiet) {
14202 printf (" backup function : PASSED\n");
14206 printf (" cycles (backup) : %g\n",
14207 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
14210 ret = orc_test_compare_output (p);
14211 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
14212 printf (" compiled function: COMPILE FAILED\n");
14215 } else if (!quiet) {
14216 printf (" compiled function: PASSED\n");
14220 printf (" cycles (compiled): %g\n",
14221 orc_test_performance_full (p, 0, NULL));
14224 orc_program_free (p);
14229 OrcProgram *p = NULL;
14232 if (!quiet) printf ("test_4x_2:\n");
14233 p = orc_program_new ();
14234 orc_program_set_name (p, "test_4x_2");
14235 orc_program_set_backup_function (p, _backup_test_4x_2);
14236 orc_program_add_destination (p, 4, "d1");
14237 orc_program_add_source (p, 4, "s1");
14238 orc_program_add_parameter (p, 4, "p1");
14240 orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_P1, ORC_VAR_D1);
14243 printf (" cycles (emulate) : %g\n",
14244 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14247 ret = orc_test_compare_output_backup (p);
14250 } else if (!quiet) {
14251 printf (" backup function : PASSED\n");
14255 printf (" cycles (backup) : %g\n",
14256 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
14259 ret = orc_test_compare_output (p);
14260 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
14261 printf (" compiled function: COMPILE FAILED\n");
14264 } else if (!quiet) {
14265 printf (" compiled function: PASSED\n");
14269 printf (" cycles (compiled): %g\n",
14270 orc_test_performance_full (p, 0, NULL));
14273 orc_program_free (p);
14276 /* orc_splat_u16 */
14278 OrcProgram *p = NULL;
14281 if (!quiet) printf ("orc_splat_u16:\n");
14282 p = orc_program_new ();
14283 orc_program_set_name (p, "orc_splat_u16");
14284 orc_program_set_backup_function (p, _backup_orc_splat_u16);
14285 orc_program_add_destination (p, 2, "d1");
14286 orc_program_add_parameter (p, 2, "p1");
14288 orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1);
14291 printf (" cycles (emulate) : %g\n",
14292 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14295 ret = orc_test_compare_output_backup (p);
14298 } else if (!quiet) {
14299 printf (" backup function : PASSED\n");
14303 printf (" cycles (backup) : %g\n",
14304 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
14307 ret = orc_test_compare_output (p);
14308 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
14309 printf (" compiled function: COMPILE FAILED\n");
14312 } else if (!quiet) {
14313 printf (" compiled function: PASSED\n");
14317 printf (" cycles (compiled): %g\n",
14318 orc_test_performance_full (p, 0, NULL));
14321 orc_program_free (p);
14324 /* orc_splat_u32 */
14326 OrcProgram *p = NULL;
14329 if (!quiet) printf ("orc_splat_u32:\n");
14330 p = orc_program_new ();
14331 orc_program_set_name (p, "orc_splat_u32");
14332 orc_program_set_backup_function (p, _backup_orc_splat_u32);
14333 orc_program_add_destination (p, 4, "d1");
14334 orc_program_add_parameter (p, 4, "p1");
14336 orc_program_append_2 (p, "copyl", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1);
14339 printf (" cycles (emulate) : %g\n",
14340 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14343 ret = orc_test_compare_output_backup (p);
14346 } else if (!quiet) {
14347 printf (" backup function : PASSED\n");
14351 printf (" cycles (backup) : %g\n",
14352 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
14355 ret = orc_test_compare_output (p);
14356 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
14357 printf (" compiled function: COMPILE FAILED\n");
14360 } else if (!quiet) {
14361 printf (" compiled function: PASSED\n");
14365 printf (" cycles (compiled): %g\n",
14366 orc_test_performance_full (p, 0, NULL));
14369 orc_program_free (p);
14372 /* orc_splat_u16_2d */
14374 OrcProgram *p = NULL;
14377 if (!quiet) printf ("orc_splat_u16_2d:\n");
14378 p = orc_program_new ();
14379 orc_program_set_2d (p);
14380 orc_program_set_name (p, "orc_splat_u16_2d");
14381 orc_program_set_backup_function (p, _backup_orc_splat_u16_2d);
14382 orc_program_add_destination (p, 2, "d1");
14383 orc_program_add_parameter (p, 2, "p1");
14385 orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1);
14388 printf (" cycles (emulate) : %g\n",
14389 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14392 ret = orc_test_compare_output_backup (p);
14395 } else if (!quiet) {
14396 printf (" backup function : PASSED\n");
14400 printf (" cycles (backup) : %g\n",
14401 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
14404 ret = orc_test_compare_output (p);
14405 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
14406 printf (" compiled function: COMPILE FAILED\n");
14409 } else if (!quiet) {
14410 printf (" compiled function: PASSED\n");
14414 printf (" cycles (compiled): %g\n",
14415 orc_test_performance_full (p, 0, NULL));
14418 orc_program_free (p);
14421 /* orc_splat_u32_2d */
14423 OrcProgram *p = NULL;
14426 if (!quiet) printf ("orc_splat_u32_2d:\n");
14427 p = orc_program_new ();
14428 orc_program_set_2d (p);
14429 orc_program_set_name (p, "orc_splat_u32_2d");
14430 orc_program_set_backup_function (p, _backup_orc_splat_u32_2d);
14431 orc_program_add_destination (p, 4, "d1");
14432 orc_program_add_parameter (p, 4, "p1");
14434 orc_program_append_2 (p, "copyl", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1);
14437 printf (" cycles (emulate) : %g\n",
14438 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14441 ret = orc_test_compare_output_backup (p);
14444 } else if (!quiet) {
14445 printf (" backup function : PASSED\n");
14449 printf (" cycles (backup) : %g\n",
14450 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
14453 ret = orc_test_compare_output (p);
14454 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
14455 printf (" compiled function: COMPILE FAILED\n");
14458 } else if (!quiet) {
14459 printf (" compiled function: PASSED\n");
14463 printf (" cycles (compiled): %g\n",
14464 orc_test_performance_full (p, 0, NULL));
14467 orc_program_free (p);
14470 /* orc_copy_u16_2d */
14472 OrcProgram *p = NULL;
14475 if (!quiet) printf ("orc_copy_u16_2d:\n");
14476 p = orc_program_new ();
14477 orc_program_set_2d (p);
14478 orc_program_set_name (p, "orc_copy_u16_2d");
14479 orc_program_set_backup_function (p, _backup_orc_copy_u16_2d);
14480 orc_program_add_destination (p, 2, "d1");
14481 orc_program_add_source (p, 2, "s1");
14483 orc_program_append_2 (p, "copyw", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
14486 printf (" cycles (emulate) : %g\n",
14487 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14490 ret = orc_test_compare_output_backup (p);
14493 } else if (!quiet) {
14494 printf (" backup function : PASSED\n");
14498 printf (" cycles (backup) : %g\n",
14499 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
14502 ret = orc_test_compare_output (p);
14503 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
14504 printf (" compiled function: COMPILE FAILED\n");
14507 } else if (!quiet) {
14508 printf (" compiled function: PASSED\n");
14512 printf (" cycles (compiled): %g\n",
14513 orc_test_performance_full (p, 0, NULL));
14516 orc_program_free (p);
14519 /* orc_copy_u32_2d */
14521 OrcProgram *p = NULL;
14524 if (!quiet) printf ("orc_copy_u32_2d:\n");
14525 p = orc_program_new ();
14526 orc_program_set_2d (p);
14527 orc_program_set_name (p, "orc_copy_u32_2d");
14528 orc_program_set_backup_function (p, _backup_orc_copy_u32_2d);
14529 orc_program_add_destination (p, 4, "d1");
14530 orc_program_add_source (p, 4, "s1");
14532 orc_program_append_2 (p, "copyl", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
14535 printf (" cycles (emulate) : %g\n",
14536 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14539 ret = orc_test_compare_output_backup (p);
14542 } else if (!quiet) {
14543 printf (" backup function : PASSED\n");
14547 printf (" cycles (backup) : %g\n",
14548 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
14551 ret = orc_test_compare_output (p);
14552 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
14553 printf (" compiled function: COMPILE FAILED\n");
14556 } else if (!quiet) {
14557 printf (" compiled function: PASSED\n");
14561 printf (" cycles (compiled): %g\n",
14562 orc_test_performance_full (p, 0, NULL));
14565 orc_program_free (p);
14568 /* orc_composite_add_8888_8888_2d */
14570 OrcProgram *p = NULL;
14573 if (!quiet) printf ("orc_composite_add_8888_8888_2d:\n");
14574 p = orc_program_new ();
14575 orc_program_set_2d (p);
14576 orc_program_set_name (p, "orc_composite_add_8888_8888_2d");
14577 orc_program_set_backup_function (p, _backup_orc_composite_add_8888_8888_2d);
14578 orc_program_add_destination (p, 4, "d1");
14579 orc_program_add_source (p, 4, "s1");
14581 orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1);
14584 printf (" cycles (emulate) : %g\n",
14585 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14588 ret = orc_test_compare_output_backup (p);
14591 } else if (!quiet) {
14592 printf (" backup function : PASSED\n");
14596 printf (" cycles (backup) : %g\n",
14597 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
14600 ret = orc_test_compare_output (p);
14601 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
14602 printf (" compiled function: COMPILE FAILED\n");
14605 } else if (!quiet) {
14606 printf (" compiled function: PASSED\n");
14610 printf (" cycles (compiled): %g\n",
14611 orc_test_performance_full (p, 0, NULL));
14614 orc_program_free (p);
14617 /* orc_composite_add_8_8_line */
14619 OrcProgram *p = NULL;
14622 if (!quiet) printf ("orc_composite_add_8_8_line:\n");
14623 p = orc_program_new ();
14624 orc_program_set_name (p, "orc_composite_add_8_8_line");
14625 orc_program_set_backup_function (p, _backup_orc_composite_add_8_8_line);
14626 orc_program_add_destination (p, 1, "d1");
14627 orc_program_add_source (p, 1, "s1");
14629 orc_program_append_2 (p, "addusb", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1);
14632 printf (" cycles (emulate) : %g\n",
14633 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14636 ret = orc_test_compare_output_backup (p);
14639 } else if (!quiet) {
14640 printf (" backup function : PASSED\n");
14644 printf (" cycles (backup) : %g\n",
14645 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
14648 ret = orc_test_compare_output (p);
14649 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
14650 printf (" compiled function: COMPILE FAILED\n");
14653 } else if (!quiet) {
14654 printf (" compiled function: PASSED\n");
14658 printf (" cycles (compiled): %g\n",
14659 orc_test_performance_full (p, 0, NULL));
14662 orc_program_free (p);
14665 /* orc_composite_add_n_8_8_line */
14667 OrcProgram *p = NULL;
14670 if (!quiet) printf ("orc_composite_add_n_8_8_line:\n");
14671 p = orc_program_new ();
14672 orc_program_set_name (p, "orc_composite_add_n_8_8_line");
14673 orc_program_set_backup_function (p, _backup_orc_composite_add_n_8_8_line);
14674 orc_program_add_destination (p, 1, "d1");
14675 orc_program_add_source (p, 1, "s1");
14676 orc_program_add_parameter (p, 2, "p1");
14677 orc_program_add_temporary (p, 2, "t1");
14678 orc_program_add_temporary (p, 1, "t2");
14680 orc_program_append_2 (p, "convubw", 0, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
14681 orc_program_append_2 (p, "mullw", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1);
14682 orc_program_append_2 (p, "div255w", 0, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
14683 orc_program_append_2 (p, "convwb", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
14684 orc_program_append_2 (p, "addusb", 0, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1);
14687 printf (" cycles (emulate) : %g\n",
14688 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14691 ret = orc_test_compare_output_backup (p);
14694 } else if (!quiet) {
14695 printf (" backup function : PASSED\n");
14699 printf (" cycles (backup) : %g\n",
14700 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
14703 ret = orc_test_compare_output (p);
14704 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
14705 printf (" compiled function: COMPILE FAILED\n");
14708 } else if (!quiet) {
14709 printf (" compiled function: PASSED\n");
14713 printf (" cycles (compiled): %g\n",
14714 orc_test_performance_full (p, 0, NULL));
14717 orc_program_free (p);
14720 /* orc_code_combine_add_u */
14722 OrcProgram *p = NULL;
14725 if (!quiet) printf ("orc_code_combine_add_u:\n");
14726 p = orc_program_new ();
14727 orc_program_set_name (p, "orc_code_combine_add_u");
14728 orc_program_set_backup_function (p, _backup_orc_code_combine_add_u);
14729 orc_program_add_destination (p, 4, "d1");
14730 orc_program_add_source (p, 4, "s1");
14731 orc_program_add_source (p, 4, "s2");
14732 orc_program_add_temporary (p, 8, "t1");
14733 orc_program_add_temporary (p, 8, "t2");
14734 orc_program_add_temporary (p, 4, "t3");
14736 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
14737 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
14738 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
14739 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
14740 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
14741 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
14742 orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_D1);
14745 printf (" cycles (emulate) : %g\n",
14746 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14749 ret = orc_test_compare_output_backup (p);
14752 } else if (!quiet) {
14753 printf (" backup function : PASSED\n");
14757 printf (" cycles (backup) : %g\n",
14758 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
14761 ret = orc_test_compare_output (p);
14762 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
14763 printf (" compiled function: COMPILE FAILED\n");
14766 } else if (!quiet) {
14767 printf (" compiled function: PASSED\n");
14771 printf (" cycles (compiled): %g\n",
14772 orc_test_performance_full (p, 0, NULL));
14775 orc_program_free (p);
14778 /* orc_code_combine_add_u_n */
14780 OrcProgram *p = NULL;
14783 if (!quiet) printf ("orc_code_combine_add_u_n:\n");
14784 p = orc_program_new ();
14785 orc_program_set_name (p, "orc_code_combine_add_u_n");
14786 orc_program_set_backup_function (p, _backup_orc_code_combine_add_u_n);
14787 orc_program_add_destination (p, 4, "d1");
14788 orc_program_add_source (p, 4, "s1");
14790 orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1);
14793 printf (" cycles (emulate) : %g\n",
14794 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14797 ret = orc_test_compare_output_backup (p);
14800 } else if (!quiet) {
14801 printf (" backup function : PASSED\n");
14805 printf (" cycles (backup) : %g\n",
14806 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
14809 ret = orc_test_compare_output (p);
14810 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
14811 printf (" compiled function: COMPILE FAILED\n");
14814 } else if (!quiet) {
14815 printf (" compiled function: PASSED\n");
14819 printf (" cycles (compiled): %g\n",
14820 orc_test_performance_full (p, 0, NULL));
14823 orc_program_free (p);
14826 /* orc_code_combine_over_u */
14828 OrcProgram *p = NULL;
14831 if (!quiet) printf ("orc_code_combine_over_u:\n");
14832 p = orc_program_new ();
14833 orc_program_set_name (p, "orc_code_combine_over_u");
14834 orc_program_set_backup_function (p, _backup_orc_code_combine_over_u);
14835 orc_program_add_destination (p, 4, "d1");
14836 orc_program_add_source (p, 4, "s1");
14837 orc_program_add_source (p, 4, "s2");
14838 orc_program_add_constant (p, 4, 0x000000ff, "c1");
14839 orc_program_add_temporary (p, 8, "t1");
14840 orc_program_add_temporary (p, 8, "t2");
14841 orc_program_add_temporary (p, 4, "t3");
14842 orc_program_add_temporary (p, 4, "t4");
14843 orc_program_add_temporary (p, 8, "t5");
14845 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
14846 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
14847 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T2, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
14848 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
14849 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
14850 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
14851 orc_program_append_2 (p, "loadl", 0, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
14852 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
14853 orc_program_append_2 (p, "xorw", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
14854 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
14855 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T5, ORC_VAR_T2, ORC_VAR_D1);
14856 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
14857 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T4, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
14858 orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1);
14861 printf (" cycles (emulate) : %g\n",
14862 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14865 ret = orc_test_compare_output_backup (p);
14868 } else if (!quiet) {
14869 printf (" backup function : PASSED\n");
14873 printf (" cycles (backup) : %g\n",
14874 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
14877 ret = orc_test_compare_output (p);
14878 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
14879 printf (" compiled function: COMPILE FAILED\n");
14882 } else if (!quiet) {
14883 printf (" compiled function: PASSED\n");
14887 printf (" cycles (compiled): %g\n",
14888 orc_test_performance_full (p, 0, NULL));
14891 orc_program_free (p);
14894 /* orc_code_combine_over_u_n */
14896 OrcProgram *p = NULL;
14899 if (!quiet) printf ("orc_code_combine_over_u_n:\n");
14900 p = orc_program_new ();
14901 orc_program_set_name (p, "orc_code_combine_over_u_n");
14902 orc_program_set_backup_function (p, _backup_orc_code_combine_over_u_n);
14903 orc_program_add_destination (p, 4, "d1");
14904 orc_program_add_source (p, 4, "s1");
14905 orc_program_add_constant (p, 4, 0x000000ff, "c1");
14906 orc_program_add_temporary (p, 8, "t1");
14907 orc_program_add_temporary (p, 8, "t2");
14908 orc_program_add_temporary (p, 4, "t3");
14909 orc_program_add_temporary (p, 4, "t4");
14910 orc_program_add_temporary (p, 8, "t5");
14912 orc_program_append_2 (p, "loadl", 0, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
14913 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
14914 orc_program_append_2 (p, "loadl", 0, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
14915 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
14916 orc_program_append_2 (p, "xorw", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
14917 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
14918 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T5, ORC_VAR_T2, ORC_VAR_D1);
14919 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
14920 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
14921 orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T4, ORC_VAR_D1);
14924 printf (" cycles (emulate) : %g\n",
14925 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14928 ret = orc_test_compare_output_backup (p);
14931 } else if (!quiet) {
14932 printf (" backup function : PASSED\n");
14936 printf (" cycles (backup) : %g\n",
14937 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
14940 ret = orc_test_compare_output (p);
14941 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
14942 printf (" compiled function: COMPILE FAILED\n");
14945 } else if (!quiet) {
14946 printf (" compiled function: PASSED\n");
14950 printf (" cycles (compiled): %g\n",
14951 orc_test_performance_full (p, 0, NULL));
14954 orc_program_free (p);
14957 /* orc_code_combine_in_u */
14959 OrcProgram *p = NULL;
14962 if (!quiet) printf ("orc_code_combine_in_u:\n");
14963 p = orc_program_new ();
14964 orc_program_set_name (p, "orc_code_combine_in_u");
14965 orc_program_set_backup_function (p, _backup_orc_code_combine_in_u);
14966 orc_program_add_destination (p, 4, "d1");
14967 orc_program_add_source (p, 4, "s1");
14968 orc_program_add_source (p, 4, "s2");
14969 orc_program_add_temporary (p, 8, "t1");
14970 orc_program_add_temporary (p, 8, "t2");
14971 orc_program_add_temporary (p, 8, "t3");
14972 orc_program_add_temporary (p, 8, "t4");
14973 orc_program_add_temporary (p, 8, "t5");
14975 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
14976 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
14977 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1);
14978 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
14979 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
14980 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
14981 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
14982 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
14983 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
14984 orc_program_append_2 (p, "convwb", 2, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
14987 printf (" cycles (emulate) : %g\n",
14988 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
14991 ret = orc_test_compare_output_backup (p);
14994 } else if (!quiet) {
14995 printf (" backup function : PASSED\n");
14999 printf (" cycles (backup) : %g\n",
15000 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
15003 ret = orc_test_compare_output (p);
15004 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
15005 printf (" compiled function: COMPILE FAILED\n");
15008 } else if (!quiet) {
15009 printf (" compiled function: PASSED\n");
15013 printf (" cycles (compiled): %g\n",
15014 orc_test_performance_full (p, 0, NULL));
15017 orc_program_free (p);
15020 /* orc_code_combine_in_u_n */
15022 OrcProgram *p = NULL;
15025 if (!quiet) printf ("orc_code_combine_in_u_n:\n");
15026 p = orc_program_new ();
15027 orc_program_set_name (p, "orc_code_combine_in_u_n");
15028 orc_program_set_backup_function (p, _backup_orc_code_combine_in_u_n);
15029 orc_program_add_destination (p, 4, "d1");
15030 orc_program_add_source (p, 4, "s1");
15031 orc_program_add_temporary (p, 8, "t1");
15032 orc_program_add_temporary (p, 8, "t2");
15033 orc_program_add_temporary (p, 8, "t3");
15034 orc_program_add_temporary (p, 8, "t4");
15035 orc_program_add_temporary (p, 8, "t5");
15037 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
15038 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
15039 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15040 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
15041 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15042 orc_program_append_2 (p, "convwb", 2, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15045 printf (" cycles (emulate) : %g\n",
15046 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
15049 ret = orc_test_compare_output_backup (p);
15052 } else if (!quiet) {
15053 printf (" backup function : PASSED\n");
15057 printf (" cycles (backup) : %g\n",
15058 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
15061 ret = orc_test_compare_output (p);
15062 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
15063 printf (" compiled function: COMPILE FAILED\n");
15066 } else if (!quiet) {
15067 printf (" compiled function: PASSED\n");
15071 printf (" cycles (compiled): %g\n",
15072 orc_test_performance_full (p, 0, NULL));
15075 orc_program_free (p);
15078 /* orc_code_combine_out_u */
15080 OrcProgram *p = NULL;
15083 if (!quiet) printf ("orc_code_combine_out_u:\n");
15084 p = orc_program_new ();
15085 orc_program_set_name (p, "orc_code_combine_out_u");
15086 orc_program_set_backup_function (p, _backup_orc_code_combine_out_u);
15087 orc_program_add_destination (p, 4, "d1");
15088 orc_program_add_source (p, 4, "s1");
15089 orc_program_add_source (p, 4, "s2");
15090 orc_program_add_constant (p, 4, 0x000000ff, "c1");
15091 orc_program_add_temporary (p, 8, "t1");
15092 orc_program_add_temporary (p, 8, "t2");
15093 orc_program_add_temporary (p, 8, "t3");
15094 orc_program_add_temporary (p, 8, "t4");
15095 orc_program_add_temporary (p, 8, "t5");
15097 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
15098 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
15099 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1);
15100 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
15101 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15102 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
15103 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15104 orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1);
15105 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
15106 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15107 orc_program_append_2 (p, "convwb", 2, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15110 printf (" cycles (emulate) : %g\n",
15111 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
15114 ret = orc_test_compare_output_backup (p);
15117 } else if (!quiet) {
15118 printf (" backup function : PASSED\n");
15122 printf (" cycles (backup) : %g\n",
15123 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
15126 ret = orc_test_compare_output (p);
15127 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
15128 printf (" compiled function: COMPILE FAILED\n");
15131 } else if (!quiet) {
15132 printf (" compiled function: PASSED\n");
15136 printf (" cycles (compiled): %g\n",
15137 orc_test_performance_full (p, 0, NULL));
15140 orc_program_free (p);
15143 /* orc_code_combine_out_u_n */
15145 OrcProgram *p = NULL;
15148 if (!quiet) printf ("orc_code_combine_out_u_n:\n");
15149 p = orc_program_new ();
15150 orc_program_set_name (p, "orc_code_combine_out_u_n");
15151 orc_program_set_backup_function (p, _backup_orc_code_combine_out_u_n);
15152 orc_program_add_destination (p, 4, "d1");
15153 orc_program_add_source (p, 4, "s1");
15154 orc_program_add_constant (p, 4, 0x000000ff, "c1");
15155 orc_program_add_temporary (p, 8, "t1");
15156 orc_program_add_temporary (p, 8, "t2");
15157 orc_program_add_temporary (p, 8, "t3");
15158 orc_program_add_temporary (p, 8, "t4");
15159 orc_program_add_temporary (p, 8, "t5");
15161 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
15162 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
15163 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15164 orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1);
15165 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
15166 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15167 orc_program_append_2 (p, "convwb", 2, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15170 printf (" cycles (emulate) : %g\n",
15171 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
15174 ret = orc_test_compare_output_backup (p);
15177 } else if (!quiet) {
15178 printf (" backup function : PASSED\n");
15182 printf (" cycles (backup) : %g\n",
15183 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
15186 ret = orc_test_compare_output (p);
15187 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
15188 printf (" compiled function: COMPILE FAILED\n");
15191 } else if (!quiet) {
15192 printf (" compiled function: PASSED\n");
15196 printf (" cycles (compiled): %g\n",
15197 orc_test_performance_full (p, 0, NULL));
15200 orc_program_free (p);
15203 /* orc_code_combine_atop_u */
15205 OrcProgram *p = NULL;
15208 if (!quiet) printf ("orc_code_combine_atop_u:\n");
15209 p = orc_program_new ();
15210 orc_program_set_name (p, "orc_code_combine_atop_u");
15211 orc_program_set_backup_function (p, _backup_orc_code_combine_atop_u);
15212 orc_program_add_destination (p, 4, "d1");
15213 orc_program_add_source (p, 4, "s1");
15214 orc_program_add_source (p, 4, "s2");
15215 orc_program_add_constant (p, 4, 0x000000ff, "c1");
15216 orc_program_add_temporary (p, 8, "t1");
15217 orc_program_add_temporary (p, 8, "t2");
15218 orc_program_add_temporary (p, 8, "t3");
15219 orc_program_add_temporary (p, 8, "t4");
15220 orc_program_add_temporary (p, 8, "t5");
15221 orc_program_add_temporary (p, 8, "t6");
15222 orc_program_add_temporary (p, 4, "t7");
15223 orc_program_add_temporary (p, 4, "t8");
15225 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
15226 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
15227 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1);
15228 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
15229 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15230 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
15231 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15232 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T6, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
15233 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1);
15234 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T7, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1);
15235 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
15236 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15237 orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1);
15238 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T1, ORC_VAR_T5, ORC_VAR_D1);
15239 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15240 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T8, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15241 orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T7, ORC_VAR_T8, ORC_VAR_D1);
15244 printf (" cycles (emulate) : %g\n",
15245 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
15248 ret = orc_test_compare_output_backup (p);
15251 } else if (!quiet) {
15252 printf (" backup function : PASSED\n");
15256 printf (" cycles (backup) : %g\n",
15257 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
15260 ret = orc_test_compare_output (p);
15261 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
15262 printf (" compiled function: COMPILE FAILED\n");
15265 } else if (!quiet) {
15266 printf (" compiled function: PASSED\n");
15270 printf (" cycles (compiled): %g\n",
15271 orc_test_performance_full (p, 0, NULL));
15274 orc_program_free (p);
15277 /* orc_code_combine_atop_u_n */
15279 OrcProgram *p = NULL;
15282 if (!quiet) printf ("orc_code_combine_atop_u_n:\n");
15283 p = orc_program_new ();
15284 orc_program_set_name (p, "orc_code_combine_atop_u_n");
15285 orc_program_set_backup_function (p, _backup_orc_code_combine_atop_u_n);
15286 orc_program_add_destination (p, 4, "d1");
15287 orc_program_add_source (p, 4, "s1");
15288 orc_program_add_constant (p, 4, 0x000000ff, "c1");
15289 orc_program_add_temporary (p, 8, "t1");
15290 orc_program_add_temporary (p, 8, "t2");
15291 orc_program_add_temporary (p, 8, "t3");
15292 orc_program_add_temporary (p, 8, "t4");
15293 orc_program_add_temporary (p, 8, "t5");
15294 orc_program_add_temporary (p, 8, "t6");
15295 orc_program_add_temporary (p, 4, "t7");
15296 orc_program_add_temporary (p, 4, "t8");
15298 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
15299 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
15300 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15301 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T6, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
15302 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1);
15303 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T7, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1);
15304 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
15305 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15306 orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1);
15307 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T1, ORC_VAR_T5, ORC_VAR_D1);
15308 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15309 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T8, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15310 orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T7, ORC_VAR_T8, ORC_VAR_D1);
15313 printf (" cycles (emulate) : %g\n",
15314 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
15317 ret = orc_test_compare_output_backup (p);
15320 } else if (!quiet) {
15321 printf (" backup function : PASSED\n");
15325 printf (" cycles (backup) : %g\n",
15326 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
15329 ret = orc_test_compare_output (p);
15330 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
15331 printf (" compiled function: COMPILE FAILED\n");
15334 } else if (!quiet) {
15335 printf (" compiled function: PASSED\n");
15339 printf (" cycles (compiled): %g\n",
15340 orc_test_performance_full (p, 0, NULL));
15343 orc_program_free (p);
15346 /* orc_code_combine_xor_u */
15348 OrcProgram *p = NULL;
15351 if (!quiet) printf ("orc_code_combine_xor_u:\n");
15352 p = orc_program_new ();
15353 orc_program_set_name (p, "orc_code_combine_xor_u");
15354 orc_program_set_backup_function (p, _backup_orc_code_combine_xor_u);
15355 orc_program_add_destination (p, 4, "d1");
15356 orc_program_add_source (p, 4, "s1");
15357 orc_program_add_source (p, 4, "s2");
15358 orc_program_add_constant (p, 4, 0x000000ff, "c1");
15359 orc_program_add_temporary (p, 8, "t1");
15360 orc_program_add_temporary (p, 8, "t2");
15361 orc_program_add_temporary (p, 8, "t3");
15362 orc_program_add_temporary (p, 8, "t4");
15363 orc_program_add_temporary (p, 8, "t5");
15364 orc_program_add_temporary (p, 8, "t6");
15365 orc_program_add_temporary (p, 4, "t7");
15366 orc_program_add_temporary (p, 4, "t8");
15368 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
15369 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
15370 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1);
15371 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
15372 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15373 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
15374 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15375 orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1);
15376 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T6, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
15377 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1);
15378 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T7, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1);
15379 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
15380 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15381 orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1);
15382 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T1, ORC_VAR_T5, ORC_VAR_D1);
15383 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15384 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T8, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15385 orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T7, ORC_VAR_T8, ORC_VAR_D1);
15388 printf (" cycles (emulate) : %g\n",
15389 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
15392 ret = orc_test_compare_output_backup (p);
15395 } else if (!quiet) {
15396 printf (" backup function : PASSED\n");
15400 printf (" cycles (backup) : %g\n",
15401 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
15404 ret = orc_test_compare_output (p);
15405 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
15406 printf (" compiled function: COMPILE FAILED\n");
15409 } else if (!quiet) {
15410 printf (" compiled function: PASSED\n");
15414 printf (" cycles (compiled): %g\n",
15415 orc_test_performance_full (p, 0, NULL));
15418 orc_program_free (p);
15421 /* orc_code_combine_xor_u_n */
15423 OrcProgram *p = NULL;
15426 if (!quiet) printf ("orc_code_combine_xor_u_n:\n");
15427 p = orc_program_new ();
15428 orc_program_set_name (p, "orc_code_combine_xor_u_n");
15429 orc_program_set_backup_function (p, _backup_orc_code_combine_xor_u_n);
15430 orc_program_add_destination (p, 4, "d1");
15431 orc_program_add_source (p, 4, "s1");
15432 orc_program_add_constant (p, 4, 0x000000ff, "c1");
15433 orc_program_add_temporary (p, 8, "t1");
15434 orc_program_add_temporary (p, 8, "t2");
15435 orc_program_add_temporary (p, 8, "t3");
15436 orc_program_add_temporary (p, 8, "t4");
15437 orc_program_add_temporary (p, 8, "t5");
15438 orc_program_add_temporary (p, 8, "t6");
15439 orc_program_add_temporary (p, 4, "t7");
15440 orc_program_add_temporary (p, 4, "t8");
15442 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
15443 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
15444 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15445 orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1);
15446 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T6, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
15447 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1);
15448 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T7, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1);
15449 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
15450 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T5, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15451 orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1);
15452 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T4, ORC_VAR_T1, ORC_VAR_T5, ORC_VAR_D1);
15453 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15454 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T8, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15455 orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T7, ORC_VAR_T8, ORC_VAR_D1);
15458 printf (" cycles (emulate) : %g\n",
15459 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
15462 ret = orc_test_compare_output_backup (p);
15465 } else if (!quiet) {
15466 printf (" backup function : PASSED\n");
15470 printf (" cycles (backup) : %g\n",
15471 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
15474 ret = orc_test_compare_output (p);
15475 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
15476 printf (" compiled function: COMPILE FAILED\n");
15479 } else if (!quiet) {
15480 printf (" compiled function: PASSED\n");
15484 printf (" cycles (compiled): %g\n",
15485 orc_test_performance_full (p, 0, NULL));
15488 orc_program_free (p);
15491 /* orc_code_combine_add_ca */
15493 OrcProgram *p = NULL;
15496 if (!quiet) printf ("orc_code_combine_add_ca:\n");
15497 p = orc_program_new ();
15498 orc_program_set_name (p, "orc_code_combine_add_ca");
15499 orc_program_set_backup_function (p, _backup_orc_code_combine_add_ca);
15500 orc_program_add_destination (p, 4, "d1");
15501 orc_program_add_source (p, 4, "s1");
15502 orc_program_add_source (p, 4, "s2");
15503 orc_program_add_temporary (p, 8, "t1");
15504 orc_program_add_temporary (p, 8, "t2");
15505 orc_program_add_temporary (p, 4, "t3");
15507 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
15508 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T2, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
15509 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
15510 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15511 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15512 orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_D1);
15515 printf (" cycles (emulate) : %g\n",
15516 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
15519 ret = orc_test_compare_output_backup (p);
15522 } else if (!quiet) {
15523 printf (" backup function : PASSED\n");
15527 printf (" cycles (backup) : %g\n",
15528 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
15531 ret = orc_test_compare_output (p);
15532 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
15533 printf (" compiled function: COMPILE FAILED\n");
15536 } else if (!quiet) {
15537 printf (" compiled function: PASSED\n");
15541 printf (" cycles (compiled): %g\n",
15542 orc_test_performance_full (p, 0, NULL));
15545 orc_program_free (p);
15548 /* orc_code_combine_add_ca_n */
15550 OrcProgram *p = NULL;
15553 if (!quiet) printf ("orc_code_combine_add_ca_n:\n");
15554 p = orc_program_new ();
15555 orc_program_set_name (p, "orc_code_combine_add_ca_n");
15556 orc_program_set_backup_function (p, _backup_orc_code_combine_add_ca_n);
15557 orc_program_add_destination (p, 4, "d1");
15558 orc_program_add_source (p, 4, "s1");
15560 orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_D1);
15563 printf (" cycles (emulate) : %g\n",
15564 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
15567 ret = orc_test_compare_output_backup (p);
15570 } else if (!quiet) {
15571 printf (" backup function : PASSED\n");
15575 printf (" cycles (backup) : %g\n",
15576 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
15579 ret = orc_test_compare_output (p);
15580 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
15581 printf (" compiled function: COMPILE FAILED\n");
15584 } else if (!quiet) {
15585 printf (" compiled function: PASSED\n");
15589 printf (" cycles (compiled): %g\n",
15590 orc_test_performance_full (p, 0, NULL));
15593 orc_program_free (p);
15596 /* orc_code_combine_over_ca */
15598 OrcProgram *p = NULL;
15601 if (!quiet) printf ("orc_code_combine_over_ca:\n");
15602 p = orc_program_new ();
15603 orc_program_set_name (p, "orc_code_combine_over_ca");
15604 orc_program_set_backup_function (p, _backup_orc_code_combine_over_ca);
15605 orc_program_add_destination (p, 4, "d1");
15606 orc_program_add_source (p, 4, "s1");
15607 orc_program_add_source (p, 4, "s2");
15608 orc_program_add_constant (p, 4, 0x000000ff, "c1");
15609 orc_program_add_temporary (p, 8, "t1");
15610 orc_program_add_temporary (p, 8, "t2");
15611 orc_program_add_temporary (p, 4, "t3");
15612 orc_program_add_temporary (p, 8, "t4");
15613 orc_program_add_temporary (p, 8, "t5");
15614 orc_program_add_temporary (p, 8, "t6");
15615 orc_program_add_temporary (p, 8, "t7");
15616 orc_program_add_temporary (p, 4, "t8");
15618 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T6, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
15619 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
15620 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T7, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1);
15621 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_T5, ORC_VAR_D1);
15622 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1);
15623 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T8, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1);
15624 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_T7, ORC_VAR_D1);
15625 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1);
15626 orc_program_append_2 (p, "loadl", 0, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
15627 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
15628 orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1);
15629 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
15630 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15631 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15632 orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T8, ORC_VAR_D1);
15635 printf (" cycles (emulate) : %g\n",
15636 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
15639 ret = orc_test_compare_output_backup (p);
15642 } else if (!quiet) {
15643 printf (" backup function : PASSED\n");
15647 printf (" cycles (backup) : %g\n",
15648 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
15651 ret = orc_test_compare_output (p);
15652 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
15653 printf (" compiled function: COMPILE FAILED\n");
15656 } else if (!quiet) {
15657 printf (" compiled function: PASSED\n");
15661 printf (" cycles (compiled): %g\n",
15662 orc_test_performance_full (p, 0, NULL));
15665 orc_program_free (p);
15668 /* orc_code_combine_over_ca_n */
15670 OrcProgram *p = NULL;
15673 if (!quiet) printf ("orc_code_combine_over_ca_n:\n");
15674 p = orc_program_new ();
15675 orc_program_set_name (p, "orc_code_combine_over_ca_n");
15676 orc_program_set_backup_function (p, _backup_orc_code_combine_over_ca_n);
15677 orc_program_add_destination (p, 4, "d1");
15678 orc_program_add_source (p, 4, "s1");
15679 orc_program_add_constant (p, 4, 0x000000ff, "c1");
15680 orc_program_add_temporary (p, 8, "t1");
15681 orc_program_add_temporary (p, 8, "t2");
15682 orc_program_add_temporary (p, 4, "t3");
15683 orc_program_add_temporary (p, 8, "t4");
15684 orc_program_add_temporary (p, 8, "t5");
15685 orc_program_add_temporary (p, 8, "t6");
15686 orc_program_add_temporary (p, 8, "t7");
15687 orc_program_add_temporary (p, 4, "t8");
15689 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T6, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
15690 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T7, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1);
15691 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T8, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1);
15692 orc_program_append_2 (p, "copyw", 2, ORC_VAR_T5, ORC_VAR_T7, ORC_VAR_D1, ORC_VAR_D1);
15693 orc_program_append_2 (p, "loadl", 0, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
15694 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
15695 orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1);
15696 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
15697 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15698 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15699 orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T8, ORC_VAR_D1);
15702 printf (" cycles (emulate) : %g\n",
15703 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
15706 ret = orc_test_compare_output_backup (p);
15709 } else if (!quiet) {
15710 printf (" backup function : PASSED\n");
15714 printf (" cycles (backup) : %g\n",
15715 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
15718 ret = orc_test_compare_output (p);
15719 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
15720 printf (" compiled function: COMPILE FAILED\n");
15723 } else if (!quiet) {
15724 printf (" compiled function: PASSED\n");
15728 printf (" cycles (compiled): %g\n",
15729 orc_test_performance_full (p, 0, NULL));
15732 orc_program_free (p);
15735 /* orc_composite_over_8888_8_8888_line */
15737 OrcProgram *p = NULL;
15740 if (!quiet) printf ("orc_composite_over_8888_8_8888_line:\n");
15741 p = orc_program_new ();
15742 orc_program_set_name (p, "orc_composite_over_8888_8_8888_line");
15743 orc_program_set_backup_function (p, _backup_orc_composite_over_8888_8_8888_line);
15744 orc_program_add_destination (p, 4, "d1");
15745 orc_program_add_source (p, 4, "s1");
15746 orc_program_add_source (p, 1, "s2");
15747 orc_program_add_constant (p, 4, 0x000000ff, "c1");
15748 orc_program_add_temporary (p, 8, "t1");
15749 orc_program_add_temporary (p, 8, "t2");
15750 orc_program_add_temporary (p, 4, "t3");
15751 orc_program_add_temporary (p, 4, "t4");
15752 orc_program_add_temporary (p, 4, "t5");
15753 orc_program_add_temporary (p, 8, "t6");
15755 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
15756 orc_program_append_2 (p, "splatbl", 0, ORC_VAR_T5, ORC_VAR_S2, ORC_VAR_D1, ORC_VAR_D1);
15757 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T2, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1);
15758 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_T2, ORC_VAR_D1);
15759 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15760 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15761 orc_program_append_2 (p, "loadl", 0, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
15762 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T6, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
15763 orc_program_append_2 (p, "xorw", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C1, ORC_VAR_D1);
15764 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15765 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T6, ORC_VAR_T2, ORC_VAR_D1);
15766 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15767 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T4, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15768 orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1);
15771 printf (" cycles (emulate) : %g\n",
15772 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
15775 ret = orc_test_compare_output_backup (p);
15778 } else if (!quiet) {
15779 printf (" backup function : PASSED\n");
15783 printf (" cycles (backup) : %g\n",
15784 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
15787 ret = orc_test_compare_output (p);
15788 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
15789 printf (" compiled function: COMPILE FAILED\n");
15792 } else if (!quiet) {
15793 printf (" compiled function: PASSED\n");
15797 printf (" cycles (compiled): %g\n",
15798 orc_test_performance_full (p, 0, NULL));
15801 orc_program_free (p);
15804 /* orc_composite_over_n_8888_8888_ca_2d */
15806 OrcProgram *p = NULL;
15809 if (!quiet) printf ("orc_composite_over_n_8888_8888_ca_2d:\n");
15810 p = orc_program_new ();
15811 orc_program_set_name (p, "orc_composite_over_n_8888_8888_ca_2d");
15812 orc_program_set_backup_function (p, _backup_orc_composite_over_n_8888_8888_ca_2d);
15813 orc_program_add_destination (p, 4, "d1");
15814 orc_program_add_source (p, 4, "s1");
15815 orc_program_add_constant (p, 4, 0x000000ff, "c1");
15816 orc_program_add_parameter (p, 4, "p1");
15817 orc_program_add_temporary (p, 8, "t1");
15818 orc_program_add_temporary (p, 8, "t2");
15819 orc_program_add_temporary (p, 4, "t3");
15820 orc_program_add_temporary (p, 8, "t4");
15821 orc_program_add_temporary (p, 8, "t5");
15822 orc_program_add_temporary (p, 8, "t6");
15823 orc_program_add_temporary (p, 8, "t7");
15824 orc_program_add_temporary (p, 4, "t8");
15826 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T6, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1);
15827 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T5, ORC_VAR_S1, ORC_VAR_D1, ORC_VAR_D1);
15828 orc_program_append_2 (p, "splatw3q", 0, ORC_VAR_T7, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1);
15829 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_T5, ORC_VAR_D1);
15830 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T6, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1);
15831 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T8, ORC_VAR_T6, ORC_VAR_D1, ORC_VAR_D1);
15832 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_T7, ORC_VAR_D1);
15833 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_D1, ORC_VAR_D1);
15834 orc_program_append_2 (p, "loadl", 0, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
15835 orc_program_append_2 (p, "convubw", 2, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1);
15836 orc_program_append_2 (p, "xorw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_D1);
15837 orc_program_append_2 (p, "mullw", 2, ORC_VAR_T1, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
15838 orc_program_append_2 (p, "div255w", 2, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15839 orc_program_append_2 (p, "convwb", 2, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
15840 orc_program_append_2 (p, "addusb", 2, ORC_VAR_D1, ORC_VAR_T3, ORC_VAR_T8, ORC_VAR_D1);
15843 printf (" cycles (emulate) : %g\n",
15844 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
15847 ret = orc_test_compare_output_backup (p);
15850 } else if (!quiet) {
15851 printf (" backup function : PASSED\n");
15855 printf (" cycles (backup) : %g\n",
15856 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
15859 ret = orc_test_compare_output (p);
15860 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
15861 printf (" compiled function: COMPILE FAILED\n");
15864 } else if (!quiet) {
15865 printf (" compiled function: PASSED\n");
15869 printf (" cycles (compiled): %g\n",
15870 orc_test_performance_full (p, 0, NULL));
15873 orc_program_free (p);
15876 /* cogorc_resample_horiz_1tap */
15878 OrcProgram *p = NULL;
15881 if (!quiet) printf ("cogorc_resample_horiz_1tap:\n");
15882 p = orc_program_new ();
15883 orc_program_set_name (p, "cogorc_resample_horiz_1tap");
15884 orc_program_set_backup_function (p, _backup_cogorc_resample_horiz_1tap);
15885 orc_program_add_destination (p, 1, "d1");
15886 orc_program_add_source (p, 1, "s1");
15887 orc_program_add_parameter (p, 2, "p1");
15888 orc_program_add_parameter (p, 2, "p2");
15890 orc_program_append_2 (p, "ldresnearb", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_P1, ORC_VAR_P2);
15893 printf (" cycles (emulate) : %g\n",
15894 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
15897 ret = orc_test_compare_output_backup (p);
15900 } else if (!quiet) {
15901 printf (" backup function : PASSED\n");
15905 printf (" cycles (backup) : %g\n",
15906 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
15909 ret = orc_test_compare_output (p);
15910 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
15911 printf (" compiled function: COMPILE FAILED\n");
15914 } else if (!quiet) {
15915 printf (" compiled function: PASSED\n");
15919 printf (" cycles (compiled): %g\n",
15920 orc_test_performance_full (p, 0, NULL));
15923 orc_program_free (p);
15926 /* cogorc_resample_horiz_2tap */
15928 OrcProgram *p = NULL;
15931 if (!quiet) printf ("cogorc_resample_horiz_2tap:\n");
15932 p = orc_program_new ();
15933 orc_program_set_name (p, "cogorc_resample_horiz_2tap");
15934 orc_program_set_backup_function (p, _backup_cogorc_resample_horiz_2tap);
15935 orc_program_add_destination (p, 1, "d1");
15936 orc_program_add_source (p, 1, "s1");
15937 orc_program_add_parameter (p, 4, "p1");
15938 orc_program_add_parameter (p, 4, "p2");
15940 orc_program_append_2 (p, "ldreslinb", 0, ORC_VAR_D1, ORC_VAR_S1, ORC_VAR_P1, ORC_VAR_P2);
15943 printf (" cycles (emulate) : %g\n",
15944 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
15947 ret = orc_test_compare_output_backup (p);
15950 } else if (!quiet) {
15951 printf (" backup function : PASSED\n");
15955 printf (" cycles (backup) : %g\n",
15956 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
15959 ret = orc_test_compare_output (p);
15960 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
15961 printf (" compiled function: COMPILE FAILED\n");
15964 } else if (!quiet) {
15965 printf (" compiled function: PASSED\n");
15969 printf (" cycles (compiled): %g\n",
15970 orc_test_performance_full (p, 0, NULL));
15973 orc_program_free (p);
15976 /* test_float_constant_1 */
15978 OrcProgram *p = NULL;
15981 if (!quiet) printf ("test_float_constant_1:\n");
15982 p = orc_program_new ();
15983 orc_program_set_name (p, "test_float_constant_1");
15984 orc_program_set_backup_function (p, _backup_test_float_constant_1);
15985 orc_program_add_destination (p, 4, "d1");
15986 orc_program_add_constant (p, 4, 0x40000000, "c1");
15988 orc_program_append_2 (p, "copyl", 0, ORC_VAR_D1, ORC_VAR_C1, ORC_VAR_D1, ORC_VAR_D1);
15991 printf (" cycles (emulate) : %g\n",
15992 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
15995 ret = orc_test_compare_output_backup (p);
15998 } else if (!quiet) {
15999 printf (" backup function : PASSED\n");
16003 printf (" cycles (backup) : %g\n",
16004 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
16007 ret = orc_test_compare_output (p);
16008 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
16009 printf (" compiled function: COMPILE FAILED\n");
16012 } else if (!quiet) {
16013 printf (" compiled function: PASSED\n");
16017 printf (" cycles (compiled): %g\n",
16018 orc_test_performance_full (p, 0, NULL));
16021 orc_program_free (p);
16024 /* test_float_constant_2 */
16026 OrcProgram *p = NULL;
16029 if (!quiet) printf ("test_float_constant_2:\n");
16030 p = orc_program_new ();
16031 orc_program_set_name (p, "test_float_constant_2");
16032 orc_program_set_backup_function (p, _backup_test_float_constant_2);
16033 orc_program_add_destination (p, 4, "d1");
16034 orc_program_add_constant (p, 4, 0x40000000, "c1");
16036 orc_program_append_2 (p, "copyl", 0, ORC_VAR_D1, ORC_VAR_C1, ORC_VAR_D1, ORC_VAR_D1);
16039 printf (" cycles (emulate) : %g\n",
16040 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
16043 ret = orc_test_compare_output_backup (p);
16046 } else if (!quiet) {
16047 printf (" backup function : PASSED\n");
16051 printf (" cycles (backup) : %g\n",
16052 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
16055 ret = orc_test_compare_output (p);
16056 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
16057 printf (" compiled function: COMPILE FAILED\n");
16060 } else if (!quiet) {
16061 printf (" compiled function: PASSED\n");
16065 printf (" cycles (compiled): %g\n",
16066 orc_test_performance_full (p, 0, NULL));
16069 orc_program_free (p);
16072 /* convert_fc32_to_int32 */
16074 OrcProgram *p = NULL;
16077 if (!quiet) printf ("convert_fc32_to_int32:\n");
16078 p = orc_program_new ();
16079 orc_program_set_name (p, "convert_fc32_to_int32");
16080 orc_program_set_backup_function (p, _backup_convert_fc32_to_int32);
16081 orc_program_add_destination (p, 4, "d1");
16082 orc_program_add_source (p, 8, "s1");
16083 orc_program_add_constant (p, 4, 0x46fffe00, "c1");
16084 orc_program_add_temporary (p, 8, "t1");
16085 orc_program_add_temporary (p, 8, "t2");
16087 orc_program_append_2 (p, "mulf", 1, ORC_VAR_T1, ORC_VAR_S1, ORC_VAR_C1, ORC_VAR_D1);
16088 orc_program_append_2 (p, "convfl", 1, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
16089 orc_program_append_2 (p, "convlw", 1, ORC_VAR_D1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1);
16092 printf (" cycles (emulate) : %g\n",
16093 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
16096 ret = orc_test_compare_output_backup (p);
16099 } else if (!quiet) {
16100 printf (" backup function : PASSED\n");
16104 printf (" cycles (backup) : %g\n",
16105 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
16108 ret = orc_test_compare_output (p);
16109 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
16110 printf (" compiled function: COMPILE FAILED\n");
16113 } else if (!quiet) {
16114 printf (" compiled function: PASSED\n");
16118 printf (" cycles (compiled): %g\n",
16119 orc_test_performance_full (p, 0, NULL));
16122 orc_program_free (p);
16127 OrcProgram *p = NULL;
16130 if (!quiet) printf ("param64:\n");
16131 p = orc_program_new ();
16132 orc_program_set_name (p, "param64");
16133 orc_program_set_backup_function (p, _backup_param64);
16134 orc_program_add_destination (p, 8, "d1");
16135 orc_program_add_parameter (p, 8, "p1");
16137 orc_program_append_2 (p, "copyq", 0, ORC_VAR_D1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1);
16140 printf (" cycles (emulate) : %g\n",
16141 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
16144 ret = orc_test_compare_output_backup (p);
16147 } else if (!quiet) {
16148 printf (" backup function : PASSED\n");
16152 printf (" cycles (backup) : %g\n",
16153 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
16156 ret = orc_test_compare_output (p);
16157 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
16158 printf (" compiled function: COMPILE FAILED\n");
16161 } else if (!quiet) {
16162 printf (" compiled function: PASSED\n");
16166 printf (" cycles (compiled): %g\n",
16167 orc_test_performance_full (p, 0, NULL));
16170 orc_program_free (p);
16175 OrcProgram *p = NULL;
16178 if (!quiet) printf ("const64:\n");
16179 p = orc_program_new ();
16180 orc_program_set_name (p, "const64");
16181 orc_program_set_backup_function (p, _backup_const64);
16182 orc_program_add_destination (p, 8, "d1");
16183 orc_program_add_constant_int64 (p, 8, 0x0123456789abcdefULL, "c1");
16185 orc_program_append_2 (p, "copyq", 0, ORC_VAR_D1, ORC_VAR_C1, ORC_VAR_D1, ORC_VAR_D1);
16188 printf (" cycles (emulate) : %g\n",
16189 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
16192 ret = orc_test_compare_output_backup (p);
16195 } else if (!quiet) {
16196 printf (" backup function : PASSED\n");
16200 printf (" cycles (backup) : %g\n",
16201 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
16204 ret = orc_test_compare_output (p);
16205 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
16206 printf (" compiled function: COMPILE FAILED\n");
16209 } else if (!quiet) {
16210 printf (" compiled function: PASSED\n");
16214 printf (" cycles (compiled): %g\n",
16215 orc_test_performance_full (p, 0, NULL));
16218 orc_program_free (p);
16223 OrcProgram *p = NULL;
16226 if (!quiet) printf ("param64_2:\n");
16227 p = orc_program_new ();
16228 orc_program_set_name (p, "param64_2");
16229 orc_program_set_backup_function (p, _backup_param64_2);
16230 orc_program_add_destination (p, 8, "d1");
16231 orc_program_add_parameter_int64 (p, 8, "p1");
16232 orc_program_add_temporary (p, 8, "t1");
16234 orc_program_append_2 (p, "loadpq", 0, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1);
16235 orc_program_append_2 (p, "copyq", 0, ORC_VAR_D1, ORC_VAR_T1, ORC_VAR_D1, ORC_VAR_D1);
16238 printf (" cycles (emulate) : %g\n",
16239 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
16242 ret = orc_test_compare_output_backup (p);
16245 } else if (!quiet) {
16246 printf (" backup function : PASSED\n");
16250 printf (" cycles (backup) : %g\n",
16251 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
16254 ret = orc_test_compare_output (p);
16255 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
16256 printf (" compiled function: COMPILE FAILED\n");
16259 } else if (!quiet) {
16260 printf (" compiled function: PASSED\n");
16264 printf (" cycles (compiled): %g\n",
16265 orc_test_performance_full (p, 0, NULL));
16268 orc_program_free (p);
16271 /* pa_volume_s16ne_orc_2ch */
16273 OrcProgram *p = NULL;
16276 if (!quiet) printf ("pa_volume_s16ne_orc_2ch:\n");
16277 p = orc_program_new ();
16278 orc_program_set_name (p, "pa_volume_s16ne_orc_2ch");
16279 orc_program_set_backup_function (p, _backup_pa_volume_s16ne_orc_2ch);
16280 orc_program_add_destination (p, 4, "d1");
16281 orc_program_add_constant (p, 4, 0x00000000, "c1");
16282 orc_program_add_constant (p, 4, 0x00000010, "c2");
16283 orc_program_add_parameter_int64 (p, 8, "p1");
16284 orc_program_add_temporary (p, 8, "t1");
16285 orc_program_add_temporary (p, 8, "t2");
16286 orc_program_add_temporary (p, 8, "t3");
16287 orc_program_add_temporary (p, 8, "t4");
16288 orc_program_add_temporary (p, 8, "t5");
16290 orc_program_append_2 (p, "loadpq", 0, ORC_VAR_T1, ORC_VAR_P1, ORC_VAR_D1, ORC_VAR_D1);
16291 orc_program_append_2 (p, "convuwl", 1, ORC_VAR_T2, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
16292 orc_program_append_2 (p, "convswl", 1, ORC_VAR_T3, ORC_VAR_D1, ORC_VAR_D1, ORC_VAR_D1);
16293 orc_program_append_2 (p, "cmpgtsw", 2, ORC_VAR_T5, ORC_VAR_C1, ORC_VAR_T2, ORC_VAR_D1);
16294 orc_program_append_2 (p, "andw", 2, ORC_VAR_T5, ORC_VAR_T5, ORC_VAR_T1, ORC_VAR_D1);
16295 orc_program_append_2 (p, "mulhuw", 2, ORC_VAR_T4, ORC_VAR_T2, ORC_VAR_T1, ORC_VAR_D1);
16296 orc_program_append_2 (p, "subl", 1, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T5, ORC_VAR_D1);
16297 orc_program_append_2 (p, "shrul", 1, ORC_VAR_T1, ORC_VAR_T1, ORC_VAR_C2, ORC_VAR_D1);
16298 orc_program_append_2 (p, "mulll", 1, ORC_VAR_T3, ORC_VAR_T3, ORC_VAR_T1, ORC_VAR_D1);
16299 orc_program_append_2 (p, "addl", 1, ORC_VAR_T4, ORC_VAR_T4, ORC_VAR_T3, ORC_VAR_D1);
16300 orc_program_append_2 (p, "convssslw", 1, ORC_VAR_D1, ORC_VAR_T4, ORC_VAR_D1, ORC_VAR_D1);
16303 printf (" cycles (emulate) : %g\n",
16304 orc_test_performance_full (p, ORC_TEST_FLAGS_EMULATE, NULL));
16307 ret = orc_test_compare_output_backup (p);
16310 } else if (!quiet) {
16311 printf (" backup function : PASSED\n");
16315 printf (" cycles (backup) : %g\n",
16316 orc_test_performance_full (p, ORC_TEST_FLAGS_BACKUP, NULL));
16319 ret = orc_test_compare_output (p);
16320 if (ret == ORC_TEST_INDETERMINATE && !quiet) {
16321 printf (" compiled function: COMPILE FAILED\n");
16324 } else if (!quiet) {
16325 printf (" compiled function: PASSED\n");
16329 printf (" cycles (compiled): %g\n",
16330 orc_test_performance_full (p, 0, NULL));
16333 orc_program_free (p);