commented early_printk patch because of rejects.
[linux-flexiantxendom0-3.2.10.git] / include / asm-mips / asmmacro-64.h
1 /*
2  * asmmacro.h: Assembler macros to make things easier to read.
3  *
4  * Copyright (C) 1996 David S. Miller (dm@engr.sgi.com)
5  * Copyright (C) 1998, 1999 Ralf Baechle
6  * Copyright (C) 1999 Silicon Graphics, Inc.
7  */
8 #ifndef _ASM_ASMMACRO_64_H
9 #define _ASM_ASMMACRO_64_H
10
11 #include <linux/config.h>
12 #include <asm/offset.h>
13 #include <asm/regdef.h>
14 #include <asm/fpregdef.h>
15 #include <asm/mipsregs.h>
16
17         .macro  fpu_save_16even thread tmp=t0
18         cfc1    \tmp, fcr31
19         sdc1    $f2,  THREAD_FPR2(\thread)
20         sdc1    $f4,  THREAD_FPR4(\thread)
21         sdc1    $f6,  THREAD_FPR6(\thread)
22         sdc1    $f8,  THREAD_FPR8(\thread)
23         sdc1    $f10, THREAD_FPR10(\thread)
24         sdc1    $f12, THREAD_FPR12(\thread)
25         sdc1    $f14, THREAD_FPR14(\thread)
26         sdc1    $f16, THREAD_FPR16(\thread)
27         sdc1    $f18, THREAD_FPR18(\thread)
28         sdc1    $f20, THREAD_FPR20(\thread)
29         sdc1    $f22, THREAD_FPR22(\thread)
30         sdc1    $f24, THREAD_FPR24(\thread)
31         sdc1    $f26, THREAD_FPR26(\thread)
32         sdc1    $f28, THREAD_FPR28(\thread)
33         sdc1    $f30, THREAD_FPR30(\thread)
34         sw      \tmp, THREAD_FCR31(\thread)
35         .endm
36
37         .macro  fpu_save_16odd thread
38         sdc1    $f1,  THREAD_FPR1(\thread)
39         sdc1    $f3,  THREAD_FPR3(\thread)
40         sdc1    $f5,  THREAD_FPR5(\thread)
41         sdc1    $f7,  THREAD_FPR7(\thread)
42         sdc1    $f9,  THREAD_FPR9(\thread)
43         sdc1    $f11, THREAD_FPR11(\thread)
44         sdc1    $f13, THREAD_FPR13(\thread)
45         sdc1    $f15, THREAD_FPR15(\thread)
46         sdc1    $f17, THREAD_FPR17(\thread)
47         sdc1    $f19, THREAD_FPR19(\thread)
48         sdc1    $f21, THREAD_FPR21(\thread)
49         sdc1    $f23, THREAD_FPR23(\thread)
50         sdc1    $f25, THREAD_FPR25(\thread)
51         sdc1    $f27, THREAD_FPR27(\thread)
52         sdc1    $f29, THREAD_FPR29(\thread)
53         sdc1    $f31, THREAD_FPR31(\thread)
54         .endm
55
56         .macro  fpu_restore_16even thread tmp=t0
57         lw      \tmp, THREAD_FCR31(\thread)
58         ldc1    $f0,  THREAD_FPR0(\thread)
59         ldc1    $f2,  THREAD_FPR2(\thread)
60         ldc1    $f4,  THREAD_FPR4(\thread)
61         ldc1    $f6,  THREAD_FPR6(\thread)
62         ldc1    $f8,  THREAD_FPR8(\thread)
63         ldc1    $f10, THREAD_FPR10(\thread)
64         ldc1    $f12, THREAD_FPR12(\thread)
65         ldc1    $f14, THREAD_FPR14(\thread)
66         ldc1    $f16, THREAD_FPR16(\thread)
67         ldc1    $f18, THREAD_FPR18(\thread)
68         ldc1    $f20, THREAD_FPR20(\thread)
69         ldc1    $f22, THREAD_FPR22(\thread)
70         ldc1    $f24, THREAD_FPR24(\thread)
71         ldc1    $f26, THREAD_FPR26(\thread)
72         ldc1    $f28, THREAD_FPR28(\thread)
73         ldc1    $f30, THREAD_FPR30(\thread)
74         ctc1    \tmp, fcr31
75         .endm
76
77         .macro  fpu_restore_16odd thread
78         ldc1    $f1,  THREAD_FPR1(\thread)
79         ldc1    $f3,  THREAD_FPR3(\thread)
80         ldc1    $f5,  THREAD_FPR5(\thread)
81         ldc1    $f7,  THREAD_FPR7(\thread)
82         ldc1    $f9,  THREAD_FPR9(\thread)
83         ldc1    $f11, THREAD_FPR11(\thread)
84         ldc1    $f13, THREAD_FPR13(\thread)
85         ldc1    $f15, THREAD_FPR15(\thread)
86         ldc1    $f17, THREAD_FPR17(\thread)
87         ldc1    $f19, THREAD_FPR19(\thread)
88         ldc1    $f21, THREAD_FPR21(\thread)
89         ldc1    $f23, THREAD_FPR23(\thread)
90         ldc1    $f25, THREAD_FPR25(\thread)
91         ldc1    $f27, THREAD_FPR27(\thread)
92         ldc1    $f29, THREAD_FPR29(\thread)
93         ldc1    $f31, THREAD_FPR31(\thread)
94         .endm
95
96         .macro  cpu_save_nonscratch thread
97         LONG_S  s0, THREAD_REG16(\thread)
98         LONG_S  s1, THREAD_REG17(\thread)
99         LONG_S  s2, THREAD_REG18(\thread)
100         LONG_S  s3, THREAD_REG19(\thread)
101         LONG_S  s4, THREAD_REG20(\thread)
102         LONG_S  s5, THREAD_REG21(\thread)
103         LONG_S  s6, THREAD_REG22(\thread)
104         LONG_S  s7, THREAD_REG23(\thread)
105         LONG_S  sp, THREAD_REG29(\thread)
106         LONG_S  fp, THREAD_REG30(\thread)
107         .endm
108
109         .macro  cpu_restore_nonscratch thread
110         LONG_L  s0, THREAD_REG16(\thread)
111         LONG_L  s1, THREAD_REG17(\thread)
112         LONG_L  s2, THREAD_REG18(\thread)
113         LONG_L  s3, THREAD_REG19(\thread)
114         LONG_L  s4, THREAD_REG20(\thread)
115         LONG_L  s5, THREAD_REG21(\thread)
116         LONG_L  s6, THREAD_REG22(\thread)
117         LONG_L  s7, THREAD_REG23(\thread)
118         LONG_L  sp, THREAD_REG29(\thread)
119         LONG_L  fp, THREAD_REG30(\thread)
120         LONG_L  ra, THREAD_REG31(\thread)
121         .endm
122
123 #endif /* _ASM_ASMMACRO_64_H */