Skip to content

Commit

Permalink
parisc: fix miscompilation of ip_fast_csum with gcc >= 4.3
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Kyle McMartin committed Jun 13, 2008
1 parent f4441b6 commit e374d17
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion include/asm-parisc/checksum.h
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand Down

0 comments on commit e374d17

Please sign in to comment.