Commit 2fc6e0d6 authored by Geert Uytterhoeven's avatar Geert Uytterhoeven Committed by Linus Torvalds

[PATCH] M68k switch_to

M68k: Set last in switch_to(), fix asm constraints (from Andreas Schwab)
parent f6135a3e
...@@ -36,9 +36,12 @@ asmlinkage void resume(void); ...@@ -36,9 +36,12 @@ asmlinkage void resume(void);
#define switch_to(prev,next,last) do { \ #define switch_to(prev,next,last) do { \
register void *_prev __asm__ ("a0") = (prev); \ register void *_prev __asm__ ("a0") = (prev); \
register void *_next __asm__ ("a1") = (next); \ register void *_next __asm__ ("a1") = (next); \
register void *_last __asm__ ("d1"); \
__asm__ __volatile__("jbsr resume" \ __asm__ __volatile__("jbsr resume" \
: : "a" (_prev), "a" (_next) \ : "=a" (_prev), "=a" (_next), "=d" (_last) \
: "d0", "d1", "d2", "d3", "d4", "d5", "a0", "a1"); \ : "0" (_prev), "1" (_next) \
: "d0", "d2", "d3", "d4", "d5"); \
(last) = _last; \
} while (0) } while (0)
......
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