2 * asmmacro.h: Assembler macros to make things easier to read.
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.
8 #ifndef _ASM_ASMMACRO_64_H
9 #define _ASM_ASMMACRO_64_H
11 #include <asm/offset.h>
12 #include <asm/regdef.h>
13 #include <asm/fpregdef.h>
14 #include <asm/mipsregs.h>
16 .macro fpu_save_16even thread tmp
=t0
18 sdc1 $f2
, THREAD_FPR2(\thread
)
19 sdc1 $f4
, THREAD_FPR4(\thread
)
20 sdc1 $f6
, THREAD_FPR6(\thread
)
21 sdc1 $f8
, THREAD_FPR8(\thread
)
22 sdc1 $f10
, THREAD_FPR10(\thread
)
23 sdc1 $f12
, THREAD_FPR12(\thread
)
24 sdc1 $f14
, THREAD_FPR14(\thread
)
25 sdc1 $f16
, THREAD_FPR16(\thread
)
26 sdc1 $f18
, THREAD_FPR18(\thread
)
27 sdc1 $f20
, THREAD_FPR20(\thread
)
28 sdc1 $f22
, THREAD_FPR22(\thread
)
29 sdc1 $f24
, THREAD_FPR24(\thread
)
30 sdc1 $f26
, THREAD_FPR26(\thread
)
31 sdc1 $f28
, THREAD_FPR28(\thread
)
32 sdc1 $f30
, THREAD_FPR30(\thread
)
33 sw
\tmp
, THREAD_FCR31(\thread
)
36 .macro fpu_save_16odd thread
37 sdc1 $f1
, THREAD_FPR1(\thread
)
38 sdc1 $f3
, THREAD_FPR3(\thread
)
39 sdc1 $f5
, THREAD_FPR5(\thread
)
40 sdc1 $f7
, THREAD_FPR7(\thread
)
41 sdc1 $f9
, THREAD_FPR9(\thread
)
42 sdc1 $f11
, THREAD_FPR11(\thread
)
43 sdc1 $f13
, THREAD_FPR13(\thread
)
44 sdc1 $f15
, THREAD_FPR15(\thread
)
45 sdc1 $f17
, THREAD_FPR17(\thread
)
46 sdc1 $f19
, THREAD_FPR19(\thread
)
47 sdc1 $f21
, THREAD_FPR21(\thread
)
48 sdc1 $f23
, THREAD_FPR23(\thread
)
49 sdc1 $f25
, THREAD_FPR25(\thread
)
50 sdc1 $f27
, THREAD_FPR27(\thread
)
51 sdc1 $f29
, THREAD_FPR29(\thread
)
52 sdc1 $f31
, THREAD_FPR31(\thread
)
55 .macro fpu_restore_16even thread tmp
=t0
56 lw
\tmp
, THREAD_FCR31(\thread
)
57 ldc1 $f0
, THREAD_FPR0(\thread
)
58 ldc1 $f2
, THREAD_FPR2(\thread
)
59 ldc1 $f4
, THREAD_FPR4(\thread
)
60 ldc1 $f6
, THREAD_FPR6(\thread
)
61 ldc1 $f8
, THREAD_FPR8(\thread
)
62 ldc1 $f10
, THREAD_FPR10(\thread
)
63 ldc1 $f12
, THREAD_FPR12(\thread
)
64 ldc1 $f14
, THREAD_FPR14(\thread
)
65 ldc1 $f16
, THREAD_FPR16(\thread
)
66 ldc1 $f18
, THREAD_FPR18(\thread
)
67 ldc1 $f20
, THREAD_FPR20(\thread
)
68 ldc1 $f22
, THREAD_FPR22(\thread
)
69 ldc1 $f24
, THREAD_FPR24(\thread
)
70 ldc1 $f26
, THREAD_FPR26(\thread
)
71 ldc1 $f28
, THREAD_FPR28(\thread
)
72 ldc1 $f30
, THREAD_FPR30(\thread
)
76 .macro fpu_restore_16odd thread
77 ldc1 $f1
, THREAD_FPR1(\thread
)
78 ldc1 $f3
, THREAD_FPR3(\thread
)
79 ldc1 $f5
, THREAD_FPR5(\thread
)
80 ldc1 $f7
, THREAD_FPR7(\thread
)
81 ldc1 $f9
, THREAD_FPR9(\thread
)
82 ldc1 $f11
, THREAD_FPR11(\thread
)
83 ldc1 $f13
, THREAD_FPR13(\thread
)
84 ldc1 $f15
, THREAD_FPR15(\thread
)
85 ldc1 $f17
, THREAD_FPR17(\thread
)
86 ldc1 $f19
, THREAD_FPR19(\thread
)
87 ldc1 $f21
, THREAD_FPR21(\thread
)
88 ldc1 $f23
, THREAD_FPR23(\thread
)
89 ldc1 $f25
, THREAD_FPR25(\thread
)
90 ldc1 $f27
, THREAD_FPR27(\thread
)
91 ldc1 $f29
, THREAD_FPR29(\thread
)
92 ldc1 $f31
, THREAD_FPR31(\thread
)
95 .macro cpu_save_nonscratch thread
96 LONG_S s0
, THREAD_REG16(\thread
)
97 LONG_S s1
, THREAD_REG17(\thread
)
98 LONG_S s2
, THREAD_REG18(\thread
)
99 LONG_S s3
, THREAD_REG19(\thread
)
100 LONG_S s4
, THREAD_REG20(\thread
)
101 LONG_S s5
, THREAD_REG21(\thread
)
102 LONG_S s6
, THREAD_REG22(\thread
)
103 LONG_S s7
, THREAD_REG23(\thread
)
104 LONG_S sp
, THREAD_REG29(\thread
)
105 LONG_S fp
, THREAD_REG30(\thread
)
108 .macro cpu_restore_nonscratch thread
109 LONG_L s0
, THREAD_REG16(\thread
)
110 LONG_L s1
, THREAD_REG17(\thread
)
111 LONG_L s2
, THREAD_REG18(\thread
)
112 LONG_L s3
, THREAD_REG19(\thread
)
113 LONG_L s4
, THREAD_REG20(\thread
)
114 LONG_L s5
, THREAD_REG21(\thread
)
115 LONG_L s6
, THREAD_REG22(\thread
)
116 LONG_L s7
, THREAD_REG23(\thread
)
117 LONG_L sp
, THREAD_REG29(\thread
)
118 LONG_L fp
, THREAD_REG30(\thread
)
119 LONG_L ra
, THREAD_REG31(\thread
)
122 #endif /* _ASM_ASMMACRO_64_H */