Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[wrt350n-kernel.git] / arch / cris / arch-v10 / lib / string.c
blob4f5e7efbde5a4ea96b4627af25e26187eec50646
1 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
2 /*#************************************************************************#*/
3 /*#-------------------------------------------------------------------------*/
4 /*# */
5 /*# FUNCTION NAME: memcpy() */
6 /*# */
7 /*# PARAMETERS: void* dst; Destination address. */
8 /*# void* src; Source address. */
9 /*# int len; Number of bytes to copy. */
10 /*# */
11 /*# RETURNS: dst. */
12 /*# */
13 /*# DESCRIPTION: Copies len bytes of memory from src to dst. No guarantees */
14 /*# about copying of overlapping memory areas. This routine is */
15 /*# very sensitive to compiler changes in register allocation. */
16 /*# Should really be rewritten to avoid this problem. */
17 /*# */
18 /*#-------------------------------------------------------------------------*/
19 /*# */
20 /*# HISTORY */
21 /*# */
22 /*# DATE NAME CHANGES */
23 /*# ---- ---- ------- */
24 /*# 941007 Kenny R Creation */
25 /*# 941011 Kenny R Lots of optimizations and inlining. */
26 /*# 941129 Ulf A Adapted for use in libc. */
27 /*# 950216 HP N==0 forgotten if non-aligned src/dst. */
28 /*# Added some optimizations. */
29 /*# 001025 HP Make src and dst char *. Align dst to */
30 /*# dword, not just word-if-both-src-and-dst- */
31 /*# are-misaligned. */
32 /*# */
33 /*#-------------------------------------------------------------------------*/
35 #include <linux/types.h>
37 void *memcpy(void *pdst,
38 const void *psrc,
39 size_t pn)
40 =======
41 /* A memcpy for CRIS.
42 Copyright (C) 1994-2005 Axis Communications.
43 All rights reserved.
45 Redistribution and use in source and binary forms, with or without
46 modification, are permitted provided that the following conditions
47 are met:
49 1. Redistributions of source code must retain the above copyright
50 notice, this list of conditions and the following disclaimer.
52 2. Neither the name of Axis Communications nor the names of its
53 contributors may be used to endorse or promote products derived
54 from this software without specific prior written permission.
56 THIS SOFTWARE IS PROVIDED BY AXIS COMMUNICATIONS AND ITS CONTRIBUTORS
57 ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
58 LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
59 A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL AXIS
60 COMMUNICATIONS OR ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT,
61 INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
62 (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
63 SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
64 HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
65 STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING
66 IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
67 POSSIBILITY OF SUCH DAMAGE. */
69 /* FIXME: This file should really only be used for reference, as the
70 result is somewhat depending on gcc generating what we expect rather
71 than what we describe. An assembly file should be used instead. */
73 #include <stddef.h>
75 /* Break even between movem and move16 is really at 38.7 * 2, but
76 modulo 44, so up to the next multiple of 44, we use ordinary code. */
77 #define MEMCPY_BY_BLOCK_THRESHOLD (44 * 2)
79 /* No name ambiguities in this file. */
80 __asm__ (".syntax no_register_prefix");
82 void *
83 memcpy(void *pdst, const void *psrc, size_t pn)
84 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
86 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
87 /* Ok. Now we want the parameters put in special registers.
88 =======
89 /* Now we want the parameters put in special registers.
90 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
91 Make sure the compiler is able to make something useful of this.
92 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
93 As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop).
94 =======
95 As it is now: r10 -> r13; r11 -> r11 (nop); r12 -> r12 (nop).
96 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
98 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
99 If gcc was alright, it really would need no temporaries, and no
100 stack space to save stuff on. */
101 =======
102 If gcc was allright, it really would need no temporaries, and no
103 stack space to save stuff on. */
104 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
106 register void *return_dst __asm__ ("r10") = pdst;
107 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
108 register char *dst __asm__ ("r13") = pdst;
109 register const char *src __asm__ ("r11") = psrc;
110 =======
111 register unsigned char *dst __asm__ ("r13") = pdst;
112 register unsigned const char *src __asm__ ("r11") = psrc;
113 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
114 register int n __asm__ ("r12") = pn;
115 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
118 =======
120 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
121 /* When src is aligned but not dst, this makes a few extra needless
122 cycles. I believe it would take as many to check that the
123 re-alignment was unnecessary. */
124 if (((unsigned long) dst & 3) != 0
125 /* Don't align if we wouldn't copy more than a few bytes; so we
126 don't have to check further for overflows. */
127 && n >= 3)
129 if ((unsigned long) dst & 1)
130 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
132 n--;
133 *(char*)dst = *(char*)src;
134 src++;
135 dst++;
137 =======
139 n--;
140 *dst = *src;
141 src++;
142 dst++;
144 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
146 if ((unsigned long) dst & 2)
147 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
149 n -= 2;
150 *(short*)dst = *(short*)src;
151 src += 2;
152 dst += 2;
154 =======
156 n -= 2;
157 *(short *) dst = *(short *) src;
158 src += 2;
159 dst += 2;
161 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
164 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
165 /* Decide which copying method to use. */
166 if (n >= 44*2) /* Break even between movem and
167 move16 is at 38.7*2, but modulo 44. */
169 /* For large copies we use 'movem' */
171 /* It is not optimal to tell the compiler about clobbering any
172 registers; that will move the saving/restoring of those registers
173 to the function prologue/epilogue, and make non-movem sizes
174 suboptimal.
176 This method is not foolproof; it assumes that the "asm reg"
177 declarations at the beginning of the function really are used
178 here (beware: they may be moved to temporary registers).
179 This way, we do not have to save/move the registers around into
180 temporaries; we can safely use them straight away.
182 If you want to check that the allocation was right; then
183 check the equalities in the first comment. It should say
184 "r13=r13, r11=r11, r12=r12" */
185 __asm__ volatile ("\n\
186 ;; Check that the following is true (same register names on \n\
187 ;; both sides of equal sign, as in r8=r8): \n\
188 ;; %0=r13, %1=r11, %2=r12 \n\
189 ;; \n\
190 ;; Save the registers we'll use in the movem process \n\
191 ;; on the stack. \n\
192 subq 11*4,$sp \n\
193 movem $r10,[$sp] \n\
194 =======
195 /* Decide which copying method to use. */
196 if (n >= MEMCPY_BY_BLOCK_THRESHOLD)
198 /* It is not optimal to tell the compiler about clobbering any
199 registers; that will move the saving/restoring of those registers
200 to the function prologue/epilogue, and make non-movem sizes
201 suboptimal. */
202 __asm__ volatile
204 ;; GCC does promise correct register allocations, but let's \n\
205 ;; make sure it keeps its promises. \n\
206 .ifnc %0-%1-%2,$r13-$r11-$r12 \n\
207 .error \"GCC reg alloc bug: %0-%1-%4 != $r13-$r12-$r11\" \n\
208 .endif \n\
210 ;; Save the registers we'll use in the movem process \n\
211 ;; on the stack. \n\
212 subq 11*4,sp \n\
213 movem r10,[sp] \n\
214 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
216 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
217 ;; Now we've got this: \n\
218 ;; r11 - src \n\
219 ;; r13 - dst \n\
220 ;; r12 - n \n\
221 =======
222 ;; Now we've got this: \n\
223 ;; r11 - src \n\
224 ;; r13 - dst \n\
225 ;; r12 - n \n\
226 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
228 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
229 ;; Update n for the first loop \n\
230 subq 44,$r12 \n\
231 =======
232 ;; Update n for the first loop. \n\
233 subq 44,r12 \n\
234 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
235 0: \n\
236 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
237 movem [$r11+],$r10 \n\
238 subq 44,$r12 \n\
239 bge 0b \n\
240 movem $r10,[$r13+] \n\
241 =======
243 #ifdef __arch_common_v10_v32
244 /* Cater to branch offset difference between v32 and v10. We
245 assume the branch below has an 8-bit offset. */
246 " setf\n"
247 #endif
248 " movem [r11+],r10 \n\
249 subq 44,r12 \n\
250 bge 0b \n\
251 movem r10,[r13+] \n\
252 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
254 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
255 addq 44,$r12 ;; compensate for last loop underflowing n \n\
256 =======
257 ;; Compensate for last loop underflowing n. \n\
258 addq 44,r12 \n\
259 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
261 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
262 ;; Restore registers from stack \n\
263 movem [$sp+],$r10"
264 =======
265 ;; Restore registers from stack. \n\
266 movem [sp+],r10"
267 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
269 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
270 /* Outputs */ : "=r" (dst), "=r" (src), "=r" (n)
271 /* Inputs */ : "0" (dst), "1" (src), "2" (n));
274 =======
275 /* Outputs. */
276 : "=r" (dst), "=r" (src), "=r" (n)
277 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
279 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
280 /* Either we directly starts copying, using dword copying
281 in a loop, or we copy as much as possible with 'movem'
282 and then the last block (<44 bytes) is copied here.
283 This will work since 'movem' will have updated src,dst,n. */
284 =======
285 /* Inputs. */
286 : "0" (dst), "1" (src), "2" (n));
288 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
290 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
291 while ( n >= 16 )
293 *((long*)dst)++ = *((long*)src)++;
294 *((long*)dst)++ = *((long*)src)++;
295 *((long*)dst)++ = *((long*)src)++;
296 *((long*)dst)++ = *((long*)src)++;
297 n -= 16;
299 =======
300 while (n >= 16)
302 *(long *) dst = *(long *) src; dst += 4; src += 4;
303 *(long *) dst = *(long *) src; dst += 4; src += 4;
304 *(long *) dst = *(long *) src; dst += 4; src += 4;
305 *(long *) dst = *(long *) src; dst += 4; src += 4;
307 n -= 16;
309 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
311 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
312 /* A switch() is definitely the fastest although it takes a LOT of code.
313 * Particularly if you inline code this.
315 =======
316 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
317 switch (n)
318 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
320 =======
322 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
323 case 0:
324 break;
325 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
326 =======
328 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
329 case 1:
330 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
331 *(char*)dst = *(char*)src;
332 =======
333 *dst = *src;
334 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
335 break;
336 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
337 =======
339 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
340 case 2:
341 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
342 *(short*)dst = *(short*)src;
343 =======
344 *(short *) dst = *(short *) src;
345 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
346 break;
347 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
348 =======
350 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
351 case 3:
352 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
353 *((short*)dst)++ = *((short*)src)++;
354 *(char*)dst = *(char*)src;
355 =======
356 *(short *) dst = *(short *) src; dst += 2; src += 2;
357 *dst = *src;
358 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
359 break;
360 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
361 =======
363 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
364 case 4:
365 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
366 *((long*)dst)++ = *((long*)src)++;
367 =======
368 *(long *) dst = *(long *) src;
369 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
370 break;
371 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
372 =======
374 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
375 case 5:
376 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
377 *((long*)dst)++ = *((long*)src)++;
378 *(char*)dst = *(char*)src;
379 =======
380 *(long *) dst = *(long *) src; dst += 4; src += 4;
381 *dst = *src;
382 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
383 break;
384 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
385 =======
387 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
388 case 6:
389 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
390 *((long*)dst)++ = *((long*)src)++;
391 *(short*)dst = *(short*)src;
392 =======
393 *(long *) dst = *(long *) src; dst += 4; src += 4;
394 *(short *) dst = *(short *) src;
395 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
396 break;
397 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
398 =======
400 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
401 case 7:
402 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
403 *((long*)dst)++ = *((long*)src)++;
404 *((short*)dst)++ = *((short*)src)++;
405 *(char*)dst = *(char*)src;
406 =======
407 *(long *) dst = *(long *) src; dst += 4; src += 4;
408 *(short *) dst = *(short *) src; dst += 2; src += 2;
409 *dst = *src;
410 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
411 break;
412 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
413 =======
415 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
416 case 8:
417 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
418 *((long*)dst)++ = *((long*)src)++;
419 *((long*)dst)++ = *((long*)src)++;
420 =======
421 *(long *) dst = *(long *) src; dst += 4; src += 4;
422 *(long *) dst = *(long *) src;
423 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
424 break;
425 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
426 =======
428 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
429 case 9:
430 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
431 *((long*)dst)++ = *((long*)src)++;
432 *((long*)dst)++ = *((long*)src)++;
433 *(char*)dst = *(char*)src;
434 =======
435 *(long *) dst = *(long *) src; dst += 4; src += 4;
436 *(long *) dst = *(long *) src; dst += 4; src += 4;
437 *dst = *src;
438 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
439 break;
440 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
441 =======
443 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
444 case 10:
445 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
446 *((long*)dst)++ = *((long*)src)++;
447 *((long*)dst)++ = *((long*)src)++;
448 *(short*)dst = *(short*)src;
449 =======
450 *(long *) dst = *(long *) src; dst += 4; src += 4;
451 *(long *) dst = *(long *) src; dst += 4; src += 4;
452 *(short *) dst = *(short *) src;
453 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
454 break;
455 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
456 =======
458 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
459 case 11:
460 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
461 *((long*)dst)++ = *((long*)src)++;
462 *((long*)dst)++ = *((long*)src)++;
463 *((short*)dst)++ = *((short*)src)++;
464 *(char*)dst = *(char*)src;
465 =======
466 *(long *) dst = *(long *) src; dst += 4; src += 4;
467 *(long *) dst = *(long *) src; dst += 4; src += 4;
468 *(short *) dst = *(short *) src; dst += 2; src += 2;
469 *dst = *src;
470 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
471 break;
472 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
473 =======
475 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
476 case 12:
477 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
478 *((long*)dst)++ = *((long*)src)++;
479 *((long*)dst)++ = *((long*)src)++;
480 *((long*)dst)++ = *((long*)src)++;
481 =======
482 *(long *) dst = *(long *) src; dst += 4; src += 4;
483 *(long *) dst = *(long *) src; dst += 4; src += 4;
484 *(long *) dst = *(long *) src;
485 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
486 break;
487 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
488 =======
490 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
491 case 13:
492 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
493 *((long*)dst)++ = *((long*)src)++;
494 *((long*)dst)++ = *((long*)src)++;
495 *((long*)dst)++ = *((long*)src)++;
496 *(char*)dst = *(char*)src;
497 =======
498 *(long *) dst = *(long *) src; dst += 4; src += 4;
499 *(long *) dst = *(long *) src; dst += 4; src += 4;
500 *(long *) dst = *(long *) src; dst += 4; src += 4;
501 *dst = *src;
502 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
503 break;
504 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
505 =======
507 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
508 case 14:
509 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
510 *((long*)dst)++ = *((long*)src)++;
511 *((long*)dst)++ = *((long*)src)++;
512 *((long*)dst)++ = *((long*)src)++;
513 *(short*)dst = *(short*)src;
514 =======
515 *(long *) dst = *(long *) src; dst += 4; src += 4;
516 *(long *) dst = *(long *) src; dst += 4; src += 4;
517 *(long *) dst = *(long *) src; dst += 4; src += 4;
518 *(short *) dst = *(short *) src;
519 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
520 break;
521 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
522 =======
524 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
525 case 15:
526 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
527 *((long*)dst)++ = *((long*)src)++;
528 *((long*)dst)++ = *((long*)src)++;
529 *((long*)dst)++ = *((long*)src)++;
530 *((short*)dst)++ = *((short*)src)++;
531 *(char*)dst = *(char*)src;
532 =======
533 *(long *) dst = *(long *) src; dst += 4; src += 4;
534 *(long *) dst = *(long *) src; dst += 4; src += 4;
535 *(long *) dst = *(long *) src; dst += 4; src += 4;
536 *(short *) dst = *(short *) src; dst += 2; src += 2;
537 *dst = *src;
538 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
539 break;
540 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
542 =======
544 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c
546 <<<<<<< HEAD:arch/cris/arch-v10/lib/string.c
547 return return_dst; /* destination pointer. */
548 } /* memcpy() */
549 =======
550 return return_dst;
552 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v10/lib/string.c