diff options
author | Greg Ungerer <gerg@uclinux.org> | 2011-03-28 02:44:28 -0400 |
---|---|---|
committer | Greg Ungerer <gerg@uclinux.org> | 2011-05-23 20:03:49 -0400 |
commit | 80160de89d0a7c9a93dfe91eef2b448cbc380cd0 (patch) | |
tree | 564588ca8caffc79cacf1ac7d89fd53a1efc3277 /arch/m68k/lib/string.c | |
parent | b82ed87e67b081e55608b86b3e6f6f9036cedbd3 (diff) |
m68k: remove duplicate memmove() implementation
Merging the mmu and non-mmu directories we ended up with duplicate
(and identical) implementations of memmove(). Remove one of them.
Signed-off-by: Greg Ungerer <gerg@uclinux.org>
Acked-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'arch/m68k/lib/string.c')
-rw-r--r-- | arch/m68k/lib/string.c | 95 |
1 files changed, 0 insertions, 95 deletions
diff --git a/arch/m68k/lib/string.c b/arch/m68k/lib/string.c index d399c5f25636..711fa743e6be 100644 --- a/arch/m68k/lib/string.c +++ b/arch/m68k/lib/string.c | |||
@@ -148,98 +148,3 @@ void *memcpy(void *to, const void *from, size_t n) | |||
148 | return xto; | 148 | return xto; |
149 | } | 149 | } |
150 | EXPORT_SYMBOL(memcpy); | 150 | EXPORT_SYMBOL(memcpy); |
151 | |||
152 | void *memmove(void *dest, const void *src, size_t n) | ||
153 | { | ||
154 | void *xdest = dest; | ||
155 | size_t temp; | ||
156 | |||
157 | if (!n) | ||
158 | return xdest; | ||
159 | |||
160 | if (dest < src) { | ||
161 | if ((long)dest & 1) { | ||
162 | char *cdest = dest; | ||
163 | const char *csrc = src; | ||
164 | *cdest++ = *csrc++; | ||
165 | dest = cdest; | ||
166 | src = csrc; | ||
167 | n--; | ||
168 | } | ||
169 | if (n > 2 && (long)dest & 2) { | ||
170 | short *sdest = dest; | ||
171 | const short *ssrc = src; | ||
172 | *sdest++ = *ssrc++; | ||
173 | dest = sdest; | ||
174 | src = ssrc; | ||
175 | n -= 2; | ||
176 | } | ||
177 | temp = n >> 2; | ||
178 | if (temp) { | ||
179 | long *ldest = dest; | ||
180 | const long *lsrc = src; | ||
181 | temp--; | ||
182 | do | ||
183 | *ldest++ = *lsrc++; | ||
184 | while (temp--); | ||
185 | dest = ldest; | ||
186 | src = lsrc; | ||
187 | } | ||
188 | if (n & 2) { | ||
189 | short *sdest = dest; | ||
190 | const short *ssrc = src; | ||
191 | *sdest++ = *ssrc++; | ||
192 | dest = sdest; | ||
193 | src = ssrc; | ||
194 | } | ||
195 | if (n & 1) { | ||
196 | char *cdest = dest; | ||
197 | const char *csrc = src; | ||
198 | *cdest = *csrc; | ||
199 | } | ||
200 | } else { | ||
201 | dest = (char *)dest + n; | ||
202 | src = (const char *)src + n; | ||
203 | if ((long)dest & 1) { | ||
204 | char *cdest = dest; | ||
205 | const char *csrc = src; | ||
206 | *--cdest = *--csrc; | ||
207 | dest = cdest; | ||
208 | src = csrc; | ||
209 | n--; | ||
210 | } | ||
211 | if (n > 2 && (long)dest & 2) { | ||
212 | short *sdest = dest; | ||
213 | const short *ssrc = src; | ||
214 | *--sdest = *--ssrc; | ||
215 | dest = sdest; | ||
216 | src = ssrc; | ||
217 | n -= 2; | ||
218 | } | ||
219 | temp = n >> 2; | ||
220 | if (temp) { | ||
221 | long *ldest = dest; | ||
222 | const long *lsrc = src; | ||
223 | temp--; | ||
224 | do | ||
225 | *--ldest = *--lsrc; | ||
226 | while (temp--); | ||
227 | dest = ldest; | ||
228 | src = lsrc; | ||
229 | } | ||
230 | if (n & 2) { | ||
231 | short *sdest = dest; | ||
232 | const short *ssrc = src; | ||
233 | *--sdest = *--ssrc; | ||
234 | dest = sdest; | ||
235 | src = ssrc; | ||
236 | } | ||
237 | if (n & 1) { | ||
238 | char *cdest = dest; | ||
239 | const char *csrc = src; | ||
240 | *--cdest = *--csrc; | ||
241 | } | ||
242 | } | ||
243 | return xdest; | ||
244 | } | ||
245 | EXPORT_SYMBOL(memmove); | ||