Declare the second arg of process_write_{fp,}regs() to be const.
This permits sh5 to continue to re-use those functions in cpu_setmcontext() with the recent change to Makefile.kern.inc (revision 1.62).
This commit is contained in:
parent
9bd3941e72
commit
8f4aee207b
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: process_machdep.c,v 1.21 2003/09/21 15:14:51 skd Exp $ */
|
||||
/* $NetBSD: process_machdep.c,v 1.22 2005/06/01 13:01:35 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1994 Christopher G. Demetriou
|
||||
@ -54,7 +54,7 @@
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.21 2003/09/21 15:14:51 skd Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.22 2005/06/01 13:01:35 scw Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -84,7 +84,7 @@ process_read_regs(struct lwp *l, struct reg *regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_regs(struct lwp *l, struct reg *regs)
|
||||
process_write_regs(struct lwp *l, const struct reg *regs)
|
||||
{
|
||||
|
||||
regtoframe(regs, lwp_frame(l));
|
||||
@ -124,7 +124,7 @@ process_read_fpregs(struct lwp *l, struct fpreg *regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_fpregs(struct lwp *l, struct fpreg *regs)
|
||||
process_write_fpregs(struct lwp *l, const struct fpreg *regs)
|
||||
{
|
||||
|
||||
if (l->l_addr->u_pcb.pcb_fpcpu != NULL)
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: process_machdep.c,v 1.5 2005/05/15 21:37:46 fvdl Exp $ */
|
||||
/* $NetBSD: process_machdep.c,v 1.6 2005/06/01 13:01:36 scw Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2000 The NetBSD Foundation, Inc.
|
||||
@ -60,7 +60,7 @@
|
||||
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.5 2005/05/15 21:37:46 fvdl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.6 2005/06/01 13:01:36 scw Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -150,7 +150,7 @@ process_read_fpregs(l, regs)
|
||||
int
|
||||
process_write_regs(l, regp)
|
||||
struct lwp *l;
|
||||
struct reg *regp;
|
||||
const struct reg *regp;
|
||||
{
|
||||
struct trapframe *tf = process_frame(l);
|
||||
int error;
|
||||
@ -173,7 +173,7 @@ process_write_regs(l, regp)
|
||||
int
|
||||
process_write_fpregs(l, regs)
|
||||
struct lwp *l;
|
||||
struct fpreg *regs;
|
||||
const struct fpreg *regs;
|
||||
{
|
||||
struct fxsave64 *frame = process_fpframe(l);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: process_machdep.c,v 1.13 2004/08/21 11:52:25 rearnsha Exp $ */
|
||||
/* $NetBSD: process_machdep.c,v 1.14 2005/06/01 13:01:35 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 The Regents of the University of California.
|
||||
@ -133,7 +133,7 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.13 2004/08/21 11:52:25 rearnsha Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.14 2005/06/01 13:01:35 scw Exp $");
|
||||
|
||||
#include <sys/proc.h>
|
||||
#include <sys/ptrace.h>
|
||||
@ -196,7 +196,7 @@ process_read_fpregs(struct lwp *l, struct fpreg *regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_regs(struct lwp *l, struct reg *regs)
|
||||
process_write_regs(struct lwp *l, const struct reg *regs)
|
||||
{
|
||||
struct trapframe *tf = process_frame(l);
|
||||
|
||||
@ -228,7 +228,7 @@ process_write_regs(struct lwp *l, struct reg *regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_fpregs(struct lwp *l, struct fpreg *regs)
|
||||
process_write_fpregs(struct lwp *l, const struct fpreg *regs)
|
||||
{
|
||||
#ifdef ARMFPE
|
||||
arm_fpe_setcontext(p, regs);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: armfpe.h,v 1.2 2002/03/10 15:29:54 bjh21 Exp $ */
|
||||
/* $NetBSD: armfpe.h,v 1.3 2005/06/01 13:01:35 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1995 Neil A Carson.
|
||||
@ -124,10 +124,10 @@ void arm_fpe_core_shutdown __P((void));
|
||||
void arm_fpe_core_activatecontext __P((u_int context));
|
||||
u_int arm_fpe_core_deactivatecontext __P((void));
|
||||
u_int arm_fpe_core_savecontext __P((u_int context, fp_context_frame_t *savearea, int pc));
|
||||
void arm_fpe_core_loadcontext __P((u_int context, fp_context_frame_t *loadarea));
|
||||
void arm_fpe_core_loadcontext __P((u_int context, const fp_context_frame_t *loadarea));
|
||||
void arm_fpe_copycontext __P((u_int c1, u_int c2));
|
||||
void arm_fpe_getcontext __P((struct proc *p, struct fpreg *fpregs));
|
||||
void arm_fpe_setcontext __P((struct proc *p, struct fpreg *fpregs));
|
||||
void arm_fpe_setcontext __P((struct proc *p, const struct fpreg *fpregs));
|
||||
|
||||
void arm_fpe_exception_glue __P((int exception));
|
||||
void arm_fpe_panic __P((void));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: armfpe_init.c,v 1.7 2004/02/13 11:36:11 wiz Exp $ */
|
||||
/* $NetBSD: armfpe_init.c,v 1.8 2005/06/01 13:01:35 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1996 Mark Brinicombe
|
||||
@ -43,7 +43,7 @@
|
||||
|
||||
#include <sys/param.h>
|
||||
|
||||
__KERNEL_RCSID(0, "$NetBSD: armfpe_init.c,v 1.7 2004/02/13 11:36:11 wiz Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: armfpe_init.c,v 1.8 2005/06/01 13:01:35 scw Exp $");
|
||||
|
||||
#include <sys/systm.h>
|
||||
#include <sys/proc.h>
|
||||
@ -268,9 +268,9 @@ void arm_fpe_getcontext(p, fpregs)
|
||||
|
||||
void arm_fpe_setcontext(p, fpregs)
|
||||
struct proc *p;
|
||||
struct fpreg *fpregs;
|
||||
const struct fpreg *fpregs;
|
||||
{
|
||||
arm_fpe_core_loadcontext(FP_CONTEXT(p), (fp_context_frame_t *)fpregs);
|
||||
arm_fpe_core_loadcontext(FP_CONTEXT(p), (const fp_context_frame_t *)fpregs);
|
||||
}
|
||||
|
||||
/* End of armfpe_init.c */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: process_machdep.c,v 1.5 2005/05/01 19:18:39 chs Exp $ */
|
||||
/* $NetBSD: process_machdep.c,v 1.6 2005/06/01 13:01:35 scw Exp $ */
|
||||
|
||||
/* $OpenBSD: process_machdep.c,v 1.3 1999/06/18 05:19:52 mickey Exp $ */
|
||||
|
||||
@ -33,7 +33,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.5 2005/05/01 19:18:39 chs Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.6 2005/06/01 13:01:35 scw Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -53,7 +53,7 @@ process_read_regs(struct lwp *l, struct reg *regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_regs(struct lwp *l, struct reg *regs)
|
||||
process_write_regs(struct lwp *l, const struct reg *regs)
|
||||
{
|
||||
bcopy(®s[1], &l->l_md.md_regs->tf_r1,
|
||||
sizeof(*regs) - sizeof(*regs));
|
||||
@ -71,7 +71,7 @@ process_read_fpregs(struct lwp *l, struct fpreg *fpregs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_fpregs(struct lwp *l, struct fpreg *fpregs)
|
||||
process_write_fpregs(struct lwp *l, const struct fpreg *fpregs)
|
||||
{
|
||||
hppa_fpu_flush(l);
|
||||
bcopy(fpregs, l->l_addr->u_pcb.pcb_fpregs, sizeof(*fpregs));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: process_machdep.c,v 1.51 2004/01/28 10:48:55 yamt Exp $ */
|
||||
/* $NetBSD: process_machdep.c,v 1.52 2005/06/01 13:01:35 scw Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1998, 2000, 2001 The NetBSD Foundation, Inc.
|
||||
@ -59,7 +59,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.51 2004/01/28 10:48:55 yamt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.52 2005/06/01 13:01:35 scw Exp $");
|
||||
|
||||
#include "opt_vm86.h"
|
||||
#include "npx.h"
|
||||
@ -295,7 +295,7 @@ process_read_fpregs(struct lwp *l, struct fpreg *regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_regs(struct lwp *l, struct reg *regs)
|
||||
process_write_regs(struct lwp *l, const struct reg *regs)
|
||||
{
|
||||
struct trapframe *tf = process_frame(l);
|
||||
|
||||
@ -350,7 +350,7 @@ process_write_regs(struct lwp *l, struct reg *regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_fpregs(struct lwp *l, struct fpreg *regs)
|
||||
process_write_fpregs(struct lwp *l, const struct fpreg *regs)
|
||||
{
|
||||
union savefpu *frame = process_fpframe(l);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: process_machdep.c,v 1.22 2004/08/28 22:06:28 thorpej Exp $ */
|
||||
/* $NetBSD: process_machdep.c,v 1.23 2005/06/01 13:01:35 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 Christopher G. Demetriou
|
||||
@ -53,7 +53,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.22 2004/08/28 22:06:28 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.23 2005/06/01 13:01:35 scw Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -107,7 +107,7 @@ process_read_fpregs(struct lwp *l, struct fpreg *regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_regs(struct lwp *l, struct reg *regs)
|
||||
process_write_regs(struct lwp *l, const struct reg *regs)
|
||||
{
|
||||
struct frame *frame = process_frame(l);
|
||||
|
||||
@ -138,7 +138,7 @@ process_write_regs(struct lwp *l, struct reg *regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_fpregs(struct lwp *l, struct fpreg *regs)
|
||||
process_write_fpregs(struct lwp *l, const struct fpreg *regs)
|
||||
{
|
||||
struct fpframe *frame = process_fpframe(l);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: process_machdep.c,v 1.25 2005/01/01 03:25:46 simonb Exp $ */
|
||||
/* $NetBSD: process_machdep.c,v 1.26 2005/06/01 13:01:35 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 The Regents of the University of California.
|
||||
@ -76,7 +76,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.25 2005/01/01 03:25:46 simonb Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.26 2005/06/01 13:01:35 scw Exp $");
|
||||
|
||||
/*
|
||||
* This file may seem a bit stylized, but that so that it's easier to port.
|
||||
@ -117,7 +117,7 @@ process_read_regs(struct lwp *l, struct reg *regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_regs(struct lwp *l, struct reg *regs)
|
||||
process_write_regs(struct lwp *l, const struct reg *regs)
|
||||
{
|
||||
struct frame *f;
|
||||
mips_reg_t sr;
|
||||
@ -140,7 +140,7 @@ process_read_fpregs(struct lwp *l, struct fpreg *regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_fpregs(struct lwp *l, struct fpreg *regs)
|
||||
process_write_fpregs(struct lwp *l, const struct fpreg *regs)
|
||||
{
|
||||
|
||||
/* to load FPA contents next time when FP insn is executed */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: process_machdep.c,v 1.14 2003/08/07 16:29:02 agc Exp $ */
|
||||
/* $NetBSD: process_machdep.c,v 1.15 2005/06/01 13:01:35 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 The Regents of the University of California.
|
||||
@ -93,7 +93,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.14 2003/08/07 16:29:02 agc Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.15 2005/06/01 13:01:35 scw Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -127,7 +127,7 @@ process_read_regs(l, regs)
|
||||
int
|
||||
process_write_regs(l, regs)
|
||||
struct lwp *l;
|
||||
struct reg *regs;
|
||||
const struct reg *regs;
|
||||
{
|
||||
struct reg *pregs;
|
||||
|
||||
@ -161,7 +161,7 @@ process_read_fpregs(l, regs)
|
||||
int
|
||||
process_write_fpregs(l, regs)
|
||||
struct lwp *l;
|
||||
struct fpreg *regs;
|
||||
const struct fpreg *regs;
|
||||
{
|
||||
if ((l->l_flag & L_INMEM) == 0)
|
||||
return (EIO);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.6 2005/04/25 15:02:06 lukem Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.7 2005/06/01 13:01:36 scw Exp $ */
|
||||
/*
|
||||
* Copyright (c) 2003 Anders Magnusson (ragge@ludd.luth.se).
|
||||
* All rights reserved.
|
||||
@ -171,7 +171,7 @@ process_sstep(struct lwp *p, int sstep)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_regs(struct lwp *p, struct reg *regs)
|
||||
process_write_regs(struct lwp *p, const struct reg *regs)
|
||||
{
|
||||
panic("process_write_regs");
|
||||
}
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: process_machdep.c,v 1.18 2004/04/16 23:58:08 matt Exp $ */
|
||||
/* $NetBSD: process_machdep.c,v 1.19 2005/06/01 13:01:35 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (C) 1995, 1996 Wolfgang Solfrank.
|
||||
@ -32,7 +32,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.18 2004/04/16 23:58:08 matt Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.19 2005/06/01 13:01:35 scw Exp $");
|
||||
|
||||
#include "opt_altivec.h"
|
||||
|
||||
@ -68,7 +68,7 @@ process_read_regs(struct lwp *l, struct reg *regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_regs(struct lwp *l, struct reg *regs)
|
||||
process_write_regs(struct lwp *l, const struct reg *regs)
|
||||
{
|
||||
struct trapframe * const tf = trapframe(l);
|
||||
|
||||
@ -102,7 +102,7 @@ process_read_fpregs(struct lwp *l, struct fpreg *fpregs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_fpregs(struct lwp *l, struct fpreg *fpregs)
|
||||
process_write_fpregs(struct lwp *l, const struct fpreg *fpregs)
|
||||
{
|
||||
struct pcb * const pcb = &l->l_addr->u_pcb;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: process_machdep.c,v 1.8 2003/08/07 16:29:30 agc Exp $ */
|
||||
/* $NetBSD: process_machdep.c,v 1.9 2005/06/01 13:01:35 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 The Regents of the University of California.
|
||||
@ -99,7 +99,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.8 2003/08/07 16:29:30 agc Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.9 2005/06/01 13:01:35 scw Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -151,7 +151,7 @@ process_read_regs(struct lwp *l, struct reg *regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_regs(struct lwp *l, struct reg *regs)
|
||||
process_write_regs(struct lwp *l, const struct reg *regs)
|
||||
{
|
||||
struct trapframe *tf = process_frame(l);
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: reg.h,v 1.4 2003/01/20 20:07:53 scw Exp $ */
|
||||
/* $NetBSD: reg.h,v 1.5 2005/06/01 13:01:36 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002 Wasabi Systems, Inc.
|
||||
@ -66,8 +66,8 @@ struct fpreg {
|
||||
|
||||
struct lwp;
|
||||
int process_read_regs(struct lwp *, struct reg *);
|
||||
int process_write_regs(struct lwp *, struct reg *);
|
||||
int process_write_regs(struct lwp *, const struct reg *);
|
||||
int process_read_fpregs(struct lwp *, struct fpreg *);
|
||||
int process_write_fpregs(struct lwp *, struct fpreg *);
|
||||
int process_write_fpregs(struct lwp *, const struct fpreg *);
|
||||
|
||||
#endif /* _SH5_REG_H */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: process_machdep.c,v 1.15 2004/03/17 20:22:11 scw Exp $ */
|
||||
/* $NetBSD: process_machdep.c,v 1.16 2005/06/01 13:01:36 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002 Wasabi Systems, Inc.
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.15 2004/03/17 20:22:11 scw Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.16 2005/06/01 13:01:36 scw Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -235,7 +235,7 @@ process_read_fpregs(struct lwp *l, struct fpreg *regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_regs(struct lwp *l, struct reg *regs)
|
||||
process_write_regs(struct lwp *l, const struct reg *regs)
|
||||
{
|
||||
struct trapframe *tf = l->l_md.md_regs;
|
||||
|
||||
@ -329,7 +329,7 @@ process_write_regs(struct lwp *l, struct reg *regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_fpregs(struct lwp *l, struct fpreg *regs)
|
||||
process_write_fpregs(struct lwp *l, const struct fpreg *regs)
|
||||
{
|
||||
|
||||
memcpy(&l->l_addr->u_pcb.pcb_ctx.sf_fpregs, regs, sizeof(*regs));
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: sig_machdep.c,v 1.18 2003/10/08 00:28:42 thorpej Exp $ */
|
||||
/* $NetBSD: sig_machdep.c,v 1.19 2005/06/01 13:01:36 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright 2002 Wasabi Systems, Inc.
|
||||
@ -36,7 +36,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.18 2003/10/08 00:28:42 thorpej Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: sig_machdep.c,v 1.19 2005/06/01 13:01:36 scw Exp $");
|
||||
|
||||
#include "opt_compat_netbsd.h"
|
||||
|
||||
@ -226,11 +226,12 @@ cpu_setmcontext(struct lwp *l, const mcontext_t *mcp, unsigned int flags)
|
||||
return (EINVAL);
|
||||
|
||||
/* Restore register context. */
|
||||
process_write_regs(l, (struct reg *)(void *)mcp);
|
||||
process_write_regs(l, (const struct reg *)(const void *)mcp);
|
||||
}
|
||||
|
||||
if (flags & _UC_FPU) {
|
||||
process_write_fpregs(l, (struct fpreg *)(void *)&mcp->__fpregs);
|
||||
process_write_fpregs(l,
|
||||
(const struct fpreg *)(const void *)&mcp->__fpregs);
|
||||
sh5_fprestore(tf->tf_state.sf_usr, &l->l_addr->u_pcb);
|
||||
} else {
|
||||
/* Always restore FPSCR */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: process_machdep.c,v 1.10 2003/08/07 16:29:45 agc Exp $ */
|
||||
/* $NetBSD: process_machdep.c,v 1.11 2005/06/01 13:01:36 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 The Regents of the University of California.
|
||||
@ -95,7 +95,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.10 2003/08/07 16:29:45 agc Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.11 2005/06/01 13:01:36 scw Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -122,7 +122,7 @@ process_read_regs(p, regs)
|
||||
int
|
||||
process_write_regs(p, regs)
|
||||
struct lwp *p;
|
||||
struct reg *regs;
|
||||
const struct reg *regs;
|
||||
{
|
||||
int psr = p->l_md.md_tf->tf_psr & ~PSR_ICC;
|
||||
bcopy((caddr_t)regs, p->l_md.md_tf, sizeof(struct reg));
|
||||
@ -168,7 +168,7 @@ process_read_fpregs(p, regs)
|
||||
int
|
||||
process_write_fpregs(p, regs)
|
||||
struct lwp *p;
|
||||
struct fpreg *regs;
|
||||
const struct fpreg *regs;
|
||||
{
|
||||
if (p->l_md.md_fpstate == NULL)
|
||||
return (EINVAL);
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: netbsd32_machdep.c,v 1.45 2005/03/26 05:12:35 fvdl Exp $ */
|
||||
/* $NetBSD: netbsd32_machdep.c,v 1.46 2005/06/01 13:01:36 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1998, 2001 Matthew R. Green
|
||||
@ -29,7 +29,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.45 2005/03/26 05:12:35 fvdl Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: netbsd32_machdep.c,v 1.46 2005/06/01 13:01:36 scw Exp $");
|
||||
|
||||
#ifdef _KERNEL_OPT
|
||||
#include "opt_compat_netbsd.h"
|
||||
@ -541,9 +541,9 @@ netbsd32_process_read_regs(p, regs)
|
||||
int
|
||||
netbsd32_process_write_regs(p, regs)
|
||||
struct proc *p;
|
||||
struct reg *regs;
|
||||
const struct reg *regs;
|
||||
{
|
||||
struct reg32* regp = (struct reg32*)regs;
|
||||
const struct reg32* regp = (const struct reg32*)regs;
|
||||
struct trapframe64* tf = p->p_md.md_tf;
|
||||
int i;
|
||||
|
||||
@ -585,11 +585,11 @@ struct fpreg *regs;
|
||||
int
|
||||
netbsd32_process_write_fpregs(p, regs)
|
||||
struct proc *p;
|
||||
struct fpreg *regs;
|
||||
const struct fpreg *regs;
|
||||
{
|
||||
extern struct fpstate initfpstate;
|
||||
struct fpstate64 *statep = &initfpstate;
|
||||
struct fpreg32 *regp = (struct fpreg32 *)regs;
|
||||
const struct fpreg32 *regp = (const struct fpreg32 *)regs;
|
||||
int i;
|
||||
|
||||
/* NOTE: struct fpreg == struct fpstate */
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: process_machdep.c,v 1.16 2003/11/09 16:41:53 martin Exp $ */
|
||||
/* $NetBSD: process_machdep.c,v 1.17 2005/06/01 13:01:36 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1993 The Regents of the University of California.
|
||||
@ -95,7 +95,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.16 2003/11/09 16:41:53 martin Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: process_machdep.c,v 1.17 2005/06/01 13:01:36 scw Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
@ -145,10 +145,10 @@ process_read_regs(struct lwp *l, struct reg *regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_regs(struct lwp *l, struct reg *regs)
|
||||
process_write_regs(struct lwp *l, const struct reg *regs)
|
||||
{
|
||||
struct trapframe64* tf = l->l_md.md_tf;
|
||||
struct reg32* regp = (struct reg32*)regs;
|
||||
const struct reg32* regp = (const struct reg32*)regs;
|
||||
int i;
|
||||
|
||||
#ifdef __arch64__
|
||||
@ -227,12 +227,12 @@ process_read_fpregs(struct lwp *l, struct fpreg *regs)
|
||||
}
|
||||
|
||||
int
|
||||
process_write_fpregs(struct lwp *l, struct fpreg *regs)
|
||||
process_write_fpregs(struct lwp *l, const struct fpreg *regs)
|
||||
{
|
||||
|
||||
extern struct fpstate64 initfpstate;
|
||||
struct fpstate64 *statep = &initfpstate;
|
||||
struct fpreg32 *regp = (struct fpreg32 *)regs;
|
||||
const struct fpreg32 *regp = (const struct fpreg32 *)regs;
|
||||
int i;
|
||||
|
||||
#ifdef __arch64__
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: machdep.c,v 1.149 2005/04/25 15:02:07 lukem Exp $ */
|
||||
/* $NetBSD: machdep.c,v 1.150 2005/06/01 13:01:36 scw Exp $ */
|
||||
|
||||
/*
|
||||
* Copyright (c) 1982, 1986, 1990 The Regents of the University of California.
|
||||
@ -83,7 +83,7 @@
|
||||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.149 2005/04/25 15:02:07 lukem Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: machdep.c,v 1.150 2005/06/01 13:01:36 scw Exp $");
|
||||
|
||||
#include "opt_ddb.h"
|
||||
#include "opt_compat_netbsd.h"
|
||||
@ -490,7 +490,7 @@ process_read_regs(l, regs)
|
||||
int
|
||||
process_write_regs(l, regs)
|
||||
struct lwp *l;
|
||||
struct reg *regs;
|
||||
const struct reg *regs;
|
||||
{
|
||||
struct trapframe *tf = l->l_addr->u_pcb.framep;
|
||||
|
||||
|
@ -1,4 +1,4 @@
|
||||
/* $NetBSD: ptrace.h,v 1.33 2005/02/03 19:20:02 perry Exp $ */
|
||||
/* $NetBSD: ptrace.h,v 1.34 2005/06/01 13:01:35 scw Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1984, 1993
|
||||
@ -105,10 +105,10 @@ int process_read_regs(struct lwp *, struct reg *);
|
||||
int process_set_pc(struct lwp *, caddr_t);
|
||||
int process_sstep(struct lwp *, int);
|
||||
#ifdef PT_SETFPREGS
|
||||
int process_write_fpregs(struct lwp *, struct fpreg *);
|
||||
int process_write_fpregs(struct lwp *, const struct fpreg *);
|
||||
#endif
|
||||
#ifdef PT_SETREGS
|
||||
int process_write_regs(struct lwp *, struct reg *);
|
||||
int process_write_regs(struct lwp *, const struct reg *);
|
||||
#endif
|
||||
|
||||
#ifdef __HAVE_PROCFS_MACHDEP
|
||||
|
Loading…
Reference in New Issue
Block a user