Commit a29a6b5a authored by Heiko Carstens's avatar Heiko Carstens Committed by Vasily Gorbik

s390/checksum: use register pair instead of register asm

Signed-off-by: default avatarHeiko Carstens <hca@linux.ibm.com>
Signed-off-by: default avatarVasily Gorbik <gor@linux.ibm.com>
parent 3c45a07b
......@@ -29,13 +29,15 @@
*/
static inline __wsum csum_partial(const void *buff, int len, __wsum sum)
{
register unsigned long reg2 asm("2") = (unsigned long) buff;
register unsigned long reg3 asm("3") = (unsigned long) len;
union register_pair rp = {
.even = (unsigned long) buff,
.odd = (unsigned long) len,
};
asm volatile(
"0: cksm %0,%1\n" /* do checksum on longs */
"0: cksm %[sum],%[rp]\n"
" jo 0b\n"
: "+d" (sum), "+d" (reg2), "+d" (reg3) : : "cc", "memory");
: [sum] "+&d" (sum), [rp] "+&d" (rp.pair) : : "cc", "memory");
return sum;
}
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment