parisc: fix miscompilation of ip_fast_csum with gcc >= 4.3
authorKyle McMartin <kyle@minerva.i.cabal.ca>
Sat, 31 May 2008 16:15:42 +0000 (12:15 -0400)
committerKyle McMartin <kyle@minerva.i.cabal.ca>
Fri, 13 Jun 2008 14:49:56 +0000 (10:49 -0400)
ip_fast_csum needs an asm "memory" clobber, otherwise the aggressive
optimizations in gcc-4.3 cause it to be miscompiled.

Signed-off-by: Kyle McMartin <kyle@mcmartin.ca>
include/asm-parisc/checksum.h

index cc3ec1bd891940d8a37179443f9a8d33ded517fa..e9639ccc3fcec82fe6ede8b90764f62cd2a5415d 100644 (file)
@@ -65,7 +65,7 @@ static inline __sum16 ip_fast_csum(const void *iph, unsigned int ihl)
 "2:\n"
        : "=r" (sum), "=r" (iph), "=r" (ihl)
        : "1" (iph), "2" (ihl)
-       : "r19", "r20", "r21" );
+       : "r19", "r20", "r21", "memory");
 
        return (__force __sum16)sum;
 }