summaryrefslogtreecommitdiff
blob: b3e9e2cf4a9236c3dfd097b296910e9b1678d843 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
--- a/src/checksum.c
+++ b/src/checksum.c
@@ -29,6 +29,7 @@
 	movl 16(%esp),%ecx	# Function arg: int len
         movl 12(%esp),%esi	# Function arg: u_char *buff*/
 
+"	push %%ebx						\n"
 "	testl $2, %%esi						\n"		
 "	jz 2f							\n"			
 "	subl $2, %%ecx						\n"		
@@ -84,10 +85,10 @@
 "5:	movb (%%esi),%%cl					\n"
 "6:	addl %%ecx,%%eax					\n"
 "	adcl $0, %%eax						\n"
-"7: 								\n"
+"7: 	pop %%ebx						\n"
        : "=a"(sum)
        : "0"(sum), "c"(len), "S"(buff)
-       : "bx", "dx");
+       : "dx");
 
   return (sum);
 }