Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(28)

Side by Side Diff: src/opts/SkUtils_opts_SSE2.cpp

Issue 1256763003: Remove sk_memcpy32 (Closed) Base URL: https://skia.googlesource.com/skia.git@master
Patch Set: Created 5 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « src/opts/SkUtils_opts_SSE2.h ('k') | src/opts/SkUtils_opts_arm.cpp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 /* 1 /*
2 * Copyright 2009 The Android Open Source Project 2 * Copyright 2009 The Android Open Source Project
3 * 3 *
4 * Use of this source code is governed by a BSD-style license that can be 4 * Use of this source code is governed by a BSD-style license that can be
5 * found in the LICENSE file. 5 * found in the LICENSE file.
6 */ 6 */
7 7
8 #include <emmintrin.h> 8 #include <emmintrin.h>
9 #include "SkUtils_opts_SSE2.h" 9 #include "SkUtils_opts_SSE2.h"
10 10
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after
60 d += 4; 60 d += 4;
61 count -= 16; 61 count -= 16;
62 } 62 }
63 dst = reinterpret_cast<uint32_t*>(d); 63 dst = reinterpret_cast<uint32_t*>(d);
64 } 64 }
65 while (count > 0) { 65 while (count > 0) {
66 *dst++ = value; 66 *dst++ = value;
67 --count; 67 --count;
68 } 68 }
69 } 69 }
70
71 void sk_memcpy32_SSE2(uint32_t *dst, const uint32_t *src, int count)
72 {
73 if (count >= 16) {
74 while (((size_t)dst) & 0x0F) {
75 *dst++ = *src++;
76 --count;
77 }
78 __m128i *dst128 = reinterpret_cast<__m128i*>(dst);
79 const __m128i *src128 = reinterpret_cast<const __m128i*>(src);
80 while (count >= 16) {
81 __m128i a = _mm_loadu_si128(src128++);
82 __m128i b = _mm_loadu_si128(src128++);
83 __m128i c = _mm_loadu_si128(src128++);
84 __m128i d = _mm_loadu_si128(src128++);
85
86 _mm_store_si128(dst128++, a);
87 _mm_store_si128(dst128++, b);
88 _mm_store_si128(dst128++, c);
89 _mm_store_si128(dst128++, d);
90 count -= 16;
91 }
92 dst = reinterpret_cast<uint32_t*>(dst128);
93 src = reinterpret_cast<const uint32_t*>(src128);
94 }
95 while (count > 0) {
96 *dst++ = *src++;
97 --count;
98 }
99 }
OLDNEW
« no previous file with comments | « src/opts/SkUtils_opts_SSE2.h ('k') | src/opts/SkUtils_opts_arm.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698