summaryrefslogtreecommitdiffstats
path: root/arch/mn10300/lib/checksum.c
diff options
context:
space:
mode:
authorMark Salter <msalter@redhat.com>2010-01-08 23:43:16 +0100
committerLinus Torvalds <torvalds@linux-foundation.org>2010-01-11 18:34:10 +0100
commitd6bb7a1ad326f56f0793353c59348554f84b513c (patch)
tree803f006ee2cd924f73b6b4c92b040f9f1db95834 /arch/mn10300/lib/checksum.c
parentmn10300: objcopy flags fix (diff)
downloadlinux-d6bb7a1ad326f56f0793353c59348554f84b513c.tar.xz
linux-d6bb7a1ad326f56f0793353c59348554f84b513c.zip
mn10300: add cc clobbers to asm statements
gcc 4.2.1 for MN10300 is more agressive than the older gcc in reordering/moving other insns between an insn that sets flags and an insn that uses those flags. This leads to trouble with asm statements which are missing an explicit "cc" clobber. This patch adds the explicit "cc" clobber to asm statements which do indeed clobber the condition flags. Signed-off-by: Mark Salter <msalter@redhat.com> Signed-off-by: David Howells <dhowells@redhat.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'arch/mn10300/lib/checksum.c')
-rw-r--r--arch/mn10300/lib/checksum.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/arch/mn10300/lib/checksum.c b/arch/mn10300/lib/checksum.c
index 274f29ec33c1..b6580f5d89ee 100644
--- a/arch/mn10300/lib/checksum.c
+++ b/arch/mn10300/lib/checksum.c
@@ -22,6 +22,7 @@ static inline unsigned short from32to16(__wsum sum)
" addc 0xffff,%0 \n"
: "=r" (sum)
: "r" (sum << 16), "0" (sum & 0xffff0000)
+ : "cc"
);
return sum >> 16;
}