Index: src/opts/SkUtils_opts_SSE2.cpp |
diff --git a/src/opts/SkUtils_opts_SSE2.cpp b/src/opts/SkUtils_opts_SSE2.cpp |
index 08e4f669483b0a6c66931cdd916c781d45bec7a9..e22044d39d36821726cb95ff3e1605e8976ec29c 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); |