Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc64 In the 32-bit ABI case:



details:   https://anonhg.NetBSD.org/src/rev/c924ff2e6fab
branches:  trunk
changeset: 509648:c924ff2e6fab
user:      kleink <kleink%NetBSD.org@localhost>
date:      Wed May 09 19:46:22 2001 +0000

description:
In the 32-bit ABI case:
* rename sigcontext.sc_tstate to sc_psr, since this is how it is known to
  the 32-bit API, and also used for;
* don't try to squeeze the tstate into it, just emulate the ICC bits.

Per discussion with Eduardo.

diffstat:

 sys/arch/sparc64/include/signal.h  |   8 ++++++--
 sys/arch/sparc64/sparc64/machdep.c |  10 +++++++++-
 2 files changed, 15 insertions(+), 3 deletions(-)

diffs (55 lines):

diff -r 1dd51790265c -r c924ff2e6fab sys/arch/sparc64/include/signal.h
--- a/sys/arch/sparc64/include/signal.h Wed May 09 19:33:07 2001 +0000
+++ b/sys/arch/sparc64/include/signal.h Wed May 09 19:46:22 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: signal.h,v 1.8 1999/03/26 04:29:21 eeh Exp $ */
+/*     $NetBSD: signal.h,v 1.9 2001/05/09 19:46:22 kleink Exp $ */
 
 /*
  * Copyright (c) 1992, 1993
@@ -88,7 +88,11 @@
        long            sc_sp;          /* %sp to restore */
        long            sc_pc;          /* pc to restore */
        long            sc_npc;         /* npc to restore */
-       long            sc_tstate;      /* pstate to restore */
+#ifdef __arch64__
+       long            sc_tstate;      /* tstate to restore */
+#else
+       long            sc_psr;         /* pstate to restore */
+#endif
        long            sc_g1;          /* %g1 to restore */
        long            sc_o0;          /* %o0 to restore */
        sigset_t        sc_mask;        /* signal mask to restore (new style) */
diff -r 1dd51790265c -r c924ff2e6fab sys/arch/sparc64/sparc64/machdep.c
--- a/sys/arch/sparc64/sparc64/machdep.c        Wed May 09 19:33:07 2001 +0000
+++ b/sys/arch/sparc64/sparc64/machdep.c        Wed May 09 19:46:22 2001 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: machdep.c,v 1.103 2001/04/24 04:31:12 thorpej Exp $ */
+/*     $NetBSD: machdep.c,v 1.104 2001/05/09 19:46:22 kleink Exp $ */
 
 /*-
  * Copyright (c) 1996, 1997, 1998 The NetBSD Foundation, Inc.
@@ -578,7 +578,11 @@
        sf.sf_sc.sc_sp = (long)tf->tf_out[6];
        sf.sf_sc.sc_pc = tf->tf_pc;
        sf.sf_sc.sc_npc = tf->tf_npc;
+#ifdef __arch64__
        sf.sf_sc.sc_tstate = tf->tf_tstate; /* XXX */
+#else
+       sf.sf_sc.sc_psr = TSTATECCR_TO_PSR(tf->tf_tstate); /* XXX */
+#endif
        sf.sf_sc.sc_g1 = tf->tf_global[1];
        sf.sf_sc.sc_o0 = tf->tf_out[0];
 
@@ -734,7 +738,11 @@
                return (EINVAL);
 #endif
        /* take only psr ICC field */
+#ifdef __arch64__
        tf->tf_tstate = (u_int64_t)(tf->tf_tstate & ~TSTATE_CCR) | (scp->sc_tstate & TSTATE_CCR);
+#else
+       tf->tf_tstate = (u_int64_t)(tf->tf_tstate & ~TSTATE_CCR) | PSRCC_TO_TSTATE(scp->sc_psr);
+#endif
        tf->tf_pc = (u_int64_t)scp->sc_pc;
        tf->tf_npc = (u_int64_t)scp->sc_npc;
        tf->tf_global[1] = (u_int64_t)scp->sc_g1;



Home | Main Index | Thread Index | Old Index