Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Macros
switch_to.h File Reference

Go to the source code of this file.

Macros

#define M32R_PUSH_FP   " push fp\n"
 
#define M32R_POP_FP   " pop fp\n"
 
#define switch_to(prev, next, last)
 

Macro Definition Documentation

#define M32R_POP_FP   " pop fp\n"

Definition at line 22 of file switch_to.h.

#define M32R_PUSH_FP   " push fp\n"

Definition at line 21 of file switch_to.h.

#define switch_to (   prev,
  next,
  last 
)
Value:
do { \
__asm__ __volatile__ ( \
" seth lr, #high(1f) \n" \
" or3 lr, lr, #low(1f) \n" \
" st lr, @%4 ; store old LR \n" \
" ld lr, @%5 ; load new LR \n" \
" st sp, @%2 ; store old SP \n" \
" ld sp, @%3 ; load new SP \n" \
" push %1 ; store `prev' on new stack \n" \
" jmp lr \n" \
" .fillinsn \n" \
"1: \n" \
" pop %0 ; restore `__last' from new stack \n" \
: "=r" (last) \
: "0" (prev), \
"r" (&(prev->thread.sp)), "r" (&(next->thread.sp)), \
"r" (&(prev->thread.lr)), "r" (&(next->thread.lr)) \
: "memory", "lr" \
); \
} while(0)

Definition at line 28 of file switch_to.h.