Home | History | Annotate | Download | only in tests

Lines Matching defs:pDst

7 static void test_pabsb_c(char *pDst, char *pSrc, int xmm)
12 pDst[ i ] = pSrc[ i ] > 0 ? pSrc[i ] : -pSrc[ i ];
15 static void test_pabsw_c(short *pDst, short *pSrc, int xmm)
20 pDst[ i ] = pSrc[ i ] > 0 ? pSrc[i ] : -pSrc[ i ];
23 static void test_pabsd_c(int *pDst, int *pSrc, int xmm)
28 pDst[ i ] = pSrc[ i ] > 0 ? pSrc[i ] : -pSrc[ i ];
31 static void test_psignb_c(char *pDst, char *pSrc, int xmm)
36 pDst[ i ] = pSrc[i] ? ( pSrc[ i ] >= 0 ? pDst[i ] : -pDst[ i ] ) : 0;
39 static void test_psignw_c(short *pDst, short *pSrc, int xmm)
44 pDst[ i ] = pSrc[i] ? ( pSrc[ i ] >= 0 ? pDst[i ] : -pDst[ i ] ) : 0;
47 static void test_psignd_c(int *pDst, int *pSrc, int xmm)
52 pDst[ i ] = pSrc[i] ? ( pSrc[ i ] >= 0 ? pDst[i ] : -pDst[ i ] ) : 0;
55 static void test_phaddw_c(unsigned short *pDst,unsigned short *pSrc, int xmm)
60 pDst[ i ] = pDst[ i * 2 ] + pDst[ i * 2 + 1 ];
63 pDst[ i + (2 << xmm) ] = pSrc[ i * 2 ] + pSrc[ i * 2 + 1 ];
66 static void test_phaddsw_c(short *pDst, short *pSrc, int xmm)
71 pDst[ i ] = SAT( pDst[ i * 2 ] + pDst[ i * 2 + 1 ] );
74 pDst[ i + (2 << xmm) ] = SAT( pSrc[ i * 2 ] + pSrc[ i * 2 + 1 ] );
77 static void test_phaddd_c(unsigned int *pDst, unsigned int *pSrc, int xmm)
82 pDst[ i ] = pDst[ i * 2 ] + pDst[ i * 2 + 1 ];
85 pDst[ i + (1 << xmm) ] = pSrc[ i * 2 ] + pSrc[ i * 2 + 1 ];
88 static void test_phsubw_c(unsigned short *pDst,unsigned short *pSrc, int xmm)
93 pDst[ i ] = pDst[ i * 2 ] - pDst[ i * 2 + 1 ];
96 pDst[ i + (2 << xmm) ] = pSrc[ i * 2 ] - pSrc[ i * 2 + 1 ];
99 static void test_phsubsw_c(short *pDst, short *pSrc, int xmm)
104 pDst[ i ] = SAT( pDst[ i * 2 ] - pDst[ i * 2 + 1 ] );
107 pDst[ i + (2 << xmm) ] = SAT( pSrc[ i * 2 ] - pSrc[ i * 2 + 1 ] );
110 static void test_phsubd_c(unsigned int *pDst, unsigned int *pSrc, int xmm)
115 pDst[ i ] = pDst[ i * 2 ] - pDst[ i * 2 + 1 ];
118 pDst[ i + (1 << xmm) ] = pSrc[ i * 2 ] - pSrc[ i * 2 + 1 ];
121 static void test_pmulhrsw_c(short *pDst, short *pSrc, int xmm)
127 int a = pSrc[ i ] * pDst[ i ];
128 pDst[i] = (short)(((a >> 14) + 1) >> 1);
132 static void test_pmaddubsw_c(unsigned char *pDst, signed char *pSrc, int xmm)
138 int a = pSrc[ 2 * i ] * pDst[ 2 * i ] + pSrc[ 2 * i + 1 ] * pDst[ 2 * i + 1];
139 ((signed short *)pDst)[i] = SAT(a);
143 static void test_pshufb_c(unsigned char *pDst, unsigned char *pSrc, int xmm)
148 memcpy( bla, pDst, ( 8 << xmm ) );
151 pDst[ i ] = (pSrc[ i ] >= 0x80) ? 0 : bla[ pSrc[ i ] & ((1 << (xmm + 3)) - 1) ];
154 static void test_palignr_c(unsigned char *pDst, unsigned char *pSrc, int xmm)
159 pDst[ i + (8 << xmm) - 3 ] = pDst[ i ];
162 pDst[ i - 3 ] = pSrc[ i ];
165 static void randomize_args(unsigned char *pDst, unsigned char *pSrc)
170 pDst[ j ] = rand() % 256;
175 #define CHECK_FUNCTION(instruction, extension, additionnal, pDst, pSrc) \
179 randomize_args( pDst, pSrc ); \
180 memcpy( temp_dst, pDst, 16 ); \
182 test_##instruction##_c( pDst, pSrc, additionnal ); \
184 assert( !memcmp( pDst, temp_dst, (8 << additionnal) ) ); \
188 CHECK_FUNCTION(instruction, mmx, 0, pDst, pSrc); \
189 CHECK_FUNCTION(instruction, xmm, 1, pDst, pSrc)
195 void *pDst = malloc(16);