aboutsummaryrefslogtreecommitdiff
path: root/sys/powerpc/include/reg.h
blob: 5eed3f613eb59258286363b13b285f596eb71e49 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
/* $NetBSD: reg.h,v 1.4 2000/06/04 09:30:44 tsubai Exp $	*/
/* $FreeBSD: src/sys/powerpc/include/reg.h,v 1.6.20.1 2009/04/15 03:14:26 kensmith Exp $	*/

#ifndef _POWERPC_REG_H_
#define	_POWERPC_REG_H_

/* Must match struct trapframe */
struct reg {
	register_t fixreg[32];
	register_t lr;
	int cr;
	int xer;
	register_t ctr;
	register_t pc;
};

/* Must match pcb.pcb_fpu */
struct fpreg {
	double fpreg[32];
	double fpscr;
};

struct dbreg {
	unsigned long	junk;
};

#ifdef _KERNEL
/*
 * XXX these interfaces are MI, so they should be declared in a MI place.
 */
int	fill_regs(struct thread *, struct reg *);
int	set_regs(struct thread *, struct reg *);
int	fill_fpregs(struct thread *, struct fpreg *);
int	set_fpregs(struct thread *, struct fpreg *);
int	fill_dbregs(struct thread *, struct dbreg *);
int	set_dbregs(struct thread *, struct dbreg *);
#endif

#endif /* _POWERPC_REG_H_ */