No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / sparc64 / include / mcontext.h
blob8afb39bec3f0041e50da64bb4493486e9237f283
1 /* $NetBSD: mcontext.h,v 1.7 2006/03/14 22:03:39 cube Exp $ */
3 #ifndef _SPARC64_MCONTEXT_H_
4 #define _SPARC64_MCONTEXT_H_
6 #include <sparc/mcontext.h>
8 #define _NGREG32 19 /* %psr, pc, npc, %g1-7, %o0-7 */
9 typedef int __greg32_t;
10 typedef __greg32_t __gregset32_t[_NGREG32];
12 typedef unsigned int netbsd32___greg32p_t;
13 typedef unsigned int netbsd32___fqp_t;
14 typedef unsigned int netbsd32___gwindows32p_t;
16 #define _REG32_PSR 0
17 #define _REG32_PC 1
18 #define _REG32_nPC 2
19 #define _REG32_Y 3
20 #define _REG32_G1 4
21 #define _REG32_G2 5
22 #define _REG32_G3 6
23 #define _REG32_G4 7
24 #define _REG32_G5 8
25 #define _REG32_G6 9
26 #define _REG32_G7 10
27 #define _REG32_O0 11
28 #define _REG32_O1 12
29 #define _REG32_O2 13
30 #define _REG32_O3 14
31 #define _REG32_O4 15
32 #define _REG32_O5 16
33 #define _REG32_O6 17
34 #define _REG32_O7 18
36 /* Layout of a register window. */
37 typedef struct {
38 __greg32_t __rw_local[8]; /* %l0-7 */
39 __greg32_t __rw_in[8]; /* %i0-7 */
40 } __rwindow32_t;
42 /* Description of available register windows. */
43 typedef struct {
44 int __wbcnt;
45 netbsd32___greg32p_t __spbuf[_SPARC_MAXREGWINDOW];
46 __rwindow32_t __wbuf[_SPARC_MAXREGWINDOW];
47 } __gwindows32_t;
49 /* FPU state description */
50 typedef struct {
51 union {
52 unsigned int __fpu_regs[32];
53 double __fpu_dregs[16];
54 } __fpu_fr; /* FPR contents */
55 netbsd32___fqp_t __fpu_q; /* pointer to FPU insn queue */
56 unsigned int __fpu_fsr; /* %fsr */
57 unsigned char __fpu_qcnt; /* # entries in __fpu_q */
58 unsigned char __fpu_q_entrysize; /* size of a __fpu_q entry */
59 unsigned char __fpu_en; /* this context valid? */
60 } __fpregset32_t;
62 /* `Extra Register State'(?) */
63 typedef struct {
64 unsigned int __xrs_id; /* See below */
65 unsigned int __xrs_ptr; /* points into filler area */
66 } __xrs32_t;
68 typedef struct {
69 __gregset32_t __gregs; /* GPR state */
70 netbsd32___gwindows32p_t __gwins;/* may point to register windows */
71 __fpregset32_t __fpregs; /* FPU state, if any */
72 __xrs32_t __xrs; /* may indicate extra reg state */
73 } mcontext32_t;
75 #define _UC_SETSTACK 0x00010000
76 #define _UC_CLRSTACK 0x00020000
78 #endif /* _SPARC64_MCONTEXT_H_ */