File tree Expand file tree Collapse file tree 2 files changed +79
-76
lines changed Expand file tree Collapse file tree 2 files changed +79
-76
lines changed Original file line number Diff line number Diff line change 12
12
* Copyright (c) 1998 Harald Koerfgen
13
13
*/
14
14
#include <asm/asm.h>
15
+ #include <asm/asmmacro.h>
15
16
#include <asm/errno.h>
17
+ #include <asm/export.h>
16
18
#include <asm/fpregdef.h>
17
19
#include <asm/mipsregs.h>
18
20
#include <asm/asm-offsets.h>
31
33
PTR 9b+4 ,bad_stack; \
32
34
.previous
33
35
34
- .set noreorder
35
36
.set mips1
36
37
38
+ /*
39
+ * Save a thread's fp context.
40
+ */
41
+ LEAF(_save_fp)
42
+ EXPORT_SYMBOL(_save_fp)
43
+ fpu_save_single a0, t1 # clobbers t1
44
+ jr ra
45
+ END(_save_fp)
46
+
47
+ /*
48
+ * Restore a thread's fp context.
49
+ */
50
+ LEAF(_restore_fp)
51
+ fpu_restore_single a0, t1 # clobbers t1
52
+ jr ra
53
+ END(_restore_fp)
54
+
55
+ /*
56
+ * Load the FPU with signalling NANS. This bit pattern we're using has
57
+ * the property that no matter whether considered as single or as double
58
+ * precision represents signaling NANS.
59
+ *
60
+ * The value to initialize fcr31 to comes in $a0.
61
+ */
62
+
63
+ .set push
64
+ SET_HARDFLOAT
65
+
66
+ LEAF(_init_fpu)
67
+ mfc0 t0, CP0_STATUS
68
+ li t1, ST0_CU1
69
+ or t0, t1
70
+ mtc0 t0, CP0_STATUS
71
+
72
+ ctc1 a0, fcr31
73
+
74
+ li t0, -1
75
+
76
+ mtc1 t0, $f0
77
+ mtc1 t0, $f1
78
+ mtc1 t0, $f2
79
+ mtc1 t0, $f3
80
+ mtc1 t0, $f4
81
+ mtc1 t0, $f5
82
+ mtc1 t0, $f6
83
+ mtc1 t0, $f7
84
+ mtc1 t0, $f8
85
+ mtc1 t0, $f9
86
+ mtc1 t0, $f10
87
+ mtc1 t0, $f11
88
+ mtc1 t0, $f12
89
+ mtc1 t0, $f13
90
+ mtc1 t0, $f14
91
+ mtc1 t0, $f15
92
+ mtc1 t0, $f16
93
+ mtc1 t0, $f17
94
+ mtc1 t0, $f18
95
+ mtc1 t0, $f19
96
+ mtc1 t0, $f20
97
+ mtc1 t0, $f21
98
+ mtc1 t0, $f22
99
+ mtc1 t0, $f23
100
+ mtc1 t0, $f24
101
+ mtc1 t0, $f25
102
+ mtc1 t0, $f26
103
+ mtc1 t0, $f27
104
+ mtc1 t0, $f28
105
+ mtc1 t0, $f29
106
+ mtc1 t0, $f30
107
+ mtc1 t0, $f31
108
+ jr ra
109
+ END(_init_fpu)
110
+
111
+ .set pop
112
+
113
+ .set noreorder
114
+
37
115
/**
38
116
* _save_fp_context() - save FP context from the FPU
39
117
* @a0 - pointer to fpregs field of sigcontext
Original file line number Diff line number Diff line change @@ -68,78 +68,3 @@ LEAF(resume)
68
68
move v0, a0
69
69
jr ra
70
70
END(resume)
71
-
72
- /*
73
- * Save a thread's fp context.
74
- */
75
- LEAF(_save_fp)
76
- EXPORT_SYMBOL(_save_fp)
77
- fpu_save_single a0, t1 # clobbers t1
78
- jr ra
79
- END(_save_fp)
80
-
81
- /*
82
- * Restore a thread's fp context.
83
- */
84
- LEAF(_restore_fp)
85
- fpu_restore_single a0, t1 # clobbers t1
86
- jr ra
87
- END(_restore_fp)
88
-
89
- /*
90
- * Load the FPU with signalling NANS. This bit pattern we're using has
91
- * the property that no matter whether considered as single or as double
92
- * precision represents signaling NANS.
93
- *
94
- * The value to initialize fcr31 to comes in $a0.
95
- */
96
-
97
- .set push
98
- SET_HARDFLOAT
99
-
100
- LEAF(_init_fpu)
101
- mfc0 t0, CP0_STATUS
102
- li t1, ST0_CU1
103
- or t0, t1
104
- mtc0 t0, CP0_STATUS
105
-
106
- ctc1 a0, fcr31
107
-
108
- li t0, -1
109
-
110
- mtc1 t0, $f0
111
- mtc1 t0, $f1
112
- mtc1 t0, $f2
113
- mtc1 t0, $f3
114
- mtc1 t0, $f4
115
- mtc1 t0, $f5
116
- mtc1 t0, $f6
117
- mtc1 t0, $f7
118
- mtc1 t0, $f8
119
- mtc1 t0, $f9
120
- mtc1 t0, $f10
121
- mtc1 t0, $f11
122
- mtc1 t0, $f12
123
- mtc1 t0, $f13
124
- mtc1 t0, $f14
125
- mtc1 t0, $f15
126
- mtc1 t0, $f16
127
- mtc1 t0, $f17
128
- mtc1 t0, $f18
129
- mtc1 t0, $f19
130
- mtc1 t0, $f20
131
- mtc1 t0, $f21
132
- mtc1 t0, $f22
133
- mtc1 t0, $f23
134
- mtc1 t0, $f24
135
- mtc1 t0, $f25
136
- mtc1 t0, $f26
137
- mtc1 t0, $f27
138
- mtc1 t0, $f28
139
- mtc1 t0, $f29
140
- mtc1 t0, $f30
141
- mtc1 t0, $f31
142
- jr ra
143
- END(_init_fpu)
144
-
145
- .set pop
You can’t perform that action at this time.
0 commit comments