Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 157445
b: refs/heads/master
c: 04efc3b
h: refs/heads/master
i:
  157443: b588184
v: v3
  • Loading branch information
Heiko Carstens authored and Martin Schwidefsky committed Sep 11, 2009
1 parent 2414d32 commit 0cc5cfb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 22 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: 05e7ff7da78bad3edc1290ed86b4a37da72ced62
refs/heads/master: 04efc3be767cfed0d348fd598eba8fe5f5bf5fe6
25 changes: 4 additions & 21 deletions trunk/arch/s390/include/asm/checksum.h
Original file line number Diff line number Diff line change
Expand Up @@ -78,28 +78,11 @@ csum_partial_copy_nocheck (const void *src, void *dst, int len, __wsum sum)
*/
static inline __sum16 csum_fold(__wsum sum)
{
#ifndef __s390x__
register_pair rp;
u32 csum = (__force u32) sum;

asm volatile(
" slr %N1,%N1\n" /* %0 = H L */
" lr %1,%0\n" /* %0 = H L, %1 = H L 0 0 */
" srdl %1,16\n" /* %0 = H L, %1 = 0 H L 0 */
" alr %1,%N1\n" /* %0 = H L, %1 = L H L 0 */
" alr %0,%1\n" /* %0 = H+L+C L+H */
" srl %0,16\n" /* %0 = H+L+C */
: "+&d" (sum), "=d" (rp) : : "cc");
#else /* __s390x__ */
asm volatile(
" sr 3,3\n" /* %0 = H*65536 + L */
" lr 2,%0\n" /* %0 = H L, 2/3 = H L / 0 0 */
" srdl 2,16\n" /* %0 = H L, 2/3 = 0 H / L 0 */
" alr 2,3\n" /* %0 = H L, 2/3 = L H / L 0 */
" alr %0,2\n" /* %0 = H+L+C L+H */
" srl %0,16\n" /* %0 = H+L+C */
: "+&d" (sum) : : "cc", "2", "3");
#endif /* __s390x__ */
return (__force __sum16) ~sum;
csum += (csum >> 16) + (csum << 16);
csum >>= 16;
return (__force __sum16) ~csum;
}

/*
Expand Down

0 comments on commit 0cc5cfb

Please sign in to comment.