2 * Copyright (C) 2004-2006 Atmel Corporation
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License version 2 as
6 * published by the Free Software Foundation.
12 * unsigned int csum_partial_copy_generic(const char *src, char *dst, int len
13 * int sum, int *src_err_ptr,
16 * Copy src to dst while checksumming, otherwise like csum_partial.
19 .macro ld_src size, reg, ptr
20 9999: ld.\size \reg, \ptr
21 .section __ex_table, "a"
22 .long 9999b, fixup_ld_src
26 .macro st_dst size, ptr, reg
27 9999: st.\size \ptr, \reg
28 .section __ex_table, "a"
29 .long 9999b, fixup_st_dst
34 .global csum_partial_copy_generic
35 .type csum_partial_copy_generic,"function"
37 csum_partial_copy_generic:
43 2: ld_src w, r5, r12++
50 /* return if we had a whole number of words */
57 /* handle additional bytes at the tail */
60 8: ld_src ub, r6, r12++
73 /* Exception handler */
83 * TODO: zero the complete destination - computing the rest