xref: /freebsd/sys/powerpc/include/reg.h (revision 4f29da19bd44f0e99f021510460a81bf754c21d2)
1 /* $NetBSD: reg.h,v 1.4 2000/06/04 09:30:44 tsubai Exp $	*/
2 /* $FreeBSD$	*/
3 
4 #ifndef _POWERPC_REG_H_
5 #define	_POWERPC_REG_H_
6 
7 /* Must match struct trapframe */
8 struct reg {
9 	register_t fixreg[32];
10 	register_t lr;
11 	int cr;
12 	int xer;
13 	register_t ctr;
14 	register_t pc;
15 };
16 
17 /* Must match pcb.pcb_fpu */
18 struct fpreg {
19 	double fpreg[32];
20 	double fpscr;
21 };
22 
23 struct dbreg {
24 	unsigned long	junk;
25 };
26 
27 #ifdef _KERNEL
28 /*
29  * XXX these interfaces are MI, so they should be declared in a MI place.
30  */
31 int	fill_regs(struct thread *, struct reg *);
32 int	set_regs(struct thread *, struct reg *);
33 int	fill_fpregs(struct thread *, struct fpreg *);
34 int	set_fpregs(struct thread *, struct fpreg *);
35 int	fill_dbregs(struct thread *, struct dbreg *);
36 int	set_dbregs(struct thread *, struct dbreg *);
37 #endif
38 
39 #endif /* _POWERPC_REG_H_ */
40