Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 111128
b: refs/heads/master
c: b65a75b
h: refs/heads/master
v: v3
  • Loading branch information
Ralf Baechle committed Oct 11, 2008
1 parent 137acbd commit 496551a
Show file tree
Hide file tree
Showing 2 changed files with 25 additions and 12 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 60724ca59eda766a30be57aec6b49bc3e2bead91
refs/heads/master: b65a75b8c91c0f05047399401407371678fe9549
35 changes: 24 additions & 11 deletions trunk/arch/mips/lib/csum_partial.S
Original file line number Diff line number Diff line change
Expand Up @@ -270,13 +270,20 @@ LEAF(csum_partial)
#endif

/* odd buffer alignment? */
beqz t7, 1f
nop
sll v1, sum, 8
#ifdef CPU_MIPSR2
wsbh v1, sum
movn sum, v1, t7
#else
beqz t7, 1f /* odd buffer alignment? */
lui v1, 0x00ff
addu v1, 0x00ff
and t0, sum, v1
sll t0, t0, 8
srl sum, sum, 8
or sum, v1
andi sum, 0xffff
and sum, sum, v1
or sum, sum, t0
1:
#endif
.set reorder
/* Add the passed partial csum. */
ADDC32(sum, a2)
Expand Down Expand Up @@ -663,14 +670,20 @@ EXC( sb t0, NBYTES-2(dst), .Ls_exc)
addu sum, v1
#endif

/* odd buffer alignment? */
beqz odd, 1f
nop
sll v1, sum, 8
#ifdef CPU_MIPSR2
wsbh v1, sum
movn sum, v1, odd
#else
beqz odd, 1f /* odd buffer alignment? */
lui v1, 0x00ff
addu v1, 0x00ff
and t0, sum, v1
sll t0, t0, 8
srl sum, sum, 8
or sum, v1
andi sum, 0xffff
and sum, sum, v1
or sum, sum, t0
1:
#endif
.set reorder
ADDC32(sum, psum)
jr ra
Expand Down

0 comments on commit 496551a

Please sign in to comment.