Source-Changes-HG archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

[src/trunk]: src/sys/arch/sh3/sh3 - save/restore more registers in process_{r...



details:   https://anonhg.NetBSD.org/src/rev/dcc5e522df40
branches:  trunk
changeset: 484852:dcc5e522df40
user:      msaitoh <msaitoh%NetBSD.org@localhost>
date:      Thu Apr 13 15:51:26 2000 +0000

description:
- save/restore more registers in process_{read,write}_regs()
- return EINVAL in process_sstep (temporary)

diffstat:

 sys/arch/sh3/sh3/process_machdep.c |  17 ++++++++++++++++-
 1 files changed, 16 insertions(+), 1 deletions(-)

diffs (63 lines):

diff -r 5bb024a5afe5 -r dcc5e522df40 sys/arch/sh3/sh3/process_machdep.c
--- a/sys/arch/sh3/sh3/process_machdep.c        Thu Apr 13 15:46:43 2000 +0000
+++ b/sys/arch/sh3/sh3/process_machdep.c        Thu Apr 13 15:51:26 2000 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: process_machdep.c,v 1.1 1999/09/13 10:31:32 itojun Exp $       */
+/*     $NetBSD: process_machdep.c,v 1.2 2000/04/13 15:51:26 msaitoh Exp $      */
 
 /*
  * Copyright (c) 1995, 1996, 1997
@@ -93,10 +93,17 @@
        struct reg *regs;
 {
        struct trapframe *tf = process_frame(p);
+#if 0
        struct pcb *pcb = &p->p_addr->u_pcb;
 
        regs->r_spc = pcb->spc;
        regs->r_ssr = pcb->ssr;
+#else
+       regs->r_spc = tf->tf_spc;
+       regs->r_ssr = tf->tf_ssr;
+#endif
+       regs->r_macl = tf->tf_macl;
+       regs->r_mach = tf->tf_mach;
        regs->r_pr = tf->tf_pr;
        regs->r_r14 = tf->tf_r14;
        regs->r_r13 = tf->tf_r13;
@@ -113,6 +120,7 @@
        regs->r_r2 = tf->tf_r2;
        regs->r_r1 = tf->tf_r1;
        regs->r_r0 = tf->tf_r0;
+       regs->r_r15 = tf->tf_r15;
 
        return (0);
 }
@@ -135,6 +143,8 @@
        tf->tf_ssr = regs->r_ssr;
        tf->tf_pr = regs->r_pr;
 
+       tf->tf_mach = regs->r_mach;
+       tf->tf_macl = regs->r_macl;
        tf->tf_r14 = regs->r_r14;
        tf->tf_r13 = regs->r_r13;
        tf->tf_r12 = regs->r_r12;
@@ -150,6 +160,7 @@
        tf->tf_r2 = regs->r_r2;
        tf->tf_r1 = regs->r_r1;
        tf->tf_r0 = regs->r_r0;
+       tf->tf_r15 = regs->r_r15;
 
        return (0);
 }
@@ -165,6 +176,10 @@
                tf->tf_eflags |= PSL_T;
        else
                tf->tf_eflags &= ~PSL_T;
+#else
+
+       if (sstep)
+               return (EINVAL);
 #endif
 
        return (0);



Home | Main Index | Thread Index | Old Index