1
/* -*- Mode: C++; tab-width: 4; indent-tabs-mode: nil; c-basic-offset: 2 -*- */
2
/* ***** BEGIN LICENSE BLOCK *****
3
* Version: MPL 1.1/GPL 2.0/LGPL 2.1
5
* The contents of this file are subject to the Mozilla Public License Version
6
* 1.1 (the "License"); you may not use this file except in compliance with
7
* the License. You may obtain a copy of the License at
8
* http://www.mozilla.org/MPL/
10
* Software distributed under the License is distributed on an "AS IS" basis,
11
* WITHOUT WARRANTY OF ANY KIND, either express or implied. See the License
12
* for the specific language governing rights and limitations under the
15
* The Original Code is the Netscape Portable Runtime (NSPR).
17
* The Initial Developer of the Original Code is
18
* Netscape Communications Corporation.
19
* Portions created by the Initial Developer are Copyright (C) 1998-2000
20
* the Initial Developer. All Rights Reserved.
24
* Alternatively, the contents of this file may be used under the terms of
25
* either the GNU General Public License Version 2 or later (the "GPL"), or
26
* the GNU Lesser General Public License Version 2.1 or later (the "LGPL"),
27
* in which case the provisions of the GPL or the LGPL are applicable instead
28
* of those above. If you wish to allow use of your version of this file only
29
* under the terms of either the GPL or the LGPL, and not to allow others to
30
* use your version of this file under the terms of the MPL, indicate your
31
* decision by deleting the provisions above and replace them with the notice
32
* and other provisions required by the GPL or the LGPL. If you do not delete
33
* the provisions above, a recipient may use your version of this file under
34
* the terms of any one of the MPL, the GPL or the LGPL.
36
* ***** END LICENSE BLOCK ***** */
38
/* We want position independent code */
42
#include <sys/regdef.h>
43
#include <sys/syscall.h>
45
.file 1 "os_ReliantUNIX.s"
53
.frame sp,0,$31 # vars= 0, regs= 0/0, args= 0, extra= 0
55
sw ra,180(a0) # gpregs[CXT_EPC]
56
sw gp,152(a0) # gpregs[CXT_GP]
57
sw sp,156(a0) # gpregs[CXT_SP]
58
sw s8,160(a0) # gpregs[CXT_S8]
59
sw s0,104(a0) # gpregs[CXT_S0]
60
sw s1,108(a0) # gpregs[CXT_S1]
61
sw s2,112(a0) # gpregs[CXT_S2]
62
sw s3,116(a0) # gpregs[CXT_S3]
63
sw s4,120(a0) # gpregs[CXT_S4]
64
sw s5,124(a0) # gpregs[CXT_S5]
65
sw s6,128(a0) # gpregs[CXT_S6]
66
sw s7,132(a0) # gpregs[CXT_S7]
70
s.d $f20,264(a0) # fpregs.fp_r.fp_dregs[10]
71
s.d $f22,272(a0) # fpregs.fp_r.fp_dregs[11]
72
s.d $f24,280(a0) # fpregs.fp_r.fp_dregs[12]
73
s.d $f26,288(a0) # fpregs.fp_r.fp_dregs[13]
74
s.d $f28,296(a0) # fpregs.fp_r.fp_dregs[14]
75
s.d $f30,304(a0) # fpregs.fp_r.fp_dregs[15]
76
sw v0,312(a0) # fpregs.fp_csr
78
# give no illusions about the contents
79
li v0,0x0c # UC_CPU | UC_MAU
80
sw v0,0(a0) # uc_flags
90
.frame sp,0,$31 # vars= 0, regs= 0/0, args= 0, extra= 0
91
lw v0,312(a0) # fpregs.fp_csr
92
li v1,0xfffc0fff # mask out exception cause bits
95
lw t9,180(a0) # gpregs[CXT_EPC]
96
lw ra,180(a0) # gpregs[CXT_EPC]
97
lw gp,152(a0) # gpregs[CXT_GP]
98
lw sp,156(a0) # gpregs[CXT_SP]
100
lw s8,160(a0) # gpregs[CXT_S8]
101
lw s0,104(a0) # gpregs[CXT_S0]
102
lw s1,108(a0) # gpregs[CXT_S1]
103
lw s2,112(a0) # gpregs[CXT_S2]
104
lw s3,116(a0) # gpregs[CXT_S3]
105
lw s4,120(a0) # gpregs[CXT_S4]
106
lw s5,124(a0) # gpregs[CXT_S5]
107
lw s6,128(a0) # gpregs[CXT_S6]
108
lw s7,132(a0) # gpregs[CXT_S7]
110
l.d $f20,264(a0) # fpregs.fp_r.fp_dregs[10]
111
l.d $f22,272(a0) # fpregs.fp_r.fp_dregs[11]
112
l.d $f24,280(a0) # fpregs.fp_r.fp_dregs[12]
113
l.d $f26,288(a0) # fpregs.fp_r.fp_dregs[13]
114
l.d $f28,296(a0) # fpregs.fp_r.fp_dregs[14]
115
l.d $f30,304(a0) # fpregs.fp_r.fp_dregs[15]
118
# they were not saved, but maybe the user modified them...
124
lw a0,56(a0) # there is no way back