Commit 8c0a5423 authored by Miles Bader's avatar Miles Bader Committed by Linus Torvalds

[PATCH] v850: Use __volatile__ qualifier on test_bit asm statements

Otherwise recent versions of gcc seem to optimize away some necessary tests.
Signed-off-by: default avatarMiles Bader <miles@gnu.org>
Signed-off-by: default avatarLinus Torvalds <torvalds@osdl.org>
parent 0989bee0
......@@ -129,7 +129,7 @@ extern __inline__ unsigned long ffz (unsigned long word)
#define __const_test_bit(nr, addr) \
({ int __test_bit_res; \
__asm__ ("tst1 (%1 - 0x123), %2; setf nz, %0" \
__asm__ __volatile__ ("tst1 (%1 - 0x123), %2; setf nz, %0" \
: "=r" (__test_bit_res) \
: "g" (((nr) & 0x7) + 0x123), \
"m" (*((const char *)(addr) + ((nr) >> 3)))); \
......@@ -138,7 +138,7 @@ extern __inline__ unsigned long ffz (unsigned long word)
extern __inline__ int __test_bit (int nr, const void *addr)
{
int res;
__asm__ ("tst1 %1, [%2]; setf nz, %0"
__asm__ __volatile__ ("tst1 %1, [%2]; setf nz, %0"
: "=r" (res)
: "r" (nr & 0x7), "r" (addr + (nr >> 3)));
return res;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment