TERES/SOFTWARE/A64-TERES/linux-a64/arch/x86/um/asm/checksum_64.h
Dimitar Gamishev f9b0e7a283 linux
2017-10-13 14:07:04 +03:00

20 lines
361 B
C

/*
* Licensed under the GPL
*/
#ifndef __UM_SYSDEP_CHECKSUM_H
#define __UM_SYSDEP_CHECKSUM_H
static inline unsigned add32_with_carry(unsigned a, unsigned b)
{
asm("addl %2,%0\n\t"
"adcl $0,%0"
: "=r" (a)
: "0" (a), "r" (b));
return a;
}
extern __sum16 ip_compute_csum(const void *buff, int len);
#endif