1 /* $Id: ttable.h,v 1.18 2002/02/09 19:49:32 davem Exp $ */
2 #ifndef _SPARC64_TTABLE_H
3 #define _SPARC64_TTABLE_H
8 #include <asm/thread_info.h>
11 #define BOOT_KERNEL b sparc64_boot; nop; nop; nop; nop; nop; nop; nop;
13 /* We need a "cleaned" instruction... */
14 #define CLEAN_WINDOW \
15 rdpr %cleanwin, %l0; add %l0, 1, %l0; \
16 wrpr %l0, 0x0, %cleanwin; \
17 clr %o0; clr %o1; clr %o2; clr %o3; \
18 clr %o4; clr %o5; clr %o6; clr %o7; \
19 clr %l0; clr %l1; clr %l2; clr %l3; \
20 clr %l4; clr %l5; clr %l6; clr %l7; \
22 nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;nop;
24 #define TRAP(routine) \
25 sethi %hi(109f), %g7; \
27 109: or %g7, %lo(109b), %g7; \
29 add %sp, PTREGS_OFF, %o0; \
34 #define TRAP_7INSNS(routine) \
35 sethi %hi(109f), %g7; \
37 109: or %g7, %lo(109b), %g7; \
39 add %sp, PTREGS_OFF, %o0; \
43 #define TRAP_SAVEFPU(routine) \
44 sethi %hi(109f), %g7; \
45 ba,pt %xcc, do_fptrap; \
46 109: or %g7, %lo(109b), %g7; \
48 add %sp, PTREGS_OFF, %o0; \
53 #define TRAP_NOSAVE(routine) \
54 ba,pt %xcc, routine; \
56 nop; nop; nop; nop; nop; nop;
58 #define TRAP_NOSAVE_7INSNS(routine) \
59 ba,pt %xcc, routine; \
61 nop; nop; nop; nop; nop;
63 #define TRAPTL1(routine) \
64 sethi %hi(109f), %g7; \
65 ba,pt %xcc, etraptl1; \
66 109: or %g7, %lo(109b), %g7; \
68 add %sp, PTREGS_OFF, %o0; \
73 #define TRAP_ARG(routine, arg) \
74 sethi %hi(109f), %g7; \
76 109: or %g7, %lo(109b), %g7; \
77 add %sp, PTREGS_OFF, %o0; \
83 #define TRAPTL1_ARG(routine, arg) \
84 sethi %hi(109f), %g7; \
85 ba,pt %xcc, etraptl1; \
86 109: or %g7, %lo(109b), %g7; \
87 add %sp, PTREGS_OFF, %o0; \
93 #define SYSCALL_TRAP(routine, systbl) \
94 sethi %hi(109f), %g7; \
96 109: or %g7, %lo(109b), %g7; \
97 sethi %hi(systbl), %l7; \
98 ba,pt %xcc, routine; \
99 or %l7, %lo(systbl), %l7; \
102 #define TRAP_UTRAP(handler,lvl) \
104 ba,pt %xcc, utrap_trap; \
113 #define LINUX_32BIT_SYSCALL_TRAP SYSCALL_TRAP(linux_sparc_syscall32, sys_call_table32)
115 #define LINUX_32BIT_SYSCALL_TRAP BTRAP(0x110)
117 #define LINUX_64BIT_SYSCALL_TRAP SYSCALL_TRAP(linux_sparc_syscall, sys_call_table64)
118 #define GETCC_TRAP TRAP(getcc)
119 #define SETCC_TRAP TRAP(setcc)
120 #define BREAKPOINT_TRAP TRAP(breakpoint_trap)
122 #ifdef CONFIG_TRACE_IRQFLAGS
124 #define TRAP_IRQ(routine, level) \
126 wrpr %g0, 15, %pil; \
127 sethi %hi(1f-4), %g7; \
128 ba,pt %xcc, etrap_irq; \
129 or %g7, %lo(1f-4), %g7; \
134 1: call trace_hardirqs_off; \
138 add %sp, PTREGS_OFF, %o1; \
139 ba,a,pt %xcc, rtrap_irq; \
144 #define TRAP_IRQ(routine, level) \
146 wrpr %g0, 15, %pil; \
147 ba,pt %xcc, etrap_irq; \
151 add %sp, PTREGS_OFF, %o1; \
152 ba,a,pt %xcc, rtrap_irq;
156 #define TRAP_IVEC TRAP_NOSAVE(do_ivec)
158 #define BTRAP(lvl) TRAP_ARG(bad_trap, lvl)
160 #define BTRAPTL1(lvl) TRAPTL1_ARG(bad_trap_tl1, lvl)
162 #define FLUSH_WINDOW_TRAP \
166 ldx [%sp + PTREGS_OFF + PT_V9_TNPC], %l1; \
168 stx %l1, [%sp + PTREGS_OFF + PT_V9_TPC]; \
170 stx %l2, [%sp + PTREGS_OFF + PT_V9_TNPC];
172 #ifdef CONFIG_KPROBES
173 #define KPROBES_TRAP(lvl) TRAP_IRQ(kprobe_trap, lvl)
175 #define KPROBES_TRAP(lvl) TRAP_ARG(bad_trap, lvl)
178 #define SUN4V_ITSB_MISS \
179 ldxa [%g0] ASI_SCRATCHPAD, %g2; \
180 ldx [%g2 + HV_FAULT_I_ADDR_OFFSET], %g4; \
181 ldx [%g2 + HV_FAULT_I_CTX_OFFSET], %g5; \
183 ba,pt %xcc, sun4v_itsb_miss; \
188 #define SUN4V_DTSB_MISS \
189 ldxa [%g0] ASI_SCRATCHPAD, %g2; \
190 ldx [%g2 + HV_FAULT_D_ADDR_OFFSET], %g4; \
191 ldx [%g2 + HV_FAULT_D_CTX_OFFSET], %g5; \
193 ba,pt %xcc, sun4v_dtsb_miss; \
198 /* Before touching these macros, you owe it to yourself to go and
199 * see how arch/sparc64/kernel/winfixup.S works... -DaveM
201 * For the user cases we used to use the %asi register, but
202 * it turns out that the "wr xxx, %asi" costs ~5 cycles, so
203 * now we use immediate ASI loads and stores instead. Kudos
204 * to Greg Onufer for pointing out this performance anomaly.
206 * Further note that we cannot use the g2, g4, g5, and g7 alternate
207 * globals in the spill routines, check out the save instruction in
208 * arch/sparc64/kernel/etrap.S to see what I mean about g2, and
209 * g4/g5 are the globals which are preserved by etrap processing
210 * for the caller of it. The g7 register is the return pc for
211 * etrap. Finally, g6 is the current thread register so we cannot
212 * us it in the spill handlers either. Most of these rules do not
213 * apply to fill processing, only g6 is not usable.
216 /* Normal kernel spill */
217 #define SPILL_0_NORMAL \
218 stx %l0, [%sp + STACK_BIAS + 0x00]; \
219 stx %l1, [%sp + STACK_BIAS + 0x08]; \
220 stx %l2, [%sp + STACK_BIAS + 0x10]; \
221 stx %l3, [%sp + STACK_BIAS + 0x18]; \
222 stx %l4, [%sp + STACK_BIAS + 0x20]; \
223 stx %l5, [%sp + STACK_BIAS + 0x28]; \
224 stx %l6, [%sp + STACK_BIAS + 0x30]; \
225 stx %l7, [%sp + STACK_BIAS + 0x38]; \
226 stx %i0, [%sp + STACK_BIAS + 0x40]; \
227 stx %i1, [%sp + STACK_BIAS + 0x48]; \
228 stx %i2, [%sp + STACK_BIAS + 0x50]; \
229 stx %i3, [%sp + STACK_BIAS + 0x58]; \
230 stx %i4, [%sp + STACK_BIAS + 0x60]; \
231 stx %i5, [%sp + STACK_BIAS + 0x68]; \
232 stx %i6, [%sp + STACK_BIAS + 0x70]; \
233 stx %i7, [%sp + STACK_BIAS + 0x78]; \
234 saved; retry; nop; nop; nop; nop; nop; nop; \
235 nop; nop; nop; nop; nop; nop; nop; nop;
237 #define SPILL_0_NORMAL_ETRAP \
238 etrap_kernel_spill: \
239 stx %l0, [%sp + STACK_BIAS + 0x00]; \
240 stx %l1, [%sp + STACK_BIAS + 0x08]; \
241 stx %l2, [%sp + STACK_BIAS + 0x10]; \
242 stx %l3, [%sp + STACK_BIAS + 0x18]; \
243 stx %l4, [%sp + STACK_BIAS + 0x20]; \
244 stx %l5, [%sp + STACK_BIAS + 0x28]; \
245 stx %l6, [%sp + STACK_BIAS + 0x30]; \
246 stx %l7, [%sp + STACK_BIAS + 0x38]; \
247 stx %i0, [%sp + STACK_BIAS + 0x40]; \
248 stx %i1, [%sp + STACK_BIAS + 0x48]; \
249 stx %i2, [%sp + STACK_BIAS + 0x50]; \
250 stx %i3, [%sp + STACK_BIAS + 0x58]; \
251 stx %i4, [%sp + STACK_BIAS + 0x60]; \
252 stx %i5, [%sp + STACK_BIAS + 0x68]; \
253 stx %i6, [%sp + STACK_BIAS + 0x70]; \
254 stx %i7, [%sp + STACK_BIAS + 0x78]; \
257 ba,pt %xcc, etrap_save; \
259 nop; nop; nop; nop; nop; nop; nop; nop; \
262 /* Normal 64bit spill */
263 #define SPILL_1_GENERIC(ASI) \
264 add %sp, STACK_BIAS + 0x00, %g1; \
265 stxa %l0, [%g1 + %g0] ASI; \
267 stxa %l1, [%g1 + %g3] ASI; \
268 add %g1, 0x10, %g1; \
269 stxa %l2, [%g1 + %g0] ASI; \
270 stxa %l3, [%g1 + %g3] ASI; \
271 add %g1, 0x10, %g1; \
272 stxa %l4, [%g1 + %g0] ASI; \
273 stxa %l5, [%g1 + %g3] ASI; \
274 add %g1, 0x10, %g1; \
275 stxa %l6, [%g1 + %g0] ASI; \
276 stxa %l7, [%g1 + %g3] ASI; \
277 add %g1, 0x10, %g1; \
278 stxa %i0, [%g1 + %g0] ASI; \
279 stxa %i1, [%g1 + %g3] ASI; \
280 add %g1, 0x10, %g1; \
281 stxa %i2, [%g1 + %g0] ASI; \
282 stxa %i3, [%g1 + %g3] ASI; \
283 add %g1, 0x10, %g1; \
284 stxa %i4, [%g1 + %g0] ASI; \
285 stxa %i5, [%g1 + %g3] ASI; \
286 add %g1, 0x10, %g1; \
287 stxa %i6, [%g1 + %g0] ASI; \
288 stxa %i7, [%g1 + %g3] ASI; \
291 b,a,pt %xcc, spill_fixup_dax; \
292 b,a,pt %xcc, spill_fixup_mna; \
293 b,a,pt %xcc, spill_fixup;
295 #define SPILL_1_GENERIC_ETRAP \
296 etrap_user_spill_64bit: \
297 stxa %l0, [%sp + STACK_BIAS + 0x00] %asi; \
298 stxa %l1, [%sp + STACK_BIAS + 0x08] %asi; \
299 stxa %l2, [%sp + STACK_BIAS + 0x10] %asi; \
300 stxa %l3, [%sp + STACK_BIAS + 0x18] %asi; \
301 stxa %l4, [%sp + STACK_BIAS + 0x20] %asi; \
302 stxa %l5, [%sp + STACK_BIAS + 0x28] %asi; \
303 stxa %l6, [%sp + STACK_BIAS + 0x30] %asi; \
304 stxa %l7, [%sp + STACK_BIAS + 0x38] %asi; \
305 stxa %i0, [%sp + STACK_BIAS + 0x40] %asi; \
306 stxa %i1, [%sp + STACK_BIAS + 0x48] %asi; \
307 stxa %i2, [%sp + STACK_BIAS + 0x50] %asi; \
308 stxa %i3, [%sp + STACK_BIAS + 0x58] %asi; \
309 stxa %i4, [%sp + STACK_BIAS + 0x60] %asi; \
310 stxa %i5, [%sp + STACK_BIAS + 0x68] %asi; \
311 stxa %i6, [%sp + STACK_BIAS + 0x70] %asi; \
312 stxa %i7, [%sp + STACK_BIAS + 0x78] %asi; \
315 ba,pt %xcc, etrap_save; \
317 nop; nop; nop; nop; nop; \
318 nop; nop; nop; nop; \
319 ba,a,pt %xcc, etrap_spill_fixup_64bit; \
320 ba,a,pt %xcc, etrap_spill_fixup_64bit; \
321 ba,a,pt %xcc, etrap_spill_fixup_64bit;
323 #define SPILL_1_GENERIC_ETRAP_FIXUP \
324 etrap_spill_fixup_64bit: \
325 ldub [%g6 + TI_WSAVED], %g1; \
328 stx %sp, [%g3 + TI_RWIN_SPTRS]; \
331 stx %l0, [%g3 + TI_REG_WINDOW + 0x00]; \
332 stx %l1, [%g3 + TI_REG_WINDOW + 0x08]; \
333 stx %l2, [%g3 + TI_REG_WINDOW + 0x10]; \
334 stx %l3, [%g3 + TI_REG_WINDOW + 0x18]; \
335 stx %l4, [%g3 + TI_REG_WINDOW + 0x20]; \
336 stx %l5, [%g3 + TI_REG_WINDOW + 0x28]; \
337 stx %l6, [%g3 + TI_REG_WINDOW + 0x30]; \
338 stx %l7, [%g3 + TI_REG_WINDOW + 0x38]; \
339 stx %i0, [%g3 + TI_REG_WINDOW + 0x40]; \
340 stx %i1, [%g3 + TI_REG_WINDOW + 0x48]; \
341 stx %i2, [%g3 + TI_REG_WINDOW + 0x50]; \
342 stx %i3, [%g3 + TI_REG_WINDOW + 0x58]; \
343 stx %i4, [%g3 + TI_REG_WINDOW + 0x60]; \
344 stx %i5, [%g3 + TI_REG_WINDOW + 0x68]; \
345 stx %i6, [%g3 + TI_REG_WINDOW + 0x70]; \
346 stx %i7, [%g3 + TI_REG_WINDOW + 0x78]; \
348 stb %g1, [%g6 + TI_WSAVED]; \
352 ba,pt %xcc, etrap_save; \
356 /* Normal 32bit spill */
357 #define SPILL_2_GENERIC(ASI) \
359 stwa %l0, [%sp + %g0] ASI; \
361 stwa %l1, [%sp + %g3] ASI; \
362 add %sp, 0x08, %g1; \
363 stwa %l2, [%g1 + %g0] ASI; \
364 stwa %l3, [%g1 + %g3] ASI; \
365 add %g1, 0x08, %g1; \
366 stwa %l4, [%g1 + %g0] ASI; \
367 stwa %l5, [%g1 + %g3] ASI; \
368 add %g1, 0x08, %g1; \
369 stwa %l6, [%g1 + %g0] ASI; \
370 stwa %l7, [%g1 + %g3] ASI; \
371 add %g1, 0x08, %g1; \
372 stwa %i0, [%g1 + %g0] ASI; \
373 stwa %i1, [%g1 + %g3] ASI; \
374 add %g1, 0x08, %g1; \
375 stwa %i2, [%g1 + %g0] ASI; \
376 stwa %i3, [%g1 + %g3] ASI; \
377 add %g1, 0x08, %g1; \
378 stwa %i4, [%g1 + %g0] ASI; \
379 stwa %i5, [%g1 + %g3] ASI; \
380 add %g1, 0x08, %g1; \
381 stwa %i6, [%g1 + %g0] ASI; \
382 stwa %i7, [%g1 + %g3] ASI; \
385 b,a,pt %xcc, spill_fixup_dax; \
386 b,a,pt %xcc, spill_fixup_mna; \
387 b,a,pt %xcc, spill_fixup;
389 #define SPILL_2_GENERIC_ETRAP \
390 etrap_user_spill_32bit: \
392 stwa %l0, [%sp + 0x00] %asi; \
393 stwa %l1, [%sp + 0x04] %asi; \
394 stwa %l2, [%sp + 0x08] %asi; \
395 stwa %l3, [%sp + 0x0c] %asi; \
396 stwa %l4, [%sp + 0x10] %asi; \
397 stwa %l5, [%sp + 0x14] %asi; \
398 stwa %l6, [%sp + 0x18] %asi; \
399 stwa %l7, [%sp + 0x1c] %asi; \
400 stwa %i0, [%sp + 0x20] %asi; \
401 stwa %i1, [%sp + 0x24] %asi; \
402 stwa %i2, [%sp + 0x28] %asi; \
403 stwa %i3, [%sp + 0x2c] %asi; \
404 stwa %i4, [%sp + 0x30] %asi; \
405 stwa %i5, [%sp + 0x34] %asi; \
406 stwa %i6, [%sp + 0x38] %asi; \
407 stwa %i7, [%sp + 0x3c] %asi; \
410 ba,pt %xcc, etrap_save; \
412 nop; nop; nop; nop; \
413 nop; nop; nop; nop; \
414 ba,a,pt %xcc, etrap_spill_fixup_32bit; \
415 ba,a,pt %xcc, etrap_spill_fixup_32bit; \
416 ba,a,pt %xcc, etrap_spill_fixup_32bit;
418 #define SPILL_2_GENERIC_ETRAP_FIXUP \
419 etrap_spill_fixup_32bit: \
420 ldub [%g6 + TI_WSAVED], %g1; \
423 stx %sp, [%g3 + TI_RWIN_SPTRS]; \
426 stw %l0, [%g3 + TI_REG_WINDOW + 0x00]; \
427 stw %l1, [%g3 + TI_REG_WINDOW + 0x04]; \
428 stw %l2, [%g3 + TI_REG_WINDOW + 0x08]; \
429 stw %l3, [%g3 + TI_REG_WINDOW + 0x0c]; \
430 stw %l4, [%g3 + TI_REG_WINDOW + 0x10]; \
431 stw %l5, [%g3 + TI_REG_WINDOW + 0x14]; \
432 stw %l6, [%g3 + TI_REG_WINDOW + 0x18]; \
433 stw %l7, [%g3 + TI_REG_WINDOW + 0x1c]; \
434 stw %i0, [%g3 + TI_REG_WINDOW + 0x20]; \
435 stw %i1, [%g3 + TI_REG_WINDOW + 0x24]; \
436 stw %i2, [%g3 + TI_REG_WINDOW + 0x28]; \
437 stw %i3, [%g3 + TI_REG_WINDOW + 0x2c]; \
438 stw %i4, [%g3 + TI_REG_WINDOW + 0x30]; \
439 stw %i5, [%g3 + TI_REG_WINDOW + 0x34]; \
440 stw %i6, [%g3 + TI_REG_WINDOW + 0x38]; \
441 stw %i7, [%g3 + TI_REG_WINDOW + 0x3c]; \
443 stb %g1, [%g6 + TI_WSAVED]; \
447 ba,pt %xcc, etrap_save; \
451 #define SPILL_1_NORMAL SPILL_1_GENERIC(ASI_AIUP)
452 #define SPILL_2_NORMAL SPILL_2_GENERIC(ASI_AIUP)
453 #define SPILL_3_NORMAL SPILL_0_NORMAL
454 #define SPILL_4_NORMAL SPILL_0_NORMAL
455 #define SPILL_5_NORMAL SPILL_0_NORMAL
456 #define SPILL_6_NORMAL SPILL_0_NORMAL
457 #define SPILL_7_NORMAL SPILL_0_NORMAL
459 #define SPILL_0_OTHER SPILL_0_NORMAL
460 #define SPILL_1_OTHER SPILL_1_GENERIC(ASI_AIUS)
461 #define SPILL_2_OTHER SPILL_2_GENERIC(ASI_AIUS)
462 #define SPILL_3_OTHER SPILL_3_NORMAL
463 #define SPILL_4_OTHER SPILL_4_NORMAL
464 #define SPILL_5_OTHER SPILL_5_NORMAL
465 #define SPILL_6_OTHER SPILL_6_NORMAL
466 #define SPILL_7_OTHER SPILL_7_NORMAL
468 /* Normal kernel fill */
469 #define FILL_0_NORMAL \
470 ldx [%sp + STACK_BIAS + 0x00], %l0; \
471 ldx [%sp + STACK_BIAS + 0x08], %l1; \
472 ldx [%sp + STACK_BIAS + 0x10], %l2; \
473 ldx [%sp + STACK_BIAS + 0x18], %l3; \
474 ldx [%sp + STACK_BIAS + 0x20], %l4; \
475 ldx [%sp + STACK_BIAS + 0x28], %l5; \
476 ldx [%sp + STACK_BIAS + 0x30], %l6; \
477 ldx [%sp + STACK_BIAS + 0x38], %l7; \
478 ldx [%sp + STACK_BIAS + 0x40], %i0; \
479 ldx [%sp + STACK_BIAS + 0x48], %i1; \
480 ldx [%sp + STACK_BIAS + 0x50], %i2; \
481 ldx [%sp + STACK_BIAS + 0x58], %i3; \
482 ldx [%sp + STACK_BIAS + 0x60], %i4; \
483 ldx [%sp + STACK_BIAS + 0x68], %i5; \
484 ldx [%sp + STACK_BIAS + 0x70], %i6; \
485 ldx [%sp + STACK_BIAS + 0x78], %i7; \
486 restored; retry; nop; nop; nop; nop; nop; nop; \
487 nop; nop; nop; nop; nop; nop; nop; nop;
489 #define FILL_0_NORMAL_RTRAP \
494 ldx [%sp + STACK_BIAS + 0x00], %l0; \
495 ldx [%sp + STACK_BIAS + 0x08], %l1; \
496 ldx [%sp + STACK_BIAS + 0x10], %l2; \
497 ldx [%sp + STACK_BIAS + 0x18], %l3; \
498 ldx [%sp + STACK_BIAS + 0x20], %l4; \
499 ldx [%sp + STACK_BIAS + 0x28], %l5; \
500 ldx [%sp + STACK_BIAS + 0x30], %l6; \
501 ldx [%sp + STACK_BIAS + 0x38], %l7; \
502 ldx [%sp + STACK_BIAS + 0x40], %i0; \
503 ldx [%sp + STACK_BIAS + 0x48], %i1; \
504 ldx [%sp + STACK_BIAS + 0x50], %i2; \
505 ldx [%sp + STACK_BIAS + 0x58], %i3; \
506 ldx [%sp + STACK_BIAS + 0x60], %i4; \
507 ldx [%sp + STACK_BIAS + 0x68], %i5; \
508 ldx [%sp + STACK_BIAS + 0x70], %i6; \
509 ldx [%sp + STACK_BIAS + 0x78], %i7; \
512 ba,pt %xcc, kern_rtt_restore; \
514 nop; nop; nop; nop; nop; \
518 /* Normal 64bit fill */
519 #define FILL_1_GENERIC(ASI) \
520 add %sp, STACK_BIAS + 0x00, %g1; \
521 ldxa [%g1 + %g0] ASI, %l0; \
524 ldxa [%g1 + %g2] ASI, %l1; \
526 ldxa [%g1 + %g3] ASI, %l2; \
527 ldxa [%g1 + %g5] ASI, %l3; \
528 add %g1, 0x20, %g1; \
529 ldxa [%g1 + %g0] ASI, %l4; \
530 ldxa [%g1 + %g2] ASI, %l5; \
531 ldxa [%g1 + %g3] ASI, %l6; \
532 ldxa [%g1 + %g5] ASI, %l7; \
533 add %g1, 0x20, %g1; \
534 ldxa [%g1 + %g0] ASI, %i0; \
535 ldxa [%g1 + %g2] ASI, %i1; \
536 ldxa [%g1 + %g3] ASI, %i2; \
537 ldxa [%g1 + %g5] ASI, %i3; \
538 add %g1, 0x20, %g1; \
539 ldxa [%g1 + %g0] ASI, %i4; \
540 ldxa [%g1 + %g2] ASI, %i5; \
541 ldxa [%g1 + %g3] ASI, %i6; \
542 ldxa [%g1 + %g5] ASI, %i7; \
544 retry; nop; nop; nop; nop; \
545 b,a,pt %xcc, fill_fixup_dax; \
546 b,a,pt %xcc, fill_fixup_mna; \
547 b,a,pt %xcc, fill_fixup;
549 #define FILL_1_GENERIC_RTRAP \
550 user_rtt_fill_64bit: \
551 ldxa [%sp + STACK_BIAS + 0x00] %asi, %l0; \
552 ldxa [%sp + STACK_BIAS + 0x08] %asi, %l1; \
553 ldxa [%sp + STACK_BIAS + 0x10] %asi, %l2; \
554 ldxa [%sp + STACK_BIAS + 0x18] %asi, %l3; \
555 ldxa [%sp + STACK_BIAS + 0x20] %asi, %l4; \
556 ldxa [%sp + STACK_BIAS + 0x28] %asi, %l5; \
557 ldxa [%sp + STACK_BIAS + 0x30] %asi, %l6; \
558 ldxa [%sp + STACK_BIAS + 0x38] %asi, %l7; \
559 ldxa [%sp + STACK_BIAS + 0x40] %asi, %i0; \
560 ldxa [%sp + STACK_BIAS + 0x48] %asi, %i1; \
561 ldxa [%sp + STACK_BIAS + 0x50] %asi, %i2; \
562 ldxa [%sp + STACK_BIAS + 0x58] %asi, %i3; \
563 ldxa [%sp + STACK_BIAS + 0x60] %asi, %i4; \
564 ldxa [%sp + STACK_BIAS + 0x68] %asi, %i5; \
565 ldxa [%sp + STACK_BIAS + 0x70] %asi, %i6; \
566 ldxa [%sp + STACK_BIAS + 0x78] %asi, %i7; \
567 ba,pt %xcc, user_rtt_pre_restore; \
569 nop; nop; nop; nop; nop; nop; \
570 nop; nop; nop; nop; nop; \
571 ba,a,pt %xcc, user_rtt_fill_fixup; \
572 ba,a,pt %xcc, user_rtt_fill_fixup; \
573 ba,a,pt %xcc, user_rtt_fill_fixup;
576 /* Normal 32bit fill */
577 #define FILL_2_GENERIC(ASI) \
579 lduwa [%sp + %g0] ASI, %l0; \
582 lduwa [%sp + %g2] ASI, %l1; \
584 lduwa [%sp + %g3] ASI, %l2; \
585 lduwa [%sp + %g5] ASI, %l3; \
586 add %sp, 0x10, %g1; \
587 lduwa [%g1 + %g0] ASI, %l4; \
588 lduwa [%g1 + %g2] ASI, %l5; \
589 lduwa [%g1 + %g3] ASI, %l6; \
590 lduwa [%g1 + %g5] ASI, %l7; \
591 add %g1, 0x10, %g1; \
592 lduwa [%g1 + %g0] ASI, %i0; \
593 lduwa [%g1 + %g2] ASI, %i1; \
594 lduwa [%g1 + %g3] ASI, %i2; \
595 lduwa [%g1 + %g5] ASI, %i3; \
596 add %g1, 0x10, %g1; \
597 lduwa [%g1 + %g0] ASI, %i4; \
598 lduwa [%g1 + %g2] ASI, %i5; \
599 lduwa [%g1 + %g3] ASI, %i6; \
600 lduwa [%g1 + %g5] ASI, %i7; \
602 retry; nop; nop; nop; nop; \
603 b,a,pt %xcc, fill_fixup_dax; \
604 b,a,pt %xcc, fill_fixup_mna; \
605 b,a,pt %xcc, fill_fixup;
607 #define FILL_2_GENERIC_RTRAP \
608 user_rtt_fill_32bit: \
610 lduwa [%sp + 0x00] %asi, %l0; \
611 lduwa [%sp + 0x04] %asi, %l1; \
612 lduwa [%sp + 0x08] %asi, %l2; \
613 lduwa [%sp + 0x0c] %asi, %l3; \
614 lduwa [%sp + 0x10] %asi, %l4; \
615 lduwa [%sp + 0x14] %asi, %l5; \
616 lduwa [%sp + 0x18] %asi, %l6; \
617 lduwa [%sp + 0x1c] %asi, %l7; \
618 lduwa [%sp + 0x20] %asi, %i0; \
619 lduwa [%sp + 0x24] %asi, %i1; \
620 lduwa [%sp + 0x28] %asi, %i2; \
621 lduwa [%sp + 0x2c] %asi, %i3; \
622 lduwa [%sp + 0x30] %asi, %i4; \
623 lduwa [%sp + 0x34] %asi, %i5; \
624 lduwa [%sp + 0x38] %asi, %i6; \
625 lduwa [%sp + 0x3c] %asi, %i7; \
626 ba,pt %xcc, user_rtt_pre_restore; \
628 nop; nop; nop; nop; nop; \
629 nop; nop; nop; nop; nop; \
630 ba,a,pt %xcc, user_rtt_fill_fixup; \
631 ba,a,pt %xcc, user_rtt_fill_fixup; \
632 ba,a,pt %xcc, user_rtt_fill_fixup;
635 #define FILL_1_NORMAL FILL_1_GENERIC(ASI_AIUP)
636 #define FILL_2_NORMAL FILL_2_GENERIC(ASI_AIUP)
637 #define FILL_3_NORMAL FILL_0_NORMAL
638 #define FILL_4_NORMAL FILL_0_NORMAL
639 #define FILL_5_NORMAL FILL_0_NORMAL
640 #define FILL_6_NORMAL FILL_0_NORMAL
641 #define FILL_7_NORMAL FILL_0_NORMAL
643 #define FILL_0_OTHER FILL_0_NORMAL
644 #define FILL_1_OTHER FILL_1_GENERIC(ASI_AIUS)
645 #define FILL_2_OTHER FILL_2_GENERIC(ASI_AIUS)
646 #define FILL_3_OTHER FILL_3_NORMAL
647 #define FILL_4_OTHER FILL_4_NORMAL
648 #define FILL_5_OTHER FILL_5_NORMAL
649 #define FILL_6_OTHER FILL_6_NORMAL
650 #define FILL_7_OTHER FILL_7_NORMAL
652 #endif /* !(_SPARC64_TTABLE_H) */