diff options
author | Ralf Baechle <ralf@linux-mips.org> | 1998-05-07 02:55:41 +0000 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 1998-05-07 02:55:41 +0000 |
commit | dcec8a13bf565e47942a1751a9cec21bec5648fe (patch) | |
tree | 548b69625b18cc2e88c3e68d0923be546c9ebb03 /arch/i386/lib | |
parent | 2e0f55e79c49509b7ff70ff1a10e1e9e90a3dfd4 (diff) |
o Merge with Linux 2.1.99.
o Fix ancient bug in the ELF loader making ldd crash.
o Fix ancient bug in the keyboard code for SGI, SNI and Jazz.
Diffstat (limited to 'arch/i386/lib')
-rw-r--r-- | arch/i386/lib/checksum.c | 13 |
1 files changed, 8 insertions, 5 deletions
diff --git a/arch/i386/lib/checksum.c b/arch/i386/lib/checksum.c index 88f250d62..c246421a9 100644 --- a/arch/i386/lib/checksum.c +++ b/arch/i386/lib/checksum.c @@ -123,6 +123,8 @@ unsigned int csum_partial(const unsigned char * buff, int len, unsigned int sum) unsigned int csum_partial_copy_generic (const char *src, char *dst, int len, int sum, int *src_err_ptr, int *dst_err_ptr) { + __u32 tmp_var; + __asm__ __volatile__ ( " testl $2, %%edi # Check alignment. jz 2f # Jump if alignment is ok. @@ -137,7 +139,7 @@ unsigned int csum_partial_copy_generic (const char *src, char *dst, addw %%bx, %%ax adcl $0, %%eax 2: - pushl %%ecx + movl %%ecx, %8 shrl $5, %%ecx jz 2f testl %%esi, %%esi @@ -174,7 +176,7 @@ unsigned int csum_partial_copy_generic (const char *src, char *dst, dec %%ecx jne 1b adcl $0, %%eax - 2: popl %%edx + 2: movl %8, %%edx movl %%edx, %%ecx andl $0x1c, %%edx je 4f @@ -231,9 +233,10 @@ unsigned int csum_partial_copy_generic (const char *src, char *dst, ################################################ " - : "=a" (sum), "=m" (src_err_ptr), "=m" (dst_err_ptr) - : "0" (sum), "c" (len), "S" (src), "D" (dst), - "i" (-EFAULT) + : "=a" (sum) + : "m" (src_err_ptr), "m" (dst_err_ptr), + "0" (sum), "c" (len), "S" (src), "D" (dst), + "i" (-EFAULT), "m"(tmp_var) : "bx", "cx", "dx", "si", "di" ); return(sum); |