aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-sh/entry-macros.S
diff options
context:
space:
mode:
authorYoshinori Sato <ysato@users.sourceforge.jp>2006-11-05 02:18:08 -0500
committerPaul Mundt <lethal@linux-sh.org>2006-12-05 20:45:36 -0500
commitb229632abd451ab2c797010b9788e48c9314db4f (patch)
treebe097331d66985376057ff3ffbab742d60ac55ed /include/asm-sh/entry-macros.S
parentde39840646a223ae13a346048c280b7c871bf56e (diff)
sh: Add SH-2A platform headers.
Mostly SH-2 wrappers.. Signed-off-by: Yoshinori Sato <ysato@users.sourceforge.jp> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'include/asm-sh/entry-macros.S')
-rw-r--r--include/asm-sh/entry-macros.S32
1 files changed, 32 insertions, 0 deletions
diff --git a/include/asm-sh/entry-macros.S b/include/asm-sh/entry-macros.S
new file mode 100644
index 000000000000..099fe8189bbe
--- /dev/null
+++ b/include/asm-sh/entry-macros.S
@@ -0,0 +1,32 @@
1! entry.S macro define
2
3 .macro cli
4 stc sr, r0
5 or #0xf0, r0
6 ldc r0, sr
7 .endm
8
9 .macro sti
10 mov #0xf0, r11
11 extu.b r11, r11
12 not r11, r11
13 stc sr, r10
14 and r11, r10
15#ifdef CONFIG_HAS_SR_RB
16 stc k_g_imask, r11
17 or r11, r10
18#endif
19 ldc r10, sr
20 .endm
21
22 .macro get_current_thread_info, ti, tmp
23#ifdef CONFIG_HAS_SR_RB
24 stc r7_bank, \ti
25#else
26 mov #((THREAD_SIZE - 1)>> 8) ^ 0xff, \tmp
27 shll8 \tmp
28 mov r15, \ti
29 and \tmp, \ti
30#endif
31 .endm
32