Import 2.3.18pre1
[davej-history.git] / include / asm-mips / current.h
blobbcaf22b5c38614139d2325b4bbf485431e8ce3b9
1 /* $Id: current.h,v 1.4 1998/07/20 17:52:19 ralf Exp $
3 * This file is subject to the terms and conditions of the GNU General Public
4 * License. See the file "COPYING" in the main directory of this archive
5 * for more details.
7 * Copyright (C) 1998 Ralf Baechle
8 */
9 #ifndef __ASM_MIPS_CURRENT_H
10 #define __ASM_MIPS_CURRENT_H
12 #ifdef _LANGUAGE_C
14 /* MIPS rules... */
15 register struct task_struct *current asm("$28");
17 #endif /* _LANGUAGE_C */
18 #ifdef _LANGUAGE_ASSEMBLY
21 * Special variant for use by exception handlers when the stack pointer
22 * is not loaded.
24 #define _GET_CURRENT(reg) \
25 lui reg, %hi(kernelsp); \
26 .set push; \
27 .set noreorder; \
28 lw reg, %lo(kernelsp)(reg); \
29 .set pop; \
30 ori reg, 8191; \
31 xori reg, 8191
33 #endif
35 #endif /* __ASM_MIPS_CURRENT_H */