Subversion Repositories HelenOS

Rev

Rev 1854 | Rev 1860 | Go to most recent revision | Only display areas with differences | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 1854 Rev 1856
1
/*
1
/*
2
 * Copyright (C) 2005 Jakub Jermar
2
 * Copyright (C) 2005 Jakub Jermar
3
 * All rights reserved.
3
 * All rights reserved.
4
 *
4
 *
5
 * Redistribution and use in source and binary forms, with or without
5
 * Redistribution and use in source and binary forms, with or without
6
 * modification, are permitted provided that the following conditions
6
 * modification, are permitted provided that the following conditions
7
 * are met:
7
 * are met:
8
 *
8
 *
9
 * - Redistributions of source code must retain the above copyright
9
 * - Redistributions of source code must retain the above copyright
10
 *   notice, this list of conditions and the following disclaimer.
10
 *   notice, this list of conditions and the following disclaimer.
11
 * - Redistributions in binary form must reproduce the above copyright
11
 * - Redistributions in binary form must reproduce the above copyright
12
 *   notice, this list of conditions and the following disclaimer in the
12
 *   notice, this list of conditions and the following disclaimer in the
13
 *   documentation and/or other materials provided with the distribution.
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
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.
15
 *   derived from this software without specific prior written permission.
16
 *
16
 *
17
 * THIS SOFTWARE IS PROVIDED BY THE AUTHOR ``AS IS'' AND ANY EXPRESS OR
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
18
 * IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
19
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
19
 * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
20
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
20
 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT,
21
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
21
 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
22
 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
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
23
 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
24
 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
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
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.
26
 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
27
 */
27
 */
28
 
28
 
29
/** @addtogroup sparc64interrupt
29
/** @addtogroup sparc64interrupt
30
 * @{
30
 * @{
31
 */
31
 */
32
/**
32
/**
33
 * @file
33
 * @file
34
 * @brief This file contains register window trap handlers.
34
 * @brief This file contains register window trap handlers.
35
 */
35
 */
36
 
36
 
37
#ifndef __sparc64_REGWIN_H__
37
#ifndef __sparc64_REGWIN_H__
38
#define __sparc64_REGWIN_H__
38
#define __sparc64_REGWIN_H__
39
 
39
 
40
#include <arch/stack.h>
40
#include <arch/stack.h>
41
#include <arch/arch.h>
41
#include <arch/arch.h>
42
 
42
 
43
#define TT_CLEAN_WINDOW         0x24
43
#define TT_CLEAN_WINDOW         0x24
44
#define TT_SPILL_0_NORMAL       0x80
44
#define TT_SPILL_0_NORMAL       0x80    /* kernel spills */
-
 
45
#define TT_SPILL_1_NORMAL       0x84    /* userspace spills */
-
 
46
#define TT_SPILL_2_NORMAL       0x88    /* spills to userspace window buffer */
-
 
47
#define TT_SPILL_0_OTHER        0xa0    /* spills to userspace window buffer */
45
#define TT_FILL_0_NORMAL        0xc0
48
#define TT_FILL_0_NORMAL        0xc0    /* kernel fills */
-
 
49
#define TT_FILL_1_NORMAL        0xc4    /* userspace fills */
46
 
50
 
47
#define REGWIN_HANDLER_SIZE     128
51
#define REGWIN_HANDLER_SIZE     128
48
 
52
 
49
#define CLEAN_WINDOW_HANDLER_SIZE   REGWIN_HANDLER_SIZE
53
#define CLEAN_WINDOW_HANDLER_SIZE   REGWIN_HANDLER_SIZE
50
#define SPILL_HANDLER_SIZE      REGWIN_HANDLER_SIZE
54
#define SPILL_HANDLER_SIZE      REGWIN_HANDLER_SIZE
51
#define FILL_HANDLER_SIZE       REGWIN_HANDLER_SIZE
55
#define FILL_HANDLER_SIZE       REGWIN_HANDLER_SIZE
52
 
56
 
53
/* Window Save Area offsets. */
57
/* Window Save Area offsets. */
54
#define L0_OFFSET   0
58
#define L0_OFFSET   0
55
#define L1_OFFSET   8
59
#define L1_OFFSET   8
56
#define L2_OFFSET   16
60
#define L2_OFFSET   16
57
#define L3_OFFSET   24
61
#define L3_OFFSET   24
58
#define L4_OFFSET   32
62
#define L4_OFFSET   32
59
#define L5_OFFSET   40
63
#define L5_OFFSET   40
60
#define L6_OFFSET   48
64
#define L6_OFFSET   48
61
#define L7_OFFSET   56
65
#define L7_OFFSET   56
62
#define I0_OFFSET   64
66
#define I0_OFFSET   64
63
#define I1_OFFSET   72
67
#define I1_OFFSET   72
64
#define I2_OFFSET   80
68
#define I2_OFFSET   80
65
#define I3_OFFSET   88
69
#define I3_OFFSET   88
66
#define I4_OFFSET   96
70
#define I4_OFFSET   96
67
#define I5_OFFSET   104
71
#define I5_OFFSET   104
68
#define I6_OFFSET   112
72
#define I6_OFFSET   112
69
#define I7_OFFSET   120
73
#define I7_OFFSET   120
70
 
74
 
71
#ifdef __ASM__
75
#ifdef __ASM__
72
 
76
 
73
/*
77
/*
74
 * Macro used by the nucleus and the primary context 0 during normal and other spills.
78
 * Macro used by the nucleus and the primary context 0 during normal and other spills.
75
 */
79
 */
76
.macro SPILL_NORMAL_HANDLER_KERNEL
80
.macro SPILL_NORMAL_HANDLER_KERNEL
77
    stx %l0, [%sp + STACK_BIAS + L0_OFFSET]
81
    stx %l0, [%sp + STACK_BIAS + L0_OFFSET]
78
    stx %l1, [%sp + STACK_BIAS + L1_OFFSET]
82
    stx %l1, [%sp + STACK_BIAS + L1_OFFSET]
79
    stx %l2, [%sp + STACK_BIAS + L2_OFFSET]
83
    stx %l2, [%sp + STACK_BIAS + L2_OFFSET]
80
    stx %l3, [%sp + STACK_BIAS + L3_OFFSET]
84
    stx %l3, [%sp + STACK_BIAS + L3_OFFSET]
81
    stx %l4, [%sp + STACK_BIAS + L4_OFFSET]
85
    stx %l4, [%sp + STACK_BIAS + L4_OFFSET]
82
    stx %l5, [%sp + STACK_BIAS + L5_OFFSET]
86
    stx %l5, [%sp + STACK_BIAS + L5_OFFSET]
83
    stx %l6, [%sp + STACK_BIAS + L6_OFFSET]
87
    stx %l6, [%sp + STACK_BIAS + L6_OFFSET]
84
    stx %l7, [%sp + STACK_BIAS + L7_OFFSET]
88
    stx %l7, [%sp + STACK_BIAS + L7_OFFSET]
85
    stx %i0, [%sp + STACK_BIAS + I0_OFFSET]
89
    stx %i0, [%sp + STACK_BIAS + I0_OFFSET]
86
    stx %i1, [%sp + STACK_BIAS + I1_OFFSET]
90
    stx %i1, [%sp + STACK_BIAS + I1_OFFSET]
87
    stx %i2, [%sp + STACK_BIAS + I2_OFFSET]
91
    stx %i2, [%sp + STACK_BIAS + I2_OFFSET]
88
    stx %i3, [%sp + STACK_BIAS + I3_OFFSET]
92
    stx %i3, [%sp + STACK_BIAS + I3_OFFSET]
89
    stx %i4, [%sp + STACK_BIAS + I4_OFFSET]
93
    stx %i4, [%sp + STACK_BIAS + I4_OFFSET]
90
    stx %i5, [%sp + STACK_BIAS + I5_OFFSET]
94
    stx %i5, [%sp + STACK_BIAS + I5_OFFSET]
91
    stx %i6, [%sp + STACK_BIAS + I6_OFFSET]
95
    stx %i6, [%sp + STACK_BIAS + I6_OFFSET]
92
    stx %i7, [%sp + STACK_BIAS + I7_OFFSET]
96
    stx %i7, [%sp + STACK_BIAS + I7_OFFSET]
93
    saved
97
    saved
94
    retry
98
    retry
95
.endm
99
.endm
96
 
100
 
97
/*
101
/*
98
 * Macro used by the userspace during normal spills.
102
 * Macro used by the userspace during normal spills.
99
 */
103
 */
100
.macro SPILL_NORMAL_HANDLER_USERSPACE
104
.macro SPILL_NORMAL_HANDLER_USERSPACE
101
    wr ASI_AIUP, %asi
105
    wr %g0, ASI_AIUP, %asi
102
    stxa %l0, [%sp + STACK_BIAS + L0_OFFSET] %asi
106
    stxa %l0, [%sp + STACK_BIAS + L0_OFFSET] %asi
103
    stxa %l1, [%sp + STACK_BIAS + L1_OFFSET] %asi
107
    stxa %l1, [%sp + STACK_BIAS + L1_OFFSET] %asi
104
    stxa %l2, [%sp + STACK_BIAS + L2_OFFSET] %asi
108
    stxa %l2, [%sp + STACK_BIAS + L2_OFFSET] %asi
105
    stxa %l3, [%sp + STACK_BIAS + L3_OFFSET] %asi
109
    stxa %l3, [%sp + STACK_BIAS + L3_OFFSET] %asi
106
    stxa %l4, [%sp + STACK_BIAS + L4_OFFSET] %asi
110
    stxa %l4, [%sp + STACK_BIAS + L4_OFFSET] %asi
107
    stxa %l5, [%sp + STACK_BIAS + L5_OFFSET] %asi
111
    stxa %l5, [%sp + STACK_BIAS + L5_OFFSET] %asi
108
    stxa %l6, [%sp + STACK_BIAS + L6_OFFSET] %asi
112
    stxa %l6, [%sp + STACK_BIAS + L6_OFFSET] %asi
109
    stxa %l7, [%sp + STACK_BIAS + L7_OFFSET] %asi
113
    stxa %l7, [%sp + STACK_BIAS + L7_OFFSET] %asi
110
    stxa %i0, [%sp + STACK_BIAS + I0_OFFSET] %asi
114
    stxa %i0, [%sp + STACK_BIAS + I0_OFFSET] %asi
111
    stxa %i1, [%sp + STACK_BIAS + I1_OFFSET] %asi
115
    stxa %i1, [%sp + STACK_BIAS + I1_OFFSET] %asi
112
    stxa %i2, [%sp + STACK_BIAS + I2_OFFSET] %asi
116
    stxa %i2, [%sp + STACK_BIAS + I2_OFFSET] %asi
113
    stxa %i3, [%sp + STACK_BIAS + I3_OFFSET] %asi
117
    stxa %i3, [%sp + STACK_BIAS + I3_OFFSET] %asi
114
    stxa %i4, [%sp + STACK_BIAS + I4_OFFSET] %asi
118
    stxa %i4, [%sp + STACK_BIAS + I4_OFFSET] %asi
115
    stxa %i5, [%sp + STACK_BIAS + I5_OFFSET] %asi
119
    stxa %i5, [%sp + STACK_BIAS + I5_OFFSET] %asi
116
    stxa %i6, [%sp + STACK_BIAS + I6_OFFSET] %asi
120
    stxa %i6, [%sp + STACK_BIAS + I6_OFFSET] %asi
117
    stxa %i7, [%sp + STACK_BIAS + I7_OFFSET] %asi
121
    stxa %i7, [%sp + STACK_BIAS + I7_OFFSET] %asi
118
    saved
122
    saved
119
    retry
123
    retry
120
.endm
124
.endm
121
 
125
 
122
/*
126
/*
123
 * Macro used by the userspace during other spills.
127
 * Macro used to spill userspace window to userspace window buffer.
-
 
128
 * It can be either triggered from preemptible_handler doing SAVE
-
 
129
 * at (TL=1) or from normal kernel code doing SAVE when OTHERWIN>0
-
 
130
 * at (TL=0).
124
 */
131
 */
125
.macro SPILL_OTHER_HANDLER_USERSPACE
132
.macro SPILL_TO_USPACE_WINDOW_BUFFER
126
    wr ASI_AIUS, %asi
-
 
127
    stxa %l0, [%sp + STACK_BIAS + L0_OFFSET] %asi
133
    stx %l0, [%g7 + L0_OFFSET] 
128
    stxa %l1, [%sp + STACK_BIAS + L1_OFFSET] %asi
134
    stx %l1, [%g7 + L1_OFFSET]
129
    stxa %l2, [%sp + STACK_BIAS + L2_OFFSET] %asi
135
    stx %l2, [%g7 + L2_OFFSET]
130
    stxa %l3, [%sp + STACK_BIAS + L3_OFFSET] %asi
136
    stx %l3, [%g7 + L3_OFFSET]
131
    stxa %l4, [%sp + STACK_BIAS + L4_OFFSET] %asi
137
    stx %l4, [%g7 + L4_OFFSET]
132
    stxa %l5, [%sp + STACK_BIAS + L5_OFFSET] %asi
138
    stx %l5, [%g7 + L5_OFFSET]
133
    stxa %l6, [%sp + STACK_BIAS + L6_OFFSET] %asi
139
    stx %l6, [%g7 + L6_OFFSET]
134
    stxa %l7, [%sp + STACK_BIAS + L7_OFFSET] %asi
140
    stx %l7, [%g7 + L7_OFFSET]
135
    stxa %i0, [%sp + STACK_BIAS + I0_OFFSET] %asi
141
    stx %i0, [%g7 + I0_OFFSET]
136
    stxa %i1, [%sp + STACK_BIAS + I1_OFFSET] %asi
142
    stx %i1, [%g7 + I1_OFFSET]
137
    stxa %i2, [%sp + STACK_BIAS + I2_OFFSET] %asi
143
    stx %i2, [%g7 + I2_OFFSET]
138
    stxa %i3, [%sp + STACK_BIAS + I3_OFFSET] %asi
144
    stx %i3, [%g7 + I3_OFFSET]
139
    stxa %i4, [%sp + STACK_BIAS + I4_OFFSET] %asi
145
    stx %i4, [%g7 + I4_OFFSET]
140
    stxa %i5, [%sp + STACK_BIAS + I5_OFFSET] %asi
146
    stx %i5, [%g7 + I5_OFFSET]
141
    stxa %i6, [%sp + STACK_BIAS + I6_OFFSET] %asi
147
    stx %i6, [%g7 + I6_OFFSET]
142
    stxa %i7, [%sp + STACK_BIAS + I7_OFFSET] %asi
148
    stx %i7, [%g7 + I7_OFFSET]
-
 
149
    add %g7, STACK_WINDOW_SAVE_AREA_SIZE, %g7
143
    saved
150
    saved
144
    retry
151
    retry
145
.endm
152
.endm
146
 
153
 
147
 
154
 
148
/*
155
/*
149
 * Macro used by the nucleus and the primary context 0 during normal fills.
156
 * Macro used by the nucleus and the primary context 0 during normal fills.
150
 */
157
 */
151
.macro FILL_NORMAL_HANDLER_KERNEL
158
.macro FILL_NORMAL_HANDLER_KERNEL
152
    ldx [%sp + STACK_BIAS + L0_OFFSET], %l0
159
    ldx [%sp + STACK_BIAS + L0_OFFSET], %l0
153
    ldx [%sp + STACK_BIAS + L1_OFFSET], %l1
160
    ldx [%sp + STACK_BIAS + L1_OFFSET], %l1
154
    ldx [%sp + STACK_BIAS + L2_OFFSET], %l2
161
    ldx [%sp + STACK_BIAS + L2_OFFSET], %l2
155
    ldx [%sp + STACK_BIAS + L3_OFFSET], %l3
162
    ldx [%sp + STACK_BIAS + L3_OFFSET], %l3
156
    ldx [%sp + STACK_BIAS + L4_OFFSET], %l4
163
    ldx [%sp + STACK_BIAS + L4_OFFSET], %l4
157
    ldx [%sp + STACK_BIAS + L5_OFFSET], %l5
164
    ldx [%sp + STACK_BIAS + L5_OFFSET], %l5
158
    ldx [%sp + STACK_BIAS + L6_OFFSET], %l6
165
    ldx [%sp + STACK_BIAS + L6_OFFSET], %l6
159
    ldx [%sp + STACK_BIAS + L7_OFFSET], %l7
166
    ldx [%sp + STACK_BIAS + L7_OFFSET], %l7
160
    ldx [%sp + STACK_BIAS + I0_OFFSET], %i0
167
    ldx [%sp + STACK_BIAS + I0_OFFSET], %i0
161
    ldx [%sp + STACK_BIAS + I1_OFFSET], %i1
168
    ldx [%sp + STACK_BIAS + I1_OFFSET], %i1
162
    ldx [%sp + STACK_BIAS + I2_OFFSET], %i2
169
    ldx [%sp + STACK_BIAS + I2_OFFSET], %i2
163
    ldx [%sp + STACK_BIAS + I3_OFFSET], %i3
170
    ldx [%sp + STACK_BIAS + I3_OFFSET], %i3
164
    ldx [%sp + STACK_BIAS + I4_OFFSET], %i4
171
    ldx [%sp + STACK_BIAS + I4_OFFSET], %i4
165
    ldx [%sp + STACK_BIAS + I5_OFFSET], %i5
172
    ldx [%sp + STACK_BIAS + I5_OFFSET], %i5
166
    ldx [%sp + STACK_BIAS + I6_OFFSET], %i6
173
    ldx [%sp + STACK_BIAS + I6_OFFSET], %i6
167
    ldx [%sp + STACK_BIAS + I7_OFFSET], %i7
174
    ldx [%sp + STACK_BIAS + I7_OFFSET], %i7
168
    restored
175
    restored
169
    retry
176
    retry
170
.endm
177
.endm
171
 
178
 
172
/*
179
/*
173
 * Macro used by the userspace during normal fills.
180
 * Macro used by the userspace during normal fills.
174
 */
181
 */
175
.macro FILL_NORMAL_HANDLER_USERSPACE
182
.macro FILL_NORMAL_HANDLER_USERSPACE
176
    wr ASI_AIUP, %asi
183
    wr %g0, ASI_AIUP, %asi
177
    ldxa [%sp + STACK_BIAS + L0_OFFSET] %asi, %l0
-
 
178
    ldxa [%sp + STACK_BIAS + L1_OFFSET] %asi, %l1
-
 
179
    ldxa [%sp + STACK_BIAS + L2_OFFSET] %asi, %l2
-
 
180
    ldxa [%sp + STACK_BIAS + L3_OFFSET] %asi, %l3
-
 
181
    ldxa [%sp + STACK_BIAS + L4_OFFSET] %asi, %l4
-
 
182
    ldxa [%sp + STACK_BIAS + L5_OFFSET] %asi, %l5
-
 
183
    ldxa [%sp + STACK_BIAS + L6_OFFSET] %asi, %l6
-
 
184
    ldxa [%sp + STACK_BIAS + L7_OFFSET] %asi, %l7
-
 
185
    ldxa [%sp + STACK_BIAS + I0_OFFSET] %asi, %i0
-
 
186
    ldxa [%sp + STACK_BIAS + I1_OFFSET] %asi, %i1
-
 
187
    ldxa [%sp + STACK_BIAS + I2_OFFSET] %asi, %i2
-
 
188
    ldxa [%sp + STACK_BIAS + I3_OFFSET] %asi, %i3
-
 
189
    ldxa [%sp + STACK_BIAS + I4_OFFSET] %asi, %i4
-
 
190
    ldxa [%sp + STACK_BIAS + I5_OFFSET] %asi, %i5
-
 
191
    ldxa [%sp + STACK_BIAS + I6_OFFSET] %asi, %i6
-
 
192
    ldxa [%sp + STACK_BIAS + I7_OFFSET] %asi, %i7
-
 
193
    restored
-
 
194
    retry
-
 
195
.endm
-
 
196
 
-
 
197
/*
-
 
198
 * Macro used by the userspace during other fills.
-
 
199
 */
-
 
200
.macro FILL_OTHER_HANDLER_USERSPACE
-
 
201
    wr ASI_AIUS, %asi
-
 
202
    ldxa [%sp + STACK_BIAS + L0_OFFSET] %asi, %l0
184
    ldxa [%sp + STACK_BIAS + L0_OFFSET] %asi, %l0
203
    ldxa [%sp + STACK_BIAS + L1_OFFSET] %asi, %l1
185
    ldxa [%sp + STACK_BIAS + L1_OFFSET] %asi, %l1
204
    ldxa [%sp + STACK_BIAS + L2_OFFSET] %asi, %l2
186
    ldxa [%sp + STACK_BIAS + L2_OFFSET] %asi, %l2
205
    ldxa [%sp + STACK_BIAS + L3_OFFSET] %asi, %l3
187
    ldxa [%sp + STACK_BIAS + L3_OFFSET] %asi, %l3
206
    ldxa [%sp + STACK_BIAS + L4_OFFSET] %asi, %l4
188
    ldxa [%sp + STACK_BIAS + L4_OFFSET] %asi, %l4
207
    ldxa [%sp + STACK_BIAS + L5_OFFSET] %asi, %l5
189
    ldxa [%sp + STACK_BIAS + L5_OFFSET] %asi, %l5
208
    ldxa [%sp + STACK_BIAS + L6_OFFSET] %asi, %l6
190
    ldxa [%sp + STACK_BIAS + L6_OFFSET] %asi, %l6
209
    ldxa [%sp + STACK_BIAS + L7_OFFSET] %asi, %l7
191
    ldxa [%sp + STACK_BIAS + L7_OFFSET] %asi, %l7
210
    ldxa [%sp + STACK_BIAS + I0_OFFSET] %asi, %i0
192
    ldxa [%sp + STACK_BIAS + I0_OFFSET] %asi, %i0
211
    ldxa [%sp + STACK_BIAS + I1_OFFSET] %asi, %i1
193
    ldxa [%sp + STACK_BIAS + I1_OFFSET] %asi, %i1
212
    ldxa [%sp + STACK_BIAS + I2_OFFSET] %asi, %i2
194
    ldxa [%sp + STACK_BIAS + I2_OFFSET] %asi, %i2
213
    ldxa [%sp + STACK_BIAS + I3_OFFSET] %asi, %i3
195
    ldxa [%sp + STACK_BIAS + I3_OFFSET] %asi, %i3
214
    ldxa [%sp + STACK_BIAS + I4_OFFSET] %asi, %i4
196
    ldxa [%sp + STACK_BIAS + I4_OFFSET] %asi, %i4
215
    ldxa [%sp + STACK_BIAS + I5_OFFSET] %asi, %i5
197
    ldxa [%sp + STACK_BIAS + I5_OFFSET] %asi, %i5
216
    ldxa [%sp + STACK_BIAS + I6_OFFSET] %asi, %i6
198
    ldxa [%sp + STACK_BIAS + I6_OFFSET] %asi, %i6
217
    ldxa [%sp + STACK_BIAS + I7_OFFSET] %asi, %i7
199
    ldxa [%sp + STACK_BIAS + I7_OFFSET] %asi, %i7
218
    restored
200
    restored
219
    retry
201
    retry
220
.endm
202
.endm
221
 
203
 
222
.macro CLEAN_WINDOW_HANDLER
204
.macro CLEAN_WINDOW_HANDLER
223
    rdpr %cleanwin, %l0
205
    rdpr %cleanwin, %l0
224
    add %l0, 1, %l0
206
    add %l0, 1, %l0
225
    wrpr %l0, 0, %cleanwin
207
    wrpr %l0, 0, %cleanwin
226
    mov %r0, %l0
208
    mov %r0, %l0
227
    mov %r0, %l1
209
    mov %r0, %l1
228
    mov %r0, %l2
210
    mov %r0, %l2
229
    mov %r0, %l3
211
    mov %r0, %l3
230
    mov %r0, %l4
212
    mov %r0, %l4
231
    mov %r0, %l5
213
    mov %r0, %l5
232
    mov %r0, %l6
214
    mov %r0, %l6
233
    mov %r0, %l7
215
    mov %r0, %l7
234
    mov %r0, %o0
216
    mov %r0, %o0
235
    mov %r0, %o1
217
    mov %r0, %o1
236
    mov %r0, %o2
218
    mov %r0, %o2
237
    mov %r0, %o3
219
    mov %r0, %o3
238
    mov %r0, %o4
220
    mov %r0, %o4
239
    mov %r0, %o5
221
    mov %r0, %o5
240
    mov %r0, %o6
222
    mov %r0, %o6
241
    mov %r0, %o7
223
    mov %r0, %o7
242
    retry
224
    retry
243
.endm
225
.endm
244
#endif /* __ASM__ */
226
#endif /* __ASM__ */
245
 
227
 
246
#endif
228
#endif
247
 
229
 
248
/** @}
230
/** @}
249
 */
231
 */
250
 
232