/*1* Copyright (C) 2004-2006 Atmel Corporation2*3* This program is free software; you can redistribute it and/or modify4* it under the terms of the GNU General Public License version 2 as5* published by the Free Software Foundation.6*/78/*9* unsigned int csum_partial(const unsigned char *buff,10* int len, unsigned int sum)11*/12.text13.global csum_partial14.type csum_partial,"function"15.align 116csum_partial:17/* checksum complete words, aligned or not */183: sub r11, 419brlt 5f204: ld.w r9, r12++21add r10, r922acr r1023sub r11, 424brge 4b2526/* return if we had a whole number of words */275: sub r11, -428reteq r102930/* checksum any remaining bytes at the end */31mov r9, 032mov r8, 033cp r11, 234brlt 6f35ld.uh r9, r12++36sub r11, 237breq 7f38lsl r9, 16396: ld.ub r8, r12++40lsl r8, 8417: or r9, r842add r10, r943acr r104445retal r1046.size csum_partial, . - csum_partial474849