1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
|
commit acb9f2e4bc53e0483e53549379c9c5631e452334
Author: Samuel Thibault <samuel.thibault@ens-lyon.org>
Date: Sat Sep 26 21:29:00 2009 +0200
Add memory clobbers to assembly snippets
* pfinet/linux-src/include/asm-i386/checksum.h (ip_fast_csum):
Add memory clobber to assembly snippet.
(csum_ipv6_magic): Likewise.
---
pfinet/linux-src/include/asm-i386/checksum.h | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
--- a/pfinet/linux-src/include/asm-i386/checksum.h
+++ b/pfinet/linux-src/include/asm-i386/checksum.h
@@ -109,7 +109,8 @@ static inline unsigned short ip_fast_csu
are modified, we must also specify them as outputs, or gcc
will assume they contain their original values. */
: "=r" (sum), "=r" (iph), "=r" (ihl)
- : "1" (iph), "2" (ihl));
+ : "1" (iph), "2" (ihl)
+ : "memory");
return(sum);
}
@@ -185,7 +186,8 @@ static __inline__ unsigned short int csu
"adcl $0, %0\n"
: "=&r" (sum)
: "r" (saddr), "r" (daddr),
- "r"(htonl((__u32) (len))), "r"(htonl(proto)), "0"(sum));
+ "r"(htonl((__u32) (len))), "r"(htonl(proto)), "0"(sum)
+ : "memory");
return csum_fold(sum);
}
|