Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch/mips Define new macro to access FSR register and us...
details: https://anonhg.NetBSD.org/src/rev/05a4b710d539
branches: trunk
changeset: 520458:05a4b710d539
user: enami <enami%NetBSD.org@localhost>
date: Sat Jan 12 01:40:36 2002 +0000
description:
Define new macro to access FSR register and use it.
diffstat:
sys/arch/mips/include/pcb.h | 4 +++-
sys/arch/mips/mips/db_interface.c | 4 ++--
sys/arch/mips/mips/fpemu.c | 4 ++--
sys/arch/mips/mips/trap.c | 6 +++---
4 files changed, 10 insertions(+), 8 deletions(-)
diffs (79 lines):
diff -r 7314e45f2d2d -r 05a4b710d539 sys/arch/mips/include/pcb.h
--- a/sys/arch/mips/include/pcb.h Sat Jan 12 01:37:08 2002 +0000
+++ b/sys/arch/mips/include/pcb.h Sat Jan 12 01:40:36 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: pcb.h,v 1.12 2001/10/16 16:31:34 uch Exp $ */
+/* $NetBSD: pcb.h,v 1.13 2002/01/12 01:40:36 enami Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -67,4 +67,6 @@
#ifdef _KERNEL
extern struct pcb *curpcb; /* the current running pcb */
extern struct segtab *segbase; /* current segtab base */
+
+#define PCB_FSR(pcb) ((pcb)->pcb_fpregs.r_regs[FSR - FPBASE])
#endif
diff -r 7314e45f2d2d -r 05a4b710d539 sys/arch/mips/mips/db_interface.c
--- a/sys/arch/mips/mips/db_interface.c Sat Jan 12 01:37:08 2002 +0000
+++ b/sys/arch/mips/mips/db_interface.c Sat Jan 12 01:40:36 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: db_interface.c,v 1.38 2001/11/14 18:15:21 thorpej Exp $ */
+/* $NetBSD: db_interface.c,v 1.39 2002/01/12 01:40:37 enami Exp $ */
/*
* Mach Operating System
@@ -550,7 +550,7 @@
vaddr_t ra;
unsigned fpucsr;
- fpucsr = (curproc) ? curproc->p_addr->u_pcb.pcb_fpregs.r_regs[32] : 0;
+ fpucsr = curproc ? PCB_FSR(&curproc->p_addr->u_pcb) : 0;
ra = MachEmulateBranch((struct frame *)regs, pc, fpucsr, 0);
return ra;
}
diff -r 7314e45f2d2d -r 05a4b710d539 sys/arch/mips/mips/fpemu.c
--- a/sys/arch/mips/mips/fpemu.c Sat Jan 12 01:37:08 2002 +0000
+++ b/sys/arch/mips/mips/fpemu.c Sat Jan 12 01:40:36 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fpemu.c,v 1.8 2002/01/12 01:37:08 enami Exp $ */
+/* $NetBSD: fpemu.c,v 1.9 2002/01/12 01:40:37 enami Exp $ */
/*
* Copyright (c) 1999 Shuichiro URATA. All rights reserved.
@@ -88,7 +88,7 @@
if (cause & MIPS_CR_BR_DELAY)
frame->f_regs[PC] = MachEmulateBranch(frame, frame->f_regs[PC],
- curpcb->pcb_fpregs.r_regs[FSR - FPBASE], 0);
+ PCB_FSR(curpcb), 0);
else
frame->f_regs[PC] += 4;
}
diff -r 7314e45f2d2d -r 05a4b710d539 sys/arch/mips/mips/trap.c
--- a/sys/arch/mips/mips/trap.c Sat Jan 12 01:37:08 2002 +0000
+++ b/sys/arch/mips/mips/trap.c Sat Jan 12 01:40:36 2002 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: trap.c,v 1.166 2001/12/28 02:13:14 shin Exp $ */
+/* $NetBSD: trap.c,v 1.167 2002/01/12 01:40:37 enami Exp $ */
/*
* Copyright (c) 1988 University of Utah.
@@ -44,7 +44,7 @@
#include <sys/cdefs.h> /* RCS ID & Copyright macro defns */
-__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.166 2001/12/28 02:13:14 shin Exp $");
+__KERNEL_RCSID(0, "$NetBSD: trap.c,v 1.167 2002/01/12 01:40:37 enami Exp $");
#include "opt_cputype.h" /* which mips CPU levels do we support? */
#include "opt_ktrace.h"
@@ -749,7 +749,7 @@
pc = (vaddr_t)f->f_regs[PC];
if (fuiword((void *)pc) != 0) /* not a NOP instruction */
va = MachEmulateBranch(f, pc,
- p->p_addr->u_pcb.pcb_fpregs.r_regs[32], 1);
+ PCB_FSR(&p->p_addr->u_pcb), 1);
else
va = pc + sizeof(int);
p->p_md.md_ss_addr = va;
Home |
Main Index |
Thread Index |
Old Index