1f04261973
{set,fill}_{,fp,db}regs() fixup: - Add dummy {set,fill}_dbregs() on architectures that don't have them. - KSEfy the powerpc versions (struct proc -> struct thread). - Some architectures had the prototypes in md_var.h, some in reg.h, and some in both; for consistency, move them to reg.h on all platforms. These functions aren't really MD (the implementation is MD, but the interface is MI), so they should move to an MI header, but I haven't figured out which one yet. Run-tested on i386, build-tested on Alpha, untested on other platforms.
39 lines
847 B
C
39 lines
847 B
C
/* $NetBSD: reg.h,v 1.4 2000/06/04 09:30:44 tsubai Exp $ */
|
|
/* $FreeBSD$ */
|
|
|
|
#ifndef _POWERPC_REG_H_
|
|
#define _POWERPC_REG_H_
|
|
|
|
struct reg {
|
|
register_t fixreg[32];
|
|
register_t lr;
|
|
int cr;
|
|
int xer;
|
|
register_t ctr;
|
|
register_t pc;
|
|
};
|
|
|
|
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.
|
|
*/
|
|
void setregs __P((struct thread *, u_long, u_long, u_long));
|
|
int fill_regs __P((struct thread *, struct reg *));
|
|
int set_regs __P((struct thread *, struct reg *));
|
|
int fill_fpregs __P((struct thread *, struct fpreg *));
|
|
int set_fpregs __P((struct thread *, struct fpreg *));
|
|
int fill_dbregs __P((struct thread *, struct dbreg *));
|
|
int set_dbregs __P((struct thread *, struct dbreg *));
|
|
#endif
|
|
|
|
#endif /* _POWERPC_REG_H_ */
|