Skip to content

Commit

Permalink
CRIS v10: Remove duplicated folding of carry from lib/checksumcopy.S,…
Browse files Browse the repository at this point in the history
… it is not needed.

Also, remove useless CVS id tag.
  • Loading branch information
Jesper Nilsson committed Feb 8, 2008
1 parent 2afab72 commit ab59284
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions arch/cris/arch-v10/lib/checksumcopy.S
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* $Id: checksumcopy.S,v 1.1 2001/12/17 13:59:27 bjornw Exp $
/*
* A fast checksum+copy routine using movem
* Copyright (c) 1998, 2001 Axis Communications AB
*
Expand Down Expand Up @@ -67,8 +67,6 @@ _mloop: movem [$r10+],$r9 ; read 10 longwords

ax
addq 0,$r13
ax ; do it again, since we might have generated a carry
addq 0,$r13

subq 10*4,$r12
bge _mloop
Expand All @@ -91,10 +89,6 @@ _word_loop:
lsrq 16,$r9 ; r0 = checksum >> 16
and.d 0xffff,$r13 ; checksum = checksum & 0xffff
add.d $r9,$r13 ; checksum += r0
move.d $r13,$r9 ; do the same again, maybe we got a carry last add
lsrq 16,$r9
and.d 0xffff,$r13
add.d $r9,$r13

_no_fold:
cmpq 2,$r12
Expand Down

0 comments on commit ab59284

Please sign in to comment.