aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--include/asm-sh/system_32.h94
1 files changed, 47 insertions, 47 deletions
diff --git a/include/asm-sh/system_32.h b/include/asm-sh/system_32.h
index e918bacd5ecf..7ff08d956ba8 100644
--- a/include/asm-sh/system_32.h
+++ b/include/asm-sh/system_32.h
@@ -9,53 +9,53 @@ struct task_struct *__switch_to(struct task_struct *prev,
9/* 9/*
10 * switch_to() should switch tasks to task nr n, first 10 * switch_to() should switch tasks to task nr n, first
11 */ 11 */
12#define switch_to(prev, next, last) \ 12#define switch_to(prev, next, last) \
13do { \ 13do { \
14 register u32 *__ts1 __asm__ ("r1") = &prev->thread.sp; \ 14 register u32 *__ts1 __asm__ ("r1") = (u32 *)&prev->thread.sp; \
15 register u32 *__ts2 __asm__ ("r2") = &prev->thread.pc; \ 15 register u32 *__ts2 __asm__ ("r2") = (u32 *)&prev->thread.pc; \
16 register u32 *__ts4 __asm__ ("r4") = (u32 *)prev; \ 16 register u32 *__ts4 __asm__ ("r4") = (u32 *)prev; \
17 register u32 *__ts5 __asm__ ("r5") = (u32 *)next; \ 17 register u32 *__ts5 __asm__ ("r5") = (u32 *)next; \
18 register u32 *__ts6 __asm__ ("r6") = &next->thread.sp; \ 18 register u32 *__ts6 __asm__ ("r6") = (u32 *)&next->thread.sp; \
19 register u32 __ts7 __asm__ ("r7") = next->thread.pc; \ 19 register u32 __ts7 __asm__ ("r7") = next->thread.pc; \
20 struct task_struct *__last; \ 20 struct task_struct *__last; \
21 \ 21 \
22 __asm__ __volatile__ ( \ 22 __asm__ __volatile__ ( \
23 ".balign 4\n\t" \ 23 ".balign 4\n\t" \
24 "stc.l gbr, @-r15\n\t" \ 24 "stc.l gbr, @-r15\n\t" \
25 "sts.l pr, @-r15\n\t" \ 25 "sts.l pr, @-r15\n\t" \
26 "mov.l r8, @-r15\n\t" \ 26 "mov.l r8, @-r15\n\t" \
27 "mov.l r9, @-r15\n\t" \ 27 "mov.l r9, @-r15\n\t" \
28 "mov.l r10, @-r15\n\t" \ 28 "mov.l r10, @-r15\n\t" \
29 "mov.l r11, @-r15\n\t" \ 29 "mov.l r11, @-r15\n\t" \
30 "mov.l r12, @-r15\n\t" \ 30 "mov.l r12, @-r15\n\t" \
31 "mov.l r13, @-r15\n\t" \ 31 "mov.l r13, @-r15\n\t" \
32 "mov.l r14, @-r15\n\t" \ 32 "mov.l r14, @-r15\n\t" \
33 "mov.l r15, @r1\t! save SP\n\t" \ 33 "mov.l r15, @r1\t! save SP\n\t" \
34 "mov.l @r6, r15\t! change to new stack\n\t" \ 34 "mov.l @r6, r15\t! change to new stack\n\t" \
35 "mova 1f, %0\n\t" \ 35 "mova 1f, %0\n\t" \
36 "mov.l %0, @r2\t! save PC\n\t" \ 36 "mov.l %0, @r2\t! save PC\n\t" \
37 "mov.l 2f, %0\n\t" \ 37 "mov.l 2f, %0\n\t" \
38 "jmp @%0\t! call __switch_to\n\t" \ 38 "jmp @%0\t! call __switch_to\n\t" \
39 " lds r7, pr\t! with return to new PC\n\t" \ 39 " lds r7, pr\t! with return to new PC\n\t" \
40 ".balign 4\n" \ 40 ".balign 4\n" \
41 "2:\n\t" \ 41 "2:\n\t" \
42 ".long __switch_to\n" \ 42 ".long __switch_to\n" \
43 "1:\n\t" \ 43 "1:\n\t" \
44 "mov.l @r15+, r14\n\t" \ 44 "mov.l @r15+, r14\n\t" \
45 "mov.l @r15+, r13\n\t" \ 45 "mov.l @r15+, r13\n\t" \
46 "mov.l @r15+, r12\n\t" \ 46 "mov.l @r15+, r12\n\t" \
47 "mov.l @r15+, r11\n\t" \ 47 "mov.l @r15+, r11\n\t" \
48 "mov.l @r15+, r10\n\t" \ 48 "mov.l @r15+, r10\n\t" \
49 "mov.l @r15+, r9\n\t" \ 49 "mov.l @r15+, r9\n\t" \
50 "mov.l @r15+, r8\n\t" \ 50 "mov.l @r15+, r8\n\t" \
51 "lds.l @r15+, pr\n\t" \ 51 "lds.l @r15+, pr\n\t" \
52 "ldc.l @r15+, gbr\n\t" \ 52 "ldc.l @r15+, gbr\n\t" \
53 : "=z" (__last) \ 53 : "=z" (__last) \
54 : "r" (__ts1), "r" (__ts2), "r" (__ts4), \ 54 : "r" (__ts1), "r" (__ts2), "r" (__ts4), \
55 "r" (__ts5), "r" (__ts6), "r" (__ts7) \ 55 "r" (__ts5), "r" (__ts6), "r" (__ts7) \
56 : "r3", "t"); \ 56 : "r3", "t"); \
57 \ 57 \
58 last = __last; \ 58 last = __last; \
59} while (0) 59} while (0)
60 60
61#define __uses_jump_to_uncached __attribute__ ((__section__ (".uncached.text"))) 61#define __uses_jump_to_uncached __attribute__ ((__section__ (".uncached.text")))