No empty .Rs/.Re
[netbsd-mini2440.git] / sys / arch / hppa / include / mcontext.h
blob1eb0a5419e7984dc465bfc7efc2efdee92aae040
1 /* $NetBSD: mcontext.h,v 1.3.2.4 2004/09/21 13:16:25 skrll Exp $ */
3 #ifndef _HPPA_MCONTEXT_H_
4 #define _HPPA_MCONTEXT_H_
6 /*
7 * General register state
8 */
9 #define _NGREG 44
11 #define _REG_PSW 0
12 #define _REG_RP 2
13 #define _REG_R19 19
14 #define _REG_ARG0 26
15 #define _REG_DP 27
16 #define _REG_RET0 28
17 #define _REG_SP 30
18 #define _REG_SAR 32
19 #define _REG_PCSQH 33
20 #define _REG_PCSQT 34
21 #define _REG_PCOQH 35
22 #define _REG_PCOQT 36
23 #define _REG_SR0 37
24 #define _REG_SR1 38
25 #define _REG_SR2 39
26 #define _REG_SR3 40
27 #define _REG_SR4 41
28 #define _REG_CR26 42
29 #define _REG_CR27 43
31 #ifndef __ASSEMBLER__
33 typedef unsigned long __greg_t;
34 typedef __greg_t __gregset_t[_NGREG];
37 * Floating point register state
40 typedef struct {
41 union {
42 unsigned long long __fp_regs[32];
43 double __fp_dregs[32];
44 } __fp_fr;
45 } __fpregset_t;
47 typedef struct {
48 __gregset_t __gregs;
49 __fpregset_t __fpregs;
50 } mcontext_t;
52 #define _UC_MACHINE_SP(uc) ((uc)->uc_mcontext.__gregs[_REG_SP])
53 #define _UC_MACHINE_PC(uc) ((uc)->uc_mcontext.__gregs[_REG_PCOQH])
54 #define _UC_MACHINE_SET_PC(uc, pc) \
55 do { \
56 (uc)->uc_mcontext.__gregs[_REG_PCOQH] = (pc); \
57 (uc)->uc_mcontext.__gregs[_REG_PCOQT] = (pc) + 4; \
58 } while (/*CONSTCOND*/0)
60 #endif /* !__ASSEMBLER__ */
62 #define _OFFSETOF_UC_GREGS 40
64 #define _UC_SETSTACK 0x00010000
65 #define _UC_CLRSTACK 0x00020000
67 #endif /* _HPPA_MCONTEXT_H_ */