2
# Copyright (c) 2003-2004 Jakub Jermar
5
# Redistribution and use in source and binary forms, with or without
6
# modification, are permitted provided that the following conditions
9
# - Redistributions of source code must retain the above copyright
10
# notice, this list of conditions and the following disclaimer.
11
# - Redistributions in binary form must reproduce the above copyright
12
# notice, this list of conditions and the following disclaimer in the
13
# documentation and/or other materials provided with the distribution.
14
# - The name of the author may not be used to endorse or promote products
15
# derived from this software without specific prior written permission.
17
# THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
18
# IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19
# OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20
# IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21
# INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22
# NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
23
# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
25
# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
26
# THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29
#include <arch/asm/regname.h>
49
.global asm_delay_loop
73
.global memcpy_from_uspace
74
.global memcpy_to_uspace
75
.global memcpy_from_uspace_failover_address
76
.global memcpy_to_uspace_failover_address
80
move $t2, $a0 # save dst
83
li $v1, -4 # 0xfffffffffffffffc
146
memcpy_from_uspace_failover_address:
147
memcpy_to_uspace_failover_address:
153
.macro fpu_gp_save reg ctx
155
sw $t0, \reg * 4(\ctx)
158
.macro fpu_gp_restore reg ctx
159
lw $t0, \reg * 4(\ctx)
163
.macro fpu_ct_save reg ctx
165
sw $t0, (\reg + 32) * 4(\ctx)
168
.macro fpu_ct_restore reg ctx
169
lw $t0, (\reg + 32) * 4(\ctx)
174
.global fpu_context_save
245
.global fpu_context_restore
248
fpu_gp_restore 0, $a0
249
fpu_gp_restore 1, $a0
250
fpu_gp_restore 2, $a0
251
fpu_gp_restore 3, $a0
252
fpu_gp_restore 4, $a0
253
fpu_gp_restore 5, $a0
254
fpu_gp_restore 6, $a0
255
fpu_gp_restore 7, $a0
256
fpu_gp_restore 8, $a0
257
fpu_gp_restore 9, $a0
258
fpu_gp_restore 10, $a0
259
fpu_gp_restore 11, $a0
260
fpu_gp_restore 12, $a0
261
fpu_gp_restore 13, $a0
262
fpu_gp_restore 14, $a0
263
fpu_gp_restore 15, $a0
264
fpu_gp_restore 16, $a0
265
fpu_gp_restore 17, $a0
266
fpu_gp_restore 18, $a0
267
fpu_gp_restore 19, $a0
268
fpu_gp_restore 20, $a0
269
fpu_gp_restore 21, $a0
270
fpu_gp_restore 22, $a0
271
fpu_gp_restore 23, $a0
272
fpu_gp_restore 24, $a0
273
fpu_gp_restore 25, $a0
274
fpu_gp_restore 26, $a0
275
fpu_gp_restore 27, $a0
276
fpu_gp_restore 28, $a0
277
fpu_gp_restore 29, $a0
278
fpu_gp_restore 30, $a0
279
fpu_gp_restore 31, $a0
281
fpu_ct_restore 1, $a0
282
fpu_ct_restore 2, $a0
283
fpu_ct_restore 3, $a0
284
fpu_ct_restore 4, $a0
285
fpu_ct_restore 5, $a0
286
fpu_ct_restore 6, $a0
287
fpu_ct_restore 7, $a0
288
fpu_ct_restore 8, $a0
289
fpu_ct_restore 9, $a0
290
fpu_ct_restore 10, $a0
291
fpu_ct_restore 11, $a0
292
fpu_ct_restore 12, $a0
293
fpu_ct_restore 13, $a0
294
fpu_ct_restore 14, $a0
295
fpu_ct_restore 15, $a0
296
fpu_ct_restore 16, $a0
297
fpu_ct_restore 17, $a0
298
fpu_ct_restore 18, $a0
299
fpu_ct_restore 19, $a0
300
fpu_ct_restore 20, $a0
301
fpu_ct_restore 21, $a0
302
fpu_ct_restore 22, $a0
303
fpu_ct_restore 23, $a0
304
fpu_ct_restore 24, $a0
305
fpu_ct_restore 25, $a0
306
fpu_ct_restore 26, $a0
307
fpu_ct_restore 27, $a0
308
fpu_ct_restore 28, $a0
309
fpu_ct_restore 29, $a0
310
fpu_ct_restore 30, $a0
311
fpu_ct_restore 31, $a0