diff options
author | Mark Salter <msalter@redhat.com> | 2010-01-08 23:43:16 +0100 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-01-11 18:34:10 +0100 |
commit | d6bb7a1ad326f56f0793353c59348554f84b513c (patch) | |
tree | 803f006ee2cd924f73b6b4c92b040f9f1db95834 /arch/mn10300/lib/usercopy.c | |
parent | mn10300: objcopy flags fix (diff) | |
download | linux-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/usercopy.c')
-rw-r--r-- | arch/mn10300/lib/usercopy.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/arch/mn10300/lib/usercopy.c b/arch/mn10300/lib/usercopy.c index a75b203059c1..7826e6c364e7 100644 --- a/arch/mn10300/lib/usercopy.c +++ b/arch/mn10300/lib/usercopy.c @@ -62,7 +62,7 @@ do { \ " .previous" \ :"=&r"(res), "=r"(count), "=&r"(w) \ :"i"(-EFAULT), "1"(count), "a"(src), "a"(dst) \ - :"memory"); \ + : "memory", "cc"); \ } while (0) long @@ -109,7 +109,7 @@ do { \ ".previous\n" \ : "+r"(size), "=&r"(w) \ : "a"(addr), "d"(0) \ - : "memory"); \ + : "memory", "cc"); \ } while (0) unsigned long @@ -161,6 +161,6 @@ long strnlen_user(const char *s, long n) ".previous\n" :"=d"(res), "=&r"(w) :"0"(0), "a"(s), "r"(n) - :"memory"); + : "memory", "cc"); return res; } |