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