⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 csum_partial.s

📁 linux 内核源代码
💻 S
字号:
/* * Copyright (C) 2004-2006 Atmel Corporation * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License version 2 as * published by the Free Software Foundation. */	/*	 * unsigned int csum_partial(const unsigned char *buff,	 *			     int len, unsigned int sum)	 */	.text	.global	csum_partial	.type	csum_partial,"function"	.align	1csum_partial:	/* checksum complete words, aligned or not */3:	sub	r11, 4	brlt	5f4:	ld.w	r9, r12++	add	r10, r9	acr	r10	sub	r11, 4	brge	4b	/* return if we had a whole number of words */5:	sub	r11, -4	reteq	r10	/* checksum any remaining bytes at the end */	mov	r9, 0	mov	r8, 0	cp	r11, 2	brlt	6f	ld.uh	r9, r12++	sub	r11, 2	breq	7f	lsl	r9, 166:	ld.ub	r8, r12++	lsl	r8, 87:	or	r9, r8	add	r10, r9	acr	r10	retal	r10	.size	csum_partial, . - csum_partial

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -