diff options
author | Matt Turner <mattst88@gmail.com> | 2012-02-24 12:32:03 -0500 |
---|---|---|
committer | Matt Turner <mattst88@gmail.com> | 2012-04-27 13:34:45 -0400 |
commit | 084e3f2f4be900041cc35830359606addc1fc3be (patch) | |
tree | 660136058f6e4da15629b21e374aa7b44d4bbca9 | |
parent | e24c1c849d29f43dc6e50e1f15102709059b40f8 (diff) |
mmx: add store function and use it in add_8888_8888
-rw-r--r-- | pixman/pixman-mmx.c | 16 |
1 files changed, 11 insertions, 5 deletions
diff --git a/pixman/pixman-mmx.c b/pixman/pixman-mmx.c index 9fd1a76f..36cf2cd3 100644 --- a/pixman/pixman-mmx.c +++ b/pixman/pixman-mmx.c @@ -375,10 +375,16 @@ pack8888 (__m64 lo, __m64 hi) } static force_inline void +store (uint32_t *dest, __m64 v) +{ + *dest = _mm_cvtsi64_si32 (v); +} + +static force_inline void store8888 (uint32_t *dest, __m64 v) { v = pack8888 (v, _mm_setzero_si64()); - *dest = _mm_cvtsi64_si32 (v); + store (dest, v); } /* Expand 16 bits positioned at @pos (0-3) of a mmx register into @@ -2858,8 +2864,8 @@ mmx_composite_add_8888_8888 (pixman_implementation_t *imp, while (w && (unsigned long)dst & 7) { - *dst = _mm_cvtsi64_si32 (_mm_adds_pu8 (_mm_cvtsi32_si64 (*src), - _mm_cvtsi32_si64 (*dst))); + store (dst, _mm_adds_pu8 (_mm_cvtsi32_si64 (*src), + _mm_cvtsi32_si64 (*dst))); dst++; src++; w--; @@ -2876,8 +2882,8 @@ mmx_composite_add_8888_8888 (pixman_implementation_t *imp, if (w) { - *dst = _mm_cvtsi64_si32 (_mm_adds_pu8 (_mm_cvtsi32_si64 (*src), - _mm_cvtsi32_si64 (*dst))); + store (dst, _mm_adds_pu8 (_mm_cvtsi32_si64 (*src), + _mm_cvtsi32_si64 (*dst))); } } |