Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6
[wrt350n-kernel.git] / arch / cris / arch-v32 / lib / string.c
blobbc89f7296e808f73bde94f66da28ca8f6ea9faf5
1 <<<<<<< HEAD:arch/cris/arch-v32/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-v32/lib/string.c
86 <<<<<<< HEAD:arch/cris/arch-v32/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-v32/lib/string.c
91 Make sure the compiler is able to make something useful of this.
92 <<<<<<< HEAD:arch/cris/arch-v32/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-v32/lib/string.c
98 <<<<<<< HEAD:arch/cris/arch-v32/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-v32/lib/string.c
106 register void *return_dst __asm__ ("r10") = pdst;
107 <<<<<<< HEAD:arch/cris/arch-v32/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-v32/lib/string.c
114 register int n __asm__ ("r12") = pn;
116 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
118 =======
119 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
120 /* When src is aligned but not dst, this makes a few extra needless
121 cycles. I believe it would take as many to check that the
122 re-alignment was unnecessary. */
123 if (((unsigned long) dst & 3) != 0
124 /* Don't align if we wouldn't copy more than a few bytes; so we
125 don't have to check further for overflows. */
126 && n >= 3)
128 if ((unsigned long) dst & 1)
129 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
131 n--;
132 *(char*)dst = *(char*)src;
133 src++;
134 dst++;
136 =======
138 n--;
139 *dst = *src;
140 src++;
141 dst++;
143 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
145 if ((unsigned long) dst & 2)
146 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
148 n -= 2;
149 *(short*)dst = *(short*)src;
150 src += 2;
151 dst += 2;
153 =======
155 n -= 2;
156 *(short *) dst = *(short *) src;
157 src += 2;
158 dst += 2;
160 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
163 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
164 /* Decide which copying method to use. Movem is dirt cheap, so the
165 overheap is low enough to always use the minimum block size as the
166 threshold. */
167 if (n >= 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. */
175 __asm__ volatile (" \n\
176 ;; Check that the register asm declaration got right. \n\
177 ;; The GCC manual explicitly says TRT will happen. \n\
178 .ifnc %0-%1-%2,$r13-$r11-$r12 \n\
179 .err \n\
180 .endif \n\
182 ;; Save the registers we'll use in the movem process \n\
183 =======
184 /* Decide which copying method to use. */
185 if (n >= MEMCPY_BY_BLOCK_THRESHOLD)
187 /* It is not optimal to tell the compiler about clobbering any
188 registers; that will move the saving/restoring of those registers
189 to the function prologue/epilogue, and make non-movem sizes
190 suboptimal. */
191 __asm__ volatile
193 ;; GCC does promise correct register allocations, but let's \n\
194 ;; make sure it keeps its promises. \n\
195 .ifnc %0-%1-%2,$r13-$r11-$r12 \n\
196 .error \"GCC reg alloc bug: %0-%1-%4 != $r13-$r12-$r11\" \n\
197 .endif \n\
198 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
200 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
201 ;; on the stack. \n\
202 subq 11*4,$sp \n\
203 movem $r10,[$sp] \n\
204 =======
205 ;; Save the registers we'll use in the movem process \n\
206 ;; on the stack. \n\
207 subq 11*4,sp \n\
208 movem r10,[sp] \n\
209 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
211 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
212 ;; Now we've got this: \n\
213 ;; r11 - src \n\
214 ;; r13 - dst \n\
215 ;; r12 - n \n\
216 =======
217 ;; Now we've got this: \n\
218 ;; r11 - src \n\
219 ;; r13 - dst \n\
220 ;; r12 - n \n\
221 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
223 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
224 ;; Update n for the first loop \n\
225 subq 44,$r12 \n\
226 =======
227 ;; Update n for the first loop. \n\
228 subq 44,r12 \n\
229 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
230 0: \n\
231 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
232 movem [$r11+],$r10 \n\
233 subq 44,$r12 \n\
234 bge 0b \n\
235 movem $r10,[$r13+] \n\
236 =======
238 #ifdef __arch_common_v10_v32
239 /* Cater to branch offset difference between v32 and v10. We
240 assume the branch below has an 8-bit offset. */
241 " setf\n"
242 #endif
243 " movem [r11+],r10 \n\
244 subq 44,r12 \n\
245 bge 0b \n\
246 movem r10,[r13+] \n\
247 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
249 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
250 addq 44,$r12 ;; compensate for last loop underflowing n \n\
251 =======
252 ;; Compensate for last loop underflowing n. \n\
253 addq 44,r12 \n\
254 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
256 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
257 ;; Restore registers from stack \n\
258 movem [$sp+],$r10"
259 =======
260 ;; Restore registers from stack. \n\
261 movem [sp+],r10"
262 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
264 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
265 /* Outputs */ : "=r" (dst), "=r" (src), "=r" (n)
266 /* Inputs */ : "0" (dst), "1" (src), "2" (n));
267 =======
268 /* Outputs. */
269 : "=r" (dst), "=r" (src), "=r" (n)
270 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
272 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
274 =======
275 /* Inputs. */
276 : "0" (dst), "1" (src), "2" (n));
278 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
280 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
281 /* Either we directly starts copying, using dword copying
282 in a loop, or we copy as much as possible with 'movem'
283 and then the last block (<44 bytes) is copied here.
284 This will work since 'movem' will have updated src,dst,n. */
285 =======
286 while (n >= 16)
288 *(long *) dst = *(long *) src; dst += 4; src += 4;
289 *(long *) dst = *(long *) src; dst += 4; src += 4;
290 *(long *) dst = *(long *) src; dst += 4; src += 4;
291 *(long *) dst = *(long *) src; dst += 4; src += 4;
292 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
294 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
295 while ( n >= 16 )
297 *((long*)dst)++ = *((long*)src)++;
298 *((long*)dst)++ = *((long*)src)++;
299 *((long*)dst)++ = *((long*)src)++;
300 *((long*)dst)++ = *((long*)src)++;
301 n -= 16;
303 =======
304 n -= 16;
306 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
308 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
309 /* A switch() is definitely the fastest although it takes a LOT of code.
310 * Particularly if you inline code this.
312 =======
313 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
314 switch (n)
315 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
317 =======
319 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
320 case 0:
321 break;
322 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
323 =======
325 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
326 case 1:
327 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
328 *(char*)dst = *(char*)src;
329 =======
330 *dst = *src;
331 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
332 break;
333 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
334 =======
336 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
337 case 2:
338 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
339 *(short*)dst = *(short*)src;
340 =======
341 *(short *) dst = *(short *) src;
342 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
343 break;
344 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
345 =======
347 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
348 case 3:
349 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
350 *((short*)dst)++ = *((short*)src)++;
351 *(char*)dst = *(char*)src;
352 =======
353 *(short *) dst = *(short *) src; dst += 2; src += 2;
354 *dst = *src;
355 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
356 break;
357 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
358 =======
360 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
361 case 4:
362 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
363 *((long*)dst)++ = *((long*)src)++;
364 =======
365 *(long *) dst = *(long *) src;
366 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
367 break;
368 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
369 =======
371 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
372 case 5:
373 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
374 *((long*)dst)++ = *((long*)src)++;
375 *(char*)dst = *(char*)src;
376 =======
377 *(long *) dst = *(long *) src; dst += 4; src += 4;
378 *dst = *src;
379 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
380 break;
381 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
382 =======
384 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
385 case 6:
386 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
387 *((long*)dst)++ = *((long*)src)++;
388 *(short*)dst = *(short*)src;
389 =======
390 *(long *) dst = *(long *) src; dst += 4; src += 4;
391 *(short *) dst = *(short *) src;
392 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
393 break;
394 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
395 =======
397 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
398 case 7:
399 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
400 *((long*)dst)++ = *((long*)src)++;
401 *((short*)dst)++ = *((short*)src)++;
402 *(char*)dst = *(char*)src;
403 =======
404 *(long *) dst = *(long *) src; dst += 4; src += 4;
405 *(short *) dst = *(short *) src; dst += 2; src += 2;
406 *dst = *src;
407 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
408 break;
409 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
410 =======
412 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
413 case 8:
414 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
415 *((long*)dst)++ = *((long*)src)++;
416 *((long*)dst)++ = *((long*)src)++;
417 =======
418 *(long *) dst = *(long *) src; dst += 4; src += 4;
419 *(long *) dst = *(long *) src;
420 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
421 break;
422 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
423 =======
425 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
426 case 9:
427 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
428 *((long*)dst)++ = *((long*)src)++;
429 *((long*)dst)++ = *((long*)src)++;
430 *(char*)dst = *(char*)src;
431 =======
432 *(long *) dst = *(long *) src; dst += 4; src += 4;
433 *(long *) dst = *(long *) src; dst += 4; src += 4;
434 *dst = *src;
435 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
436 break;
437 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
438 =======
440 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
441 case 10:
442 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
443 *((long*)dst)++ = *((long*)src)++;
444 *((long*)dst)++ = *((long*)src)++;
445 *(short*)dst = *(short*)src;
446 =======
447 *(long *) dst = *(long *) src; dst += 4; src += 4;
448 *(long *) dst = *(long *) src; dst += 4; src += 4;
449 *(short *) dst = *(short *) src;
450 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
451 break;
452 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
453 =======
455 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
456 case 11:
457 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
458 *((long*)dst)++ = *((long*)src)++;
459 *((long*)dst)++ = *((long*)src)++;
460 *((short*)dst)++ = *((short*)src)++;
461 *(char*)dst = *(char*)src;
462 =======
463 *(long *) dst = *(long *) src; dst += 4; src += 4;
464 *(long *) dst = *(long *) src; dst += 4; src += 4;
465 *(short *) dst = *(short *) src; dst += 2; src += 2;
466 *dst = *src;
467 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
468 break;
469 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
470 =======
472 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
473 case 12:
474 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
475 *((long*)dst)++ = *((long*)src)++;
476 *((long*)dst)++ = *((long*)src)++;
477 *((long*)dst)++ = *((long*)src)++;
478 =======
479 *(long *) dst = *(long *) src; dst += 4; src += 4;
480 *(long *) dst = *(long *) src; dst += 4; src += 4;
481 *(long *) dst = *(long *) src;
482 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
483 break;
484 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
485 =======
487 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
488 case 13:
489 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
490 *((long*)dst)++ = *((long*)src)++;
491 *((long*)dst)++ = *((long*)src)++;
492 *((long*)dst)++ = *((long*)src)++;
493 *(char*)dst = *(char*)src;
494 =======
495 *(long *) dst = *(long *) src; dst += 4; src += 4;
496 *(long *) dst = *(long *) src; dst += 4; src += 4;
497 *(long *) dst = *(long *) src; dst += 4; src += 4;
498 *dst = *src;
499 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
500 break;
501 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
502 =======
504 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
505 case 14:
506 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
507 *((long*)dst)++ = *((long*)src)++;
508 *((long*)dst)++ = *((long*)src)++;
509 *((long*)dst)++ = *((long*)src)++;
510 *(short*)dst = *(short*)src;
511 =======
512 *(long *) dst = *(long *) src; dst += 4; src += 4;
513 *(long *) dst = *(long *) src; dst += 4; src += 4;
514 *(long *) dst = *(long *) src; dst += 4; src += 4;
515 *(short *) dst = *(short *) src;
516 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
517 break;
518 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
519 =======
521 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
522 case 15:
523 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
524 *((long*)dst)++ = *((long*)src)++;
525 *((long*)dst)++ = *((long*)src)++;
526 *((long*)dst)++ = *((long*)src)++;
527 *((short*)dst)++ = *((short*)src)++;
528 *(char*)dst = *(char*)src;
529 =======
530 *(long *) dst = *(long *) src; dst += 4; src += 4;
531 *(long *) dst = *(long *) src; dst += 4; src += 4;
532 *(long *) dst = *(long *) src; dst += 4; src += 4;
533 *(short *) dst = *(short *) src; dst += 2; src += 2;
534 *dst = *src;
535 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
536 break;
537 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
539 =======
541 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c
543 <<<<<<< HEAD:arch/cris/arch-v32/lib/string.c
544 return return_dst; /* destination pointer. */
545 } /* memcpy() */
546 =======
547 return return_dst;
549 >>>>>>> 264e3e889d86e552b4191d69bb60f4f3b383135a:arch/cris/arch-v32/lib/string.c