1 /* { dg-do compile } */
2 /* { dg-options "-O2 -mcpu=ev67" } */
5 typedef unsigned int CARD32
;
6 typedef unsigned short CARD16
;
7 typedef unsigned char CARD8
;
8 typedef struct _Picture
*PicturePtr
;
10 typedef unsigned long __m64
;
11 extern __m64
load8888 (__m64
);
12 static __inline __m64
_mm_adds_pu8(__m64 __m1
, __m64 __m2
)
14 return __m1
+ __builtin_alpha_minsb8(__m2
, ~__m1
);
16 static __inline __m64
_mm_packs_pu16(__m64 __m1
, __m64 __m2
)
18 __m1
= __builtin_alpha_minuw4(__m1
, 0x00ff00ff00ff00ff);
19 __m2
= __builtin_alpha_minuw4(__m2
, 0x00ff00ff00ff00ff);
20 return __m1
| (__m2
<< 32);
22 typedef unsigned long long ullong
;
23 static __inline__ __m64
pix_multiply(__m64 a
)
28 static __inline__ __m64
over(__m64 src
, __m64 srca
, __m64 dest
)
30 return _mm_adds_pu8(src
, pix_multiply(dest
));
33 void fbCompositeSolid_nx8888mmx(CARD8 op
, PicturePtr pSrc
, PicturePtr pMask
,
34 INT16 yDst
, CARD16 width
, CARD16 height
)
37 CARD32
*dstLine
, *dst
;
45 while (w
&& (unsigned long) dst
& 7) {
46 *dst
= _mm_packs_pu16(_mm_adds_pu8(vsrc
, load8888(*dst
)),
52 *(__m64
*) dst
= _mm_packs_pu16(dest0
, dest1
);
56 *dst
= _mm_packs_pu16(_mm_adds_pu8(vsrc
, pix_multiply(0)), 0);