Source-Changes-HG archive

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

[src/trunk]: src/sys/arch/sparc/sparc Construct arguments properly and update...



details:   https://anonhg.NetBSD.org/src/rev/50194ac57b11
branches:  trunk
changeset: 555094:50194ac57b11
user:      pk <pk%NetBSD.org@localhost>
date:      Sat Nov 08 14:04:26 2003 +0000

description:
Construct arguments properly and update comment in previous bzero -> memset
changes.

diffstat:

 sys/arch/sparc/sparc/locore.s |  20 ++++++++++----------
 1 files changed, 10 insertions(+), 10 deletions(-)

diffs (52 lines):

diff -r e5f31d49e31c -r 50194ac57b11 sys/arch/sparc/sparc/locore.s
--- a/sys/arch/sparc/sparc/locore.s     Sat Nov 08 13:57:29 2003 +0000
+++ b/sys/arch/sparc/sparc/locore.s     Sat Nov 08 14:04:26 2003 +0000
@@ -1,4 +1,4 @@
-/*     $NetBSD: locore.s,v 1.194 2003/11/08 13:21:36 martin Exp $      */
+/*     $NetBSD: locore.s,v 1.195 2003/11/08 14:04:26 pk Exp $  */
 
 /*
  * Copyright (c) 1996 Paul Kranenburg
@@ -100,6 +100,11 @@
  */
 #define        CCFSZ   96
 
+/* We rely on the fact that %lo(CPUINFO_VA) is zero */
+.if CPUINFO_VA & 0x1fff
+BARF
+.endif
+
 /*
  * A handy macro for maintaining instrumentation counters.
  * Note that this clobbers %o0 and %o1.  Normal usage is
@@ -1974,10 +1979,6 @@
 
 #if defined(SUN4M)
 memfault_sun4m:
-       ! DANGER: we use the fact that %lo(CPUINFO_VA) is zero
-.if CPUINFO_VA & 0x1fff
-BARF
-.endif
        sethi   %hi(CPUINFO_VA), %l4
        ld      [%l4 + %lo(CPUINFO_VA+CPUINFO_GETSYNCFLT)], %l5
        jmpl    %l5, %l7
@@ -4106,15 +4107,14 @@
        /*
         * Step 4: change the trap base register, now that our trap handlers
         * will function (they need the tables we just set up).
-        * This depends on the fact that bzero does not use %g6.
+        * This depends on the fact that memset does not use %g6.
         */
        wr      %g6, 0, %tbr
        nop; nop; nop                   ! paranoia
 
-
-       /* Clear `cpuinfo' */
-       sethi   %hi(CPUINFO_VA), %o0            ! memset(&cpuinfo, 0, NBPG)
-       set     %hi(CPUINFO_STRUCTSIZE), %o2
+       /* Clear `cpuinfo': memset(&cpuinfo, 0, sizeof cpuinfo) */
+       sethi   %hi(CPUINFO_VA), %o0
+       set     CPUINFO_STRUCTSIZE, %o2
        call    _C_LABEL(memset)
         clr    %o1
 



Home | Main Index | Thread Index | Old Index