aboutsummaryrefslogtreecommitdiffhomepage
diff options
context:
space:
mode:
-rw-r--r--src/opts/SkUtils_opts_SSE2.cpp18
1 files changed, 10 insertions, 8 deletions
diff --git a/src/opts/SkUtils_opts_SSE2.cpp b/src/opts/SkUtils_opts_SSE2.cpp
index 08e4f66948..e22044d39d 100644
--- a/src/opts/SkUtils_opts_SSE2.cpp
+++ b/src/opts/SkUtils_opts_SSE2.cpp
@@ -25,10 +25,11 @@ void sk_memset16_SSE2(uint16_t *dst, uint16_t value, int count)
__m128i *d = reinterpret_cast<__m128i*>(dst);
__m128i value_wide = _mm_set1_epi16(value);
while (count >= 32) {
- _mm_store_si128(d++, value_wide);
- _mm_store_si128(d++, value_wide);
- _mm_store_si128(d++, value_wide);
- _mm_store_si128(d++, value_wide);
+ _mm_store_si128(d , value_wide);
+ _mm_store_si128(d + 1, value_wide);
+ _mm_store_si128(d + 2, value_wide);
+ _mm_store_si128(d + 3, value_wide);
+ d += 4;
count -= 32;
}
dst = reinterpret_cast<uint16_t*>(d);
@@ -54,10 +55,11 @@ void sk_memset32_SSE2(uint32_t *dst, uint32_t value, int count)
__m128i *d = reinterpret_cast<__m128i*>(dst);
__m128i value_wide = _mm_set1_epi32(value);
while (count >= 16) {
- _mm_store_si128(d++, value_wide);
- _mm_store_si128(d++, value_wide);
- _mm_store_si128(d++, value_wide);
- _mm_store_si128(d++, value_wide);
+ _mm_store_si128(d , value_wide);
+ _mm_store_si128(d + 1, value_wide);
+ _mm_store_si128(d + 2, value_wide);
+ _mm_store_si128(d + 3, value_wide);
+ d += 4;
count -= 16;
}
dst = reinterpret_cast<uint32_t*>(d);