summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2003-08-30 23:43:44 -0700
committerLinus Torvalds <torvalds@home.osdl.org>2003-08-30 23:43:44 -0700
commit2fc6e0d68e016bcef5e04d4cd452e692bd1d31bd (patch)
tree877f9685ea03b6e0abe70979d51b1fc20ba4f921 /include
parentf6135a3e8be00957b4ca0a8f158a7467b2d5c6eb (diff)
[PATCH] M68k switch_to
M68k: Set last in switch_to(), fix asm constraints (from Andreas Schwab)
Diffstat (limited to 'include')
-rw-r--r--include/asm-m68k/system.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/include/asm-m68k/system.h b/include/asm-m68k/system.h
index 77ac69c31981..2491ff5dd92c 100644
--- a/include/asm-m68k/system.h
+++ b/include/asm-m68k/system.h
@@ -36,9 +36,12 @@ asmlinkage void resume(void);
#define switch_to(prev,next,last) do { \
register void *_prev __asm__ ("a0") = (prev); \
register void *_next __asm__ ("a1") = (next); \
+ register void *_last __asm__ ("d1"); \
__asm__ __volatile__("jbsr resume" \
- : : "a" (_prev), "a" (_next) \
- : "d0", "d1", "d2", "d3", "d4", "d5", "a0", "a1"); \
+ : "=a" (_prev), "=a" (_next), "=d" (_last) \
+ : "0" (_prev), "1" (_next) \
+ : "d0", "d2", "d3", "d4", "d5"); \
+ (last) = _last; \
} while (0)