Go to the documentation of this file.
9 #ifndef _ASM_M32R_SWITCH_TO_H
10 #define _ASM_M32R_SWITCH_TO_H
19 #if defined(CONFIG_FRAME_POINTER) || \
20 !defined(CONFIG_SCHED_OMIT_FRAME_POINTER)
21 #define M32R_PUSH_FP " push fp\n"
22 #define M32R_POP_FP " pop fp\n"
24 #define M32R_PUSH_FP ""
25 #define M32R_POP_FP ""
28 #define switch_to(prev, next, last) do { \
29 __asm__ __volatile__ ( \
30 " seth lr, #high(1f) \n" \
31 " or3 lr, lr, #low(1f) \n" \
32 " st lr, @%4 ; store old LR \n" \
33 " ld lr, @%5 ; load new LR \n" \
35 " st sp, @%2 ; store old SP \n" \
36 " ld sp, @%3 ; load new SP \n" \
37 " push %1 ; store `prev' on new stack \n" \
41 " pop %0 ; restore `__last' from new stack \n" \
45 "r" (&(prev->thread.sp)), "r" (&(next->thread.sp)), \
46 "r" (&(prev->thread.lr)), "r" (&(next->thread.lr)) \